Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

The theme import/export now works with the new DB assisted file system

  • Loading branch information...
commit ca6ee1fe5061fa212db4545b11cbbaaae7e69234 1 parent d996ac9
Leo Feyer leofeyer authored
6 contao/diff.php
@@ -194,6 +194,12 @@ public function run()
194 194 }
195 195 }
196 196
  197 + // Identical versions
  198 + if ($strBuffer == '')
  199 + {
  200 + $strBuffer = '<p>'.$GLOBALS['TL_LANG']['MSC']['identicalVersions'].'</p>';
  201 + }
  202 +
197 203 $this->Template = new BackendTemplate('be_diff');
198 204
199 205 // Template variables
304 system/modules/backend/Theme.php
@@ -55,35 +55,38 @@ public function importTheme()
55 55 {
56 56 $source = $this->Input->post('source', true);
57 57
58   - // Check the file names
59   - if (!$source || !is_array($source))
  58 + if ($source == '')
60 59 {
61 60 $this->addErrorMessage($GLOBALS['TL_LANG']['ERR']['all_fields']);
62 61 $this->reload();
63 62 }
64 63
65 64 $arrFiles = array();
  65 + $objFiles = \FilesCollection::findMultipleByIds(trimsplit(',', $source));
66 66
67 67 // Skip invalid entries
68   - foreach ($source as $strZipFile)
  68 + if ($objFiles !== null)
69 69 {
70   - // Skip folders
71   - if (is_dir(TL_ROOT . '/' . $strZipFile))
  70 + while ($objFiles->next())
72 71 {
73   - $this->addErrorMessage(sprintf($GLOBALS['TL_LANG']['ERR']['importFolder'], basename($strZipFile)));
74   - continue;
75   - }
  72 + // Skip folders
  73 + if (is_dir(TL_ROOT . '/' . $objFiles->path))
  74 + {
  75 + $this->addErrorMessage(sprintf($GLOBALS['TL_LANG']['ERR']['importFolder'], $objFiles->name));
  76 + continue;
  77 + }
76 78
77   - $objFile = new \File($strZipFile);
  79 + $objFile = new \File($objFiles->path);
78 80
79   - // Skip anything but .cto files
80   - if ($objFile->extension != 'cto')
81   - {
82   - $this->addErrorMessage(sprintf($GLOBALS['TL_LANG']['ERR']['filetype'], $objFile->extension));
83   - continue;
84   - }
  81 + // Skip anything but .cto files
  82 + if ($objFile->extension != 'cto')
  83 + {
  84 + $this->addErrorMessage(sprintf($GLOBALS['TL_LANG']['ERR']['filetype'], $objFile->extension));
  85 + continue;
  86 + }
85 87
86   - $arrFiles[] = $strZipFile;
  88 + $arrFiles[] = $objFiles->path;
  89 + }
87 90 }
88 91
89 92 // Check wether there are any files left
@@ -107,11 +110,10 @@ public function importTheme()
107 110 if ($this->Input->post('confirm') == 1)
108 111 {
109 112 $this->extractThemeFiles($arrFiles, $arrDbFields);
110   - return '';
111 113 }
112 114 else
113 115 {
114   - return $this->compareThemeFiles($arrFiles, $arrDbFields);
  116 + return $this->compareThemeFiles($arrFiles, $arrDbFields, $source);
115 117 }
116 118 }
117 119
@@ -153,9 +155,10 @@ public function importTheme()
153 155 * whether there are custom layout sections
154 156 * @param array
155 157 * @param array
  158 + * @param string
156 159 * @return string
157 160 */
158   - protected function compareThemeFiles($arrFiles, $arrDbFields)
  161 + protected function compareThemeFiles($arrFiles, $arrDbFields, $source)
