[BUGFIX] Namespace: Revert extension split-up: static_templates
authorFelix Kopp <felix-source@phorax.com>
Sat, 25 Aug 2012 10:26:51 +0000 (12:26 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 25 Aug 2012 11:10:54 +0000 (13:10 +0200)
Reverts the split-up for the extension statictemplates:
erroneous extKey was 'static_templates'.

Also fixes minor CGL and benni's email address.

Change-Id: I3ca4448bb5cf9353f0d0625df02ba081c11145e9
Resolves: #40167
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14065
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Migrations/Code/ClassAliasMap201208221700.php
typo3/sysext/static_templates/Classes/StaticTemplatesHook.php [deleted file]
typo3/sysext/statictemplates/Classes/StaticTemplatesHook.php [new file with mode: 0644]
typo3/sysext/statictemplates/class.tx_statictemplates.php

index 08a5744..2361c29 100644 (file)
@@ -1704,7 +1704,7 @@ return array(
        'tx_scheduler_CronCmd_NormalizeTest' => 'TYPO3\\CMS\\Scheduler\\Tests\\Unit\\CrondCommand\\NormalizeCommandTest',
        'tx_scheduler_CachingFrameworkGarbageCollectionTest' => 'TYPO3\\CMS\\Scheduler\\Tests\\Unit\\Task\\CachingFrameworkGarbageCollectionTest',
        'SC_mod_user_setup_index' => 'TYPO3\\CMS\\Setup\\Controller\\SetupModuleController',
-       'tx_statictemplates' => 'TYPO3\\CMS\\StaticTemplates\\StaticTemplatesHook',
+       'tx_statictemplates' => 'TYPO3\\CMS\\Statictemplates\\StaticTemplatesHook',
        'tx_sv_authbase' => 'TYPO3\\CMS\\Sv\\AbstractAuthenticationService',
        'tx_sv_auth' => 'TYPO3\\CMS\\Sv\\AuthenticationService',
        'tx_sv_loginformhook' => 'TYPO3\\CMS\\Sv\\LoginFormHook',
diff --git a/typo3/sysext/static_templates/Classes/StaticTemplatesHook.php b/typo3/sysext/static_templates/Classes/StaticTemplatesHook.php
deleted file mode 100644 (file)
index c3e2d47..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-namespace TYPO3\CMS\StaticTemplates;
-
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
- *  (c) 2009-2011 Benjamin Mack (benn@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Statictemplates
- *
- * @author Kasper Skårhøj (kasperYYYY@typo3.com)
- * @author Benjamin Mack (benn@typo3.org)
- */
-class StaticTemplatesHook {
-
-       /**
-        * Includes static template records from static_template table, loaded through a hook
-        *
-        * @param array $params
-        * @param object $pObj
-        * @return void
-        */
-       public function includeStaticTypoScriptSources(&$params, &$pObj) {
-               // Static Template Records (static_template): include_static is a
-               // list of static templates to include
-               if (trim($params['row']['include_static'])) {
-                       $includeStaticArr = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $params['row']['include_static']);
-                       // traversing list
-                       foreach ($includeStaticArr as $id) {
-                               // if $id is not already included ...
-                               if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($params['idList'], ('static_' . $id))) {
-                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'static_template', 'uid = ' . intval($id));
-                                       // there was a template, then we fetch that
-                                       if ($subrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                                               $subrow = $pObj->prependStaticExtra($subrow);
-                                               $pObj->processTemplate($subrow, ($params['idList'] . ',static_') . $id, $params['pid'], 'static_' . $id, $params['templateId']);
-                                       }
-                                       $GLOBALS['TYPO3_DB']->sql_free_result($res);
-                               }
-                       }
-               }
-       }
-
-}
-
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/statictemplates/Classes/StaticTemplatesHook.php b/typo3/sysext/statictemplates/Classes/StaticTemplatesHook.php
new file mode 100644 (file)
index 0000000..398cf1d
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+namespace TYPO3\CMS\Statictemplates;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
+ *  (c) 2009-2011 Benjamin Mack (benn@typo3.org)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+/**
+ * Statictemplates
+ *
+ * @author Kasper Skårhøj (kasperYYYY@typo3.com)
+ * @author Benjamin Mack (benni@typo3.org)
+ */
+class StaticTemplatesHook {
+
+       /**
+        * Includes static template records from static_template table, loaded through a hook
+        *
+        * @param array $params
+        * @param object $pObj
+        * @return void
+        */
+       public function includeStaticTypoScriptSources(&$params, &$pObj) {
+                       // Static Template Records (static_template): include_static is a list of static templates to include
+               if (trim($params['row']['include_static'])) {
+                       $includeStaticArr = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $params['row']['include_static']);
+                               // Traversing list
+                       foreach ($includeStaticArr as $id) {
+                                       // If $id is not already included ...
+                               if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($params['idList'], ('static_' . $id))) {
+                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'static_template', 'uid = ' . intval($id));
+                                               // ... there was a template, then we fetch that
+                                       if ($subrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                                               $subrow = $pObj->prependStaticExtra($subrow);
+                                               $pObj->processTemplate($subrow, ($params['idList'] . ',static_') . $id, $params['pid'], 'static_' . $id, $params['templateId']);
+                                       }
+                                       $GLOBALS['TYPO3_DB']->sql_free_result($res);
+                               }
+                       }
+               }
+       }
+
+}
+
+?>
\ No newline at end of file
index 4be70af..855687e 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * @deprecated since 6.0, the classname tx_statictemplates and this file is obsolete
  * and will be removed by 7.0. The class was renamed and is now located at:
- * typo3/sysext/static_templates/Classes/StaticTemplatesHook.php
+ * typo3/sysext/statictemplates/Classes/StaticTemplatesHook.php
  */
-require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('static_templates') . 'Classes/StaticTemplatesHook.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('statictemplates') . 'Classes/StaticTemplatesHook.php';
 ?>
\ No newline at end of file