159 162 {
160 163 $return = '
161 164 <div id="tl_buttons">
@@ -168,14 +171,9 @@ protected function compareThemeFiles($arrFiles, $arrDbFields)
168 171 <div class="tl_formbody_edit">
169 172 <input type="hidden" name="FORM_SUBMIT" value="tl_theme_import">
170 173 <input type="hidden" name="REQUEST_TOKEN" value="'.REQUEST_TOKEN.'">
  174 +<input type="hidden" name="source" value="'.$source.'">
171 175 <input type="hidden" name="confirm" value="1">';
172 176
173   - // Add the hidden fields
174   - foreach ($arrFiles as $strFile)
175   - {
176   - $return .= "\n" . '<input type="hidden" name="source[]" value="'.$strFile.'">';
177   - }
178   -
179 177 $count = 0;
180 178
181 179 // Check the theme data
@@ -393,7 +391,7 @@ protected function extractThemeFiles($arrFiles, $arrDbFields)
393 391 // Override the files directory
394 392 if ($GLOBALS['TL_CONFIG']['uploadPath'] != 'files' && strncmp($objArchive->file_name, 'files/', 6) === 0)
395 393 {
396   - $strFileName = str_replace('files/', $GLOBALS['TL_CONFIG']['uploadPath'] . '/', $objArchive->file_name);
  394 + $strFileName = preg_replace('@^files/@', $GLOBALS['TL_CONFIG']['uploadPath'] . '/', $objArchive->file_name);
397 395 }
398 396
399 397 $objFile = new \File($strFileName);
@@ -415,19 +413,108 @@ protected function extractThemeFiles($arrFiles, $arrDbFields)
415 413
416 414 $arrMapper = array();
417 415 $tables = $xml->getElementsByTagName('table');
  416 + $arrNewFolders = array();
  417 +
  418 + // Extract the folder names from the XML file
  419 + for ($i=0; $i<$tables->length; $i++)
  420 + {
  421 + if ($tables->item($i)->getAttribute('name') == 'tl_theme')
  422 + {
  423 + $fields = $tables->item($i)->childNodes->item(0)->childNodes;
  424 +
  425 + for ($k=0; $k<$fields->length; $k++)
  426 + {
  427 + if ($fields->item($k)->getAttribute('name') == 'folders')
  428 + {
  429 + $arrNewFolders = deserialize($fields->item($k)->nodeValue);
  430 + break;
  431 + }
  432 + }
  433 +
  434 + break;
  435 + }
  436 + }
  437 +
  438 + // Sync the new folder(s)
  439 + if (is_array($arrNewFolders) && !empty($arrNewFolders))
  440 + {
  441 + foreach ($arrNewFolders as $strFolder)
  442 + {
  443 + if ($GLOBALS['TL_CONFIG']['uploadPath'] != 'files')
  444 + {
  445 + $strFolder = preg_replace('@^files/@', $GLOBALS['TL_CONFIG']['uploadPath'] . '/', $strFolder);
  446 + }
  447 +
  448 + // Index the parent folders
  449 + $strTmp = $strFolder;
  450 + $intNextPid = null;
  451 + $arrParents = array();
  452 +
  453 + while ($strTmp != '' && $strTmp != $GLOBALS['TL_CONFIG']['uploadPath'])
  454 + {
  455 + $arrParents[] = $strTmp;
  456 + $strTmp = dirname($strTmp);
  457 + }
  458 +
  459 + foreach (array_reverse($arrParents) as $strParent)
  460 + {
  461 + $objParent = \FilesModel::findByPath($strParent);
  462 +
  463 + if ($objParent === null)
  464 + {
  465 + if ($intNextPid === null)
  466 + {
  467 + if (dirname($strParent) == $GLOBALS['TL_CONFIG']['uploadPath'])
  468 + {
  469 + $intNextPid = 0;
  470 + }
  471 + else
  472 + {
  473 + $objPid = \FilesModel::findByPath(dirname($strParent));
  474 + $intNextPid = $objPid->id;
  475 + }
  476 + }
  477 +
  478 + $objFolder = new \Folder($strParent);
  479 +
  480 + $objModel = new \FilesModel();
  481 + $objModel->pid = $intNextPid;
  482 + $objModel->tstamp = time();
  483 + $objModel->name = basename($strParent);
  484 + $objModel->type = 'folder';
  485 + $objModel->path = $strParent;
  486 + $objModel->hash = $objFolder->hash;
  487 + $objModel->found = 1;
  488 + $objModel->save();
  489 +
  490 + $intNextPid = $objModel->id;
  491 + }
  492 + }
  493 +
  494 + $this->syncNewFolder($strFolder, $intNextPid);
  495 + }
  496 + }
418 497
419 498 // Lock the tables
420 499 $arrLocks = array
421 500 (
422   - 'tl_theme' => 'WRITE',
  501 + 'tl_files' => 'WRITE',
  502 + 'tl_layout' => 'WRITE',
  503 + 'tl_module' => 'WRITE',
423 504 'tl_style_sheet' => 'WRITE',
424 505 'tl_style' => 'WRITE',
425   - 'tl_module' => 'WRITE',
426   - 'tl_layout' => 'WRITE'
  506 + 'tl_theme' => 'WRITE',
427 507 );
428 508
429 509 $this->Database->lockTables($arrLocks);
430 510
  511 + // Get the current auto_increment values
  512 + $tl_theme = $this->Database->getNextId('tl_theme');
  513 + $tl_style_sheet = $this->Database->getNextId('tl_style_sheet');
  514 + $tl_style = $this->Database->getNextId('tl_style');
  515 + $tl_module = $this->Database->getNextId('tl_module');
  516 + $tl_layout = $this->Database->getNextId('tl_layout');
  517 +
431 518 // Loop through the tables
432 519 for ($i=0; $i<$tables->length; $i++)
433 520 {
@@ -452,8 +539,14 @@ protected function extractThemeFiles($arrFiles, $arrDbFields)
452 539 $value = $fields->item($k)->nodeValue;
453 540 $name = $fields->item($k)->getAttribute('name');
454 541
  542 + // Skip NULL values
  543 + if ($value == 'NULL')
  544 + {
  545 + continue;
  546 + }
  547 +
455 548 // Increment the ID
456   - if ($name == 'id')
  549 + elseif ($name == 'id')
457 550 {
458 551 $id = ${$table}++;
459 552 $arrMapper[$table][$value] = $id;
@@ -473,6 +566,12 @@ protected function extractThemeFiles($arrFiles, $arrDbFields)
473 566 }
474 567 }
475 568
  569 + // Handle fallback fields
  570 + elseif ($name == 'fallback')
  571 + {
  572 + $value = '';
  573 + }
  574 +
476 575 // Adjust the style sheet IDs of the page layout
477 576 elseif ($table == 'tl_layout' && $name == 'stylesheet')
478 577 {
@@ -508,7 +607,7 @@ protected function extractThemeFiles($arrFiles, $arrDbFields)
508 607 }
509 608 }
510 609
511   - // Adjust the names
  610 + // Adjust duplicate theme and style sheet names
512 611 elseif (($table == 'tl_theme' || $table == 'tl_style_sheet') && $name == 'name')
513 612 {
514 613 $objCount = $this->Database->prepare("SELECT COUNT(*) AS count FROM ". $table ." WHERE name=?")
@@ -521,20 +620,41 @@ protected function extractThemeFiles($arrFiles, $arrDbFields)
521 620 }
522 621 }
523 622
524   - // Handle fallback fields
525   - elseif ($name == 'fallback')
  623 + // Adjust the file paths in style sheets
  624 + elseif ($GLOBALS['TL_CONFIG']['uploadPath'] != 'files' && ($table == 'tl_style_sheet' || $table == 'tl_style') && strpos($value, 'files') !== false)
526 625 {
527   - $value = '';
  626 + $tmp = deserialize($value);
  627 +
  628 + if (is_array($tmp))
  629 + {
  630 + foreach ($tmp as $kk=>$vv)
  631 + {
  632 + $tmp[$kk] = preg_replace('@^files/@', $GLOBALS['TL_CONFIG']['uploadPath'] . '/', $vv);
  633 + }
  634 +
  635 + $value = serialize($tmp);
  636 + }
  637 + else
  638 + {
  639 + $value = preg_replace('@^files/@', $GLOBALS['TL_CONFIG']['uploadPath'] . '/', $value);
  640 + }
528 641 }
529 642
530   - // Skip NULL values
531   - elseif ($value == 'NULL')
  643 + // Replace the file paths in singleSRC fields with their tl_files ID
  644 + elseif (($table == 'tl_theme' && $name == 'screenshot') || ($table == 'tl_module' && $name == 'singleSRC') || ($table == 'tl_module' && $name == 'reg_homeDir'))
532 645 {
533   - continue;
  646 + if ($value != '')
  647 + {
  648 + $objFile = $this->Database->prepare("SELECT id FROM tl_files WHERE path=?")
  649 + ->limit(1)
  650 + ->executeUncached($value);
  651 +
  652 + $value = $objFile->id;
  653 + }
534 654 }
535 655
536   - // Adjust the file paths in style sheets and modules
537   - elseif ($GLOBALS['TL_CONFIG']['uploadPath'] != 'files' && strpos($value, 'files') !== false)
  656 + // Replace the file paths in multiSRC fields with their tl_files ID
  657 + elseif (($table == 'tl_theme' && $name == 'folders') || ($table == 'tl_module' && $name == 'multiSRC'))
538 658 {
539 659 $tmp = deserialize($value);
540 660
@@ -542,15 +662,15 @@ protected function extractThemeFiles($arrFiles, $arrDbFields)
542 662 {
543 663 foreach ($tmp as $kk=>$vv)
544 664 {
545   - $tmp[$kk] = str_replace('files/', $GLOBALS['TL_CONFIG']['uploadPath'] . '/', $vv);
  665 + $objFile = $this->Database->prepare("SELECT id FROM tl_files WHERE path=?")
  666 + ->limit(1)
  667 + ->executeUncached($vv);
  668 +
  669 + $tmp[$kk] = $objFile->id;
546 670 }
547 671
548 672 $value = serialize($tmp);
549 673 }
550   - else
551   - {
552   - $value = str_replace('files/', $GLOBALS['TL_CONFIG']['uploadPath'] . '/', $value);
553   - }
554 674 }
555 675
556 676 $set[$name] = $value;
@@ -610,6 +730,30 @@ public function exportTheme(\DataContainer $dc)
610 730 $strName = preg_replace('/[^A-Za-z0-9\._-]/', '', $strName);
611 731 $strName = basename($strName);
612 732
  733 + // Replace the numeric folder IDs
  734 + $arrFolders = deserialize($objTheme->folders);
  735 +
  736 + if (is_array($arrFolders) && !empty($arrFolders))
  737 + {
  738 + $objFolders = \FilesCollection::findMultipleByIds($arrFolders);
  739 +
  740 + if ($objFolders !== null)
  741 + {
  742 + $objTheme->folders = serialize($objFolders->fetchEach('path'));
  743 + }
  744 + }
  745 +
  746 + // Replace the numeric screenshot ID
  747 + if ($objTheme->screenshot != '')
  748 + {
  749 + $objFile = \FilesModel::findByPk($objTheme->screenshot);
  750 +
  751 + if ($objFile !== null)
  752 + {
  753 + $objTheme->screenshot = $objFile->path;
  754 + }
  755 + }
  756 +
613 757 // Create a new XML document
614 758 $xml = new \DOMDocument('1.0', 'UTF-8');
615 759 $xml->formatOutput = true;
@@ -903,4 +1047,76 @@ protected function addTemplatesToArchive(\ZipWriter $objArchive, $strFolder)
903 1047 }
904 1048 }
905 1049 }
  1050 +
  1051 +
  1052 + /**
  1053 + * Recursively synchronize the new folder
  1054 + * @param string
  1055 + * @param integer
  1056 + * @return void
  1057 + */
  1058 + protected function syncNewFolder($strPath, $intPid=0)
  1059 + {
  1060 + $arrFiles = array();
  1061 + $arrFolders = array();
  1062 + $arrScan = scan(TL_ROOT . '/' . $strPath);
  1063 +
  1064 + // Separate files from folders
  1065 + foreach ($arrScan as $strFile)
  1066 + {
  1067 + if (is_dir(TL_ROOT . '/' . $strPath . '/' . $strFile))
  1068 + {
  1069 + $arrFolders[] = $strPath . '/' . $strFile;
  1070 + }
  1071 + else
  1072 + {
  1073 + $arrFiles[] = $strPath . '/' . $strFile;
  1074 + }
  1075 + }
  1076 +
  1077 + // Folders
  1078 + foreach ($arrFolders as $strFolder)
  1079 + {
  1080 + $objFolder = new \Folder($strFolder);
  1081 + $objModel = \FilesModel::findByPath($strFolder);
  1082 +
  1083 + // Create the entry if it does not yet exist
  1084 + if ($objModel === null)
  1085 + {
  1086 + $objModel = new \FilesModel();
  1087 + $objModel->pid = $intPid;
  1088 + $objModel->tstamp = time();
  1089 + $objModel->name = basename($strFolder);
  1090 + $objModel->type = 'folder';
  1091 + $objModel->path = $strFolder;
  1092 + $objModel->hash = $objFolder->hash;
  1093 + $objModel->found = 1;
  1094 + $objModel->save();
  1095 + }
  1096 +
  1097 + $this->syncNewFolder($strFolder, $objModel->id);
  1098 + }
  1099 +
  1100 + // Files
  1101 + foreach ($arrFiles as $strFile)
  1102 + {
  1103 + $objFile = new \File($strFile);
  1104 + $objModel = \FilesModel::findByPath($strFile);
  1105 +
  1106 + // Create the entry if it does not yet exist
  1107 + if ($objModel === null)
  1108 + {
  1109 + $objModel = new \FilesModel();
  1110 + $objModel->pid = $intPid;
  1111 + $objModel->tstamp = time();
  1112 + $objModel->name = basename($strFile);
  1113 + $objModel->type = 'file';
  1114 + $objModel->path = $strFile;
  1115 + $objModel->extension = $objFile->extension;
  1116 + $objModel->hash = $objFile->hash;
  1117 + $objModel->found = 1;
  1118 + $objModel->save();
  1119 + }
  1120 + }
  1121 + }
906 1122 }
9 system/modules/backend/dca/tl_theme.php
@@ -242,9 +242,14 @@ public function __construct()
242 242 */
243 243 public function addPreviewImage($row, $label)
244 244 {
245   - if ($row['screenshot'] != '' && file_exists(TL_ROOT . '/' . $row['screenshot']))
  245 + if ($row['screenshot'] != '')
246 246 {
247   - $label = '<img src="' . TL_FILES_URL . $this->getImage($row['screenshot'], 160, 120) . '" width="160" height="120" alt="" class="theme_preview">' . $label;
  247 + $objFile = \FilesModel::findByPk($row['screenshot']);
  248 +
  249 + if ($objFile !== null)
  250 + {
  251 + $label = '<img src="' . TL_FILES_URL . $this->getImage($objFile->path, 160, 120) . '" width="160" height="120" alt="" class="theme_preview">' . $label;
  252 + }
248 253 }
249 254
250 255 return $label;
43 system/modules/backend/drivers/DC_Folder.php
@@ -607,6 +607,11 @@ public function copy($source=null, $destination=null)
607 607
608 608 foreach ($files as $file)
609 609 {
  610 + if ($file == '.svn' || $file == '.DS_Store')
  611 + {
  612 + continue;
  613 + }
  614 +
610 615 if (is_dir(TL_ROOT . '/' . $source .'/'. $file))
611 616 {
612 617 $this->copy($source . '/' . $file, $destination . '/' . $file);
@@ -775,19 +780,25 @@ public function delete($source=null)
775 780 $this->Files->delete($source . '/' . $file);
776 781
777 782 // Find the corresponding DB entries
778   - $objFile = \FilesModel::findByPath($source . '/' . $file);
779   - $objFile->delete();
  783 + if ($file != '.DS_Store')
  784 + {
  785 + $objFile = \FilesModel::findByPath($source . '/' . $file);
  786 + $objFile->delete();
  787 + }
780 788 }
781 789 }
782 790
783 791 $this->Files->rmdir($source);
784 792
785 793 // Find the corresponding DB entries
786   - $objFile = \FilesModel::findByPath($source);
787   - $objFile->delete();
  794 + if ($source != '.svn')
  795 + {
  796 + $objFile = \FilesModel::findByPath($source);
  797 + $objFile->delete();
  798 + }
788 799 }
789 800
790   - // Delete file
  801 + // Delete a file
791 802 else
792 803 {
793 804 $this->Files->delete($source);
@@ -2101,7 +2112,7 @@ protected function execSync($strPath, $intPid=0)
2101 2112 // Separate files from folders
2102 2113 foreach ($arrScan as $strFile)
2103 2114 {
2104   - if (strncmp($strFile, '.', 1) === 0)
  2115 + if ($strFile == '.svn' || $strFile == '.DS_Store')
2105 2116 {
2106 2117 continue;
2107 2118 }
@@ -2272,21 +2283,25 @@ protected function generateTree($path, $intMargin, $mount=false, $blnProtected=f
2272 2283 {
2273 2284 foreach (scan($path) as $v)
2274 2285 {
2275   - if (!is_dir($path . '/' . $v) && $v != '.DS_Store')
  2286 + if ($v == '.svn' || $v == '.DS_Store')
2276 2287 {
2277   - $files[] = $path . '/' . $v;
2278 2288 continue;
2279 2289 }
2280 2290
2281   - if ($v == '__new__')
  2291 + if (is_file($path . '/' . $v))
2282 2292 {
2283   - $this->Files->rmdir(str_replace(TL_ROOT.'/', '', $path) . '/' . $v);
2284   - continue;
  2293 + $files[] = $path . '/' . $v;
2285 2294 }
2286   -
2287   - if (substr($v, 0, 1) != '.')
  2295 + else
2288 2296 {
2289   - $folders[] = $path . '/' . $v;
  2297 + if ($v == '__new__')
  2298 + {
  2299 + $this->Files->rmdir(str_replace(TL_ROOT.'/', '', $path) . '/' . $v);
  2300 + }
  2301 + else
  2302 + {
  2303 + $folders[] = $path . '/' . $v;
  2304 + }
2290 2305 }
2291 2306 }
2292 2307
1  system/modules/backend/languages/de/default.php
@@ -480,3 +480,4 @@
480 480 $GLOBALS['TL_LANG']['MSC']['description'] = 'Beschreibung';
481 481 $GLOBALS['TL_LANG']['MSC']['noVersions'] = 'Zur Zeit sind keine Versionen vorhanden.';
482 482 $GLOBALS['TL_LANG']['MSC']['latestChanges'] = 'Zuletzt bearbeitet';
  483 +$GLOBALS['TL_LANG']['MSC']['identicalVersions'] = 'Die beiden ausgewählten Versionen sind identisch.';
1  system/modules/backend/languages/en/default.php
@@ -479,3 +479,4 @@
479 479 $GLOBALS['TL_LANG']['MSC']['description'] = 'Description';
480 480 $GLOBALS['TL_LANG']['MSC']['noVersions'] = 'Currently there are no versions.';
481 481 $GLOBALS['TL_LANG']['MSC']['latestChanges'] = 'Latest changes';
  482 +$GLOBALS['TL_LANG']['MSC']['identicalVersions'] = 'The two selected versions are identical.';
15 system/modules/development/ModuleExtension.php
@@ -150,9 +150,8 @@ protected function compile()
150 150 foreach ($arrTemplates as $strTemplate)
151 151 {
152 152 $tplTemplate = $this->newTemplate('dev_beTemplate', $objModule);
153   - $strContent = str_replace(array('{{', '}}'), array('<?php', '?>'), $tplTemplate->parse());
154 153 $objTemplate = new \File('system/modules/' . $objModule->folder . '/templates/' . $strTemplate . '.html5');
155   - $objTemplate->write($strContent);
  154 + $objTemplate->write($tplTemplate->parse());
156 155 $objTemplate->close();
157 156 }
158 157 }
@@ -179,14 +178,10 @@ protected function compile()
179 178 foreach ($arrTemplates as $strTemplate)
180 179 {
181 180 $tplTemplate = $this->newTemplate('dev_feTemplate', $objModule);
182   - $strContent = str_replace(array('{{', '}}'), array('<?php', '?>'), $tplTemplate->parse());
183   -
184   - foreach (array('.html5', '.xhtml') as $ext)
185   - {
186   - $objTemplate = new \File('system/modules/' . $objModule->folder . '/templates/' . $strTemplate . $ext);
187   - $objTemplate->write($strContent);
188   - $objTemplate->close();
189   - }
  181 + $objTemplate = new \File('system/modules/' . $objModule->folder . '/templates/' . $strTemplate . '.html5');
  182 + $objTemplate->write($tplTemplate->parse());
  183 + $objTemplate->close();
  184 + $objTemplate->copyTo('system/modules/' . $objModule->folder . '/templates/' . $strTemplate . '.xhtml');
190 185 }
191 186 }
192 187
34 system/modules/development/templates/dev_beTemplate.html5
... ... @@ -1,26 +1,26 @@
1 1 <!DOCTYPE html>
2   -<html lang="{{ echo $this->language; }}">
  2 +<html lang="<?php echo '<?php echo $this->language; ?>'; ?>">
3 3 <head>
4   -<meta charset="{{ echo $this->charset; }}">
5   -<title>{{ echo $this->title; }} - Contao Open Source CMS {{ echo VERSION; }}</title>
6   -<base href="{{ echo $this->base; }}">
7   -<link rel="stylesheet" href="{{
  4 +<meta charset="<?php echo '<?php echo $this->charset; ?>'; ?>">
  5 +<title><?php echo '<?php echo $this->title; ?>'; ?> - Contao Open Source CMS <?php echo '<?php echo VERSION; ?>'; ?></title>
  6 +<base href="<?php echo '<?php echo $this->base; ?>'; ?>">
  7 +<link rel="stylesheet" href="<?php echo '<?php
8 8 $objCombiner = new Combiner();
9   - $objCombiner->add('system/themes/'. $this->theme .'/basic.css');
10   - $objCombiner->add('system/themes/'. $this->theme .'/main.css');
  9 + $objCombiner->add(\'system/themes/\'. $this->theme .\'/basic.css\');
  10 + $objCombiner->add(\'system/themes/\'. $this->theme .\'/main.css\');
11 11 echo $objCombiner->getCombinedFile();
12   -}}" media="all">
13   -<!--[if IE]><link rel="stylesheet" href="{{ echo TL_SCRIPT_URL; }}system/themes/{{ echo $this->theme; }}/iefixes.css"><![endif]-->
14   -<script>{{ echo $this->getLocaleString(); }}</script>
15   -<script src="{{
  12 +?>'; ?>" media="all">
  13 +<!--[if IE]><link rel="stylesheet" href="<?php echo '<?php echo TL_SCRIPT_URL; ?>'; ?>system/themes/<?php echo '<?php echo $this->theme; ?>'; ?>/iefixes.css"><![endif]-->
  14 +<script><?php echo '<?php echo $this->getLocaleString(); ?>'; ?></script>
  15 +<script src="<?php echo '<?php
16 16 $objCombiner = new Combiner();
17   - $objCombiner->add('plugins/mootools/core/' . MOOTOOLS . '/mootools-core.js', MOOTOOLS);
18   - $objCombiner->add('plugins/mootools/more/' . MOOTOOLS . '/mootools-more.js', MOOTOOLS);
  17 + $objCombiner->add(\'plugins/mootools/core/\' . MOOTOOLS . \'/mootools-core.js\', MOOTOOLS);
  18 + $objCombiner->add(\'plugins/mootools/more/\' . MOOTOOLS . \'/mootools-more.js\', MOOTOOLS);
19 19 echo $objCombiner->getCombinedFile();
20   -}}"></script>
21   -<script>{{ echo $this->getDateString(); }}</script>
22   -{{ echo $this->javascripts; }}
23   -<!--[if lt IE 9]><script src="{{ echo TL_PLUGINS_URL; }}plugins/html5shim/html5-{{ echo HTML5SHIM; }}.js"></script><![endif]-->
  20 +?>'; ?>"></script>
  21 +<script><?php echo '<?php echo $this->getDateString(); ?>'; ?></script>
  22 +<?php echo '<?php echo $this->javascripts; ?>'; ?>
  23 +<!--[if lt IE 9]><script src="<?php echo '<?php echo TL_PLUGINS_URL; ?>'; ?>plugins/html5shim/html5-<?php echo '<?php echo HTML5SHIM; ?>'; ?>.js"></script><![endif]-->
24 24 </head>
25 25 <body class="__ua__">
26 26
8 system/modules/development/templates/dev_feTemplate.html5
... ... @@ -1,9 +1,9 @@
1 1
2   -<div class="{{ echo $this->class; }} block"{{ echo $this->cssID; }}{{ if ($this->style): }} style="{{ echo $this->style; }}"{{ endif; }}>
3   -{{ if ($this->headline): }}
  2 +<div class="<?php echo '<?php echo $this->class; ?>'; ?> block"<?php echo '<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>'; ?>>
  3 +<?php echo '<?php if ($this->headline): ?>'; ?>
4 4
5   -<{{ echo $this->hl; }}>{{ echo $this->headline; }}</{{ echo $this->hl; }}>
6   -{{ endif; }}
  5 +<<?php echo '<?php echo $this->hl; ?>'; ?>><?php echo '<?php echo $this->headline; ?>'; ?></<?php echo '<?php echo $this->hl; ?>'; ?>>
  6 +<?php echo '<?php endif; ?>'; ?>
7 7
8 8
9 9
2  templates/music_academy.sql
@@ -3368,7 +3368,7 @@ INSERT INTO `tl_task_status` (`id`, `pid`, `tstamp`, `assignedTo`, `status`, `pr
3368 3368 -- Daten für Tabelle `tl_theme`
3369 3369 --
3370 3370
3371   -INSERT INTO `tl_theme` (`id`, `tstamp`, `name`, `author`, `folders`, `templates`, `screenshot`, `vars`) VALUES(1, 1272111434, 'Music Academy', 'Leo Feyer', 0x613a313a7b693a303b4e3b7d, '', '19', NULL);
  3371 +INSERT INTO `tl_theme` (`id`, `tstamp`, `name`, `author`, `folders`, `templates`, `screenshot`, `vars`) VALUES(1, 1334067974, 'Music Academy', 'Leo Feyer', 0x613a313a7b693a303b693a313b7d, '', '19', 'a:0:{}');
3372 3372
3373 3373 --
3374 3374 -- Daten für Tabelle `tl_user`

0 comments on commit ca6ee1f

Please sign in to comment.
Something went wrong with that request. Please try again.