Project

General

Profile

Bug #22428 ยป 20100411_RFC_14069.diff

Administrator Admin, 2010-04-12 09:42

View differences:

typo3/sysext/install/mod/class.tx_install.php (working copy)
* @subpackage tx_install
*/
class tx_install extends t3lib_install {
var $contentObject;
var $templateFilePath = 'typo3/sysext/install/Resources/Private/Templates/';
var $template;
var $javascript;
......
*/
function tx_install() {
parent::t3lib_install();
$this->contentObject = t3lib_div::makeInstance('tslib_cObj');
if (!$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']) die("Install Tool deactivated.<br />You must enable it by setting a password in typo3conf/localconf.php. If you insert the line below, the password will be 'joh316':<br /><br />\$TYPO3_CONF_VARS['BE']['installToolPassword'] = 'bacb98acf97e0b6112b1d1b650b84971';");
......
PATH_site . $this->templateFilePath . 'LoginForm.html'
);
// Get the template part from the file
$template = $this->contentObject->getSubpart(
$template = t3lib_parsehtml::getSubpart(
$templateFile, '###TEMPLATE###'
);
// Password has been given, but this form is rendered again.
// This means the given password was wrong
if (!empty($password)) {
// Get the subpart for the wrong password
$wrongPasswordSubPart = $this->contentObject->getSubpart(
$wrongPasswordSubPart = t3lib_parsehtml::getSubpart(
$template, '###WRONGPASSWORD###'
);
// Define the markers content
......
'password' => md5($password)
);
// Fill the markers in the subpart
$wrongPasswordSubPart = $this->contentObject->substituteMarkerArray(
$wrongPasswordSubPart = t3lib_parsehtml::substituteMarkerArray(
$wrongPasswordSubPart,
$wrongPasswordMarkers,
'###|###',
......
// Session has expired
if (!$this->session->isAuthorized() && $this->session->isExpired()) {
// Get the subpart for the expired session message
$sessionExpiredSubPart = $this->contentObject->getSubpart(
$sessionExpiredSubPart = t3lib_parsehtml::getSubpart(
$template, '###SESSIONEXPIRED###'
);
// Define the markers content
......
'message' => 'Your install tool session has expired'
);
// Fill the markers in the subpart
$sessionExpiredSubPart = $this->contentObject->substituteMarkerArray(
$sessionExpiredSubPart = t3lib_parsehtml::substituteMarkerArray(
$sessionExpiredSubPart,
$sessionExpiredMarkers,
'###|###',
......
);
}
// Substitute the subpart for the expired session in the template
$template = $this->contentObject->substituteSubpart(
$template = t3lib_parsehtml::substituteSubpart(
$template,
'###SESSIONEXPIRED###',
$sessionExpiredSubPart
);
// Substitute the subpart for the wrong password in the template
$template = $this->contentObject->substituteSubpart(
$template = t3lib_parsehtml::substituteSubpart(
$template,
'###WRONGPASSWORD###',
$wrongPasswordSubPart
......
'
);
// Fill the markers in the template
$content = $this->contentObject->substituteMarkerArray(
$content = t3lib_parsehtml::substituteMarkerArray(
$template,
$markers,
'###|###',
......
PATH_site . $this->templateFilePath . 'InitExtConfig.html'
);
// Get the template part from the file
$template = $this->contentObject->getSubpart(
$template = t3lib_parsehtml::getSubpart(
$templateFile, '###TEMPLATE###'
);
// Define the markers content
......
'
);
// Fill the markers in the template
$content = $this->contentObject->substituteMarkerArray(
$content = t3lib_parsehtml::substituteMarkerArray(
$template,
$markers,
'###|###',
......
PATH_site . $this->templateFilePath . 'StepOutput.html'
);
// Get the template part from the file
$template = $this->contentObject->getSubpart(
$template = t3lib_parsehtml::getSubpart(
$templateFile, '###TEMPLATE###'
);
// Define the markers content
......
switch(strtolower($this->step)) {
case 1:
// Get the subpart for the first step
$step1SubPart = $this->contentObject->getSubpart(
$step1SubPart = t3lib_parsehtml::getSubpart(
$templateFile, '###STEP1###'
);
// Add header marker for main template
......
'continue' => 'Continue'
);
// Add step marker for main template
$markers['step'] = $this->contentObject->substituteMarkerArray(
$markers['step'] = t3lib_parsehtml::substituteMarkerArray(
$step1SubPart,
$step1SubPartMarkers,
'###|###',
......
break;
case 2:
// Get the subpart for the second step
$step2SubPart = $this->contentObject->getSubpart(
$step2SubPart = t3lib_parsehtml::getSubpart(
$templateFile, '###STEP2###'
);
// Add header marker for main template
......
'continue' => 'Continue'
);
// Add step marker for main template
$markers['step'] = $this->contentObject->substituteMarkerArray(
$markers['step'] = t3lib_parsehtml::substituteMarkerArray(
$step2SubPart,
$step2SubPartMarkers,
'###|###',
......
TYPO3_db_host, TYPO3_db_username, TYPO3_db_password
)) {
// Get the subpart for the third step
$step3SubPart = $this->contentObject->getSubpart(
$step3SubPart = t3lib_parsehtml::getSubpart(
$templateFile, '###STEP3###'
);
// Get the subpart for the database options
$step3DatabaseOptionsSubPart = $this->contentObject->getSubpart(
$step3DatabaseOptionsSubPart = t3lib_parsehtml::getSubpart(
$step3SubPart, '###DATABASEOPTIONS###'
);
......
'databaseName' => htmlspecialchars($dbname)
);
// Add the option HTML to an array
$step3DatabaseOptions[] = $this->contentObject->substituteMarkerArray(
$step3DatabaseOptions[] = t3lib_parsehtml::substituteMarkerArray(
$step3DatabaseOptionsSubPart,
$step3DatabaseOptionMarkers,
'###|###',
......
'databaseName' => htmlspecialchars(TYPO3_db) . ' (NO ACCESS!)'
);
// Add the option HTML to an array
$step3DatabaseOptions[] = $this->contentObject->substituteMarkerArray(
$step3DatabaseOptions[] = t3lib_parsehtml::substituteMarkerArray(
$step3DatabaseOptionsSubPart,
$step3DatabaseOptionMarkers,
'###|###',
......
);
}
// Substitute the subpart for the database options
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$step3SubPart,
'###DATABASEOPTIONS###',
implode(chr(10), $step3DatabaseOptions)
......
'continue' => 'Continue'
);
// Add step marker for main template
$markers['step'] = $this->contentObject->substituteMarkerArray(
$markers['step'] = t3lib_parsehtml::substituteMarkerArray(
$content,
$step3SubPartMarkers,
'###|###',
......
// The selected database should be accessible
if ($GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db)) {
// Get the subpart for the fourth step
$step4SubPart = $this->contentObject->getSubpart(
$step4SubPart = t3lib_parsehtml::getSubpart(
$templateFile, '###STEP4###'
);
// Get the subpart for the database type options
$step4DatabaseTypeOptionsSubPart = $this->contentObject->getSubpart(
$step4DatabaseTypeOptionsSubPart = t3lib_parsehtml::getSubpart(
$step4SubPart, '###DATABASETYPEOPTIONS###'
);
......
'databaseName' => htmlspecialchars(basename($f))
);
// Add the option HTML to an array
$step4DatabaseTypeOptions[] = $this->contentObject->substituteMarkerArray(
$step4DatabaseTypeOptions[] = t3lib_parsehtml::substituteMarkerArray(
$step4DatabaseTypeOptionsSubPart,
$step4DatabaseTypeOptionMarkers,
'###|###',
......
);
}
// Substitute the subpart for the database type options
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$step4SubPart,
'###DATABASETYPEOPTIONS###',
implode(chr(10), $step4DatabaseTypeOptions)
......
'label' => 'Import database'
);
// Add step marker for main template
$markers['step'] = $this->contentObject->substituteMarkerArray(
$markers['step'] = t3lib_parsehtml::substituteMarkerArray(
$content,
$step4SubPartMarkers,
'###|###',
......
// The database should contain tables
if (count($whichTables)) {
// Get the subpart for the go step
$stepGoSubPart = $this->contentObject->getSubpart(
$stepGoSubPart = t3lib_parsehtml::getSubpart(
$templateFile, '###STEPGO###'
);
// Define the markers content
......
'
);
// Add step marker for main template
$markers['step'] = $this->contentObject->substituteMarkerArray(
$markers['step'] = t3lib_parsehtml::substituteMarkerArray(
$stepGoSubPart,
$stepGoSubPartMarkers,
'###|###',
......
}
}
// Fill the markers in the template
$content = $this->contentObject->substituteMarkerArray(
$content = t3lib_parsehtml::substituteMarkerArray(
$template,
$markers,
'###|###',
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'Typo3ConfEdit.html');
// Get the template part from the file
$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
$template = t3lib_parsehtml::getSubpart($templateFile, '###TEMPLATE###');
// Get the subpart for the files
$filesSubpart = $this->contentObject->getSubpart($template, '###FILES###');
$filesSubpart = t3lib_parsehtml::getSubpart($template, '###FILES###');
$files = array();
$typo3conf_files = t3lib_div::getFilesInDir($EDIT_path,'',1,1);
......
'class' => $this->INSTALL['typo3conf_files'] && !strcmp($this->INSTALL['typo3conf_files'], $file) ? 'class="act"' : ''
);
// Fill the markers in the subpart
$files[] = $this->contentObject->substituteMarkerArray(
$files[] = t3lib_parsehtml::substituteMarkerArray(
$filesSubpart,
$filesMarkers,
'###|###',
......
$backupFile = $this->getBackupFilename($this->INSTALL['typo3conf_files']);
$fileContent = t3lib_div::getUrl($this->INSTALL['typo3conf_files']);
// Get the subpart to edit the files
$fileEditTemplate = $this->contentObject->getSubpart($template, '###FILEEDIT###');
$fileEditTemplate = t3lib_parsehtml::getSubpart($template, '###FILEEDIT###');
$allowFileEditOutsideTypo3ConfDirSubPart = '';
if (substr($this->INSTALL['typo3conf_files'], -1) != '~' && !strstr($this->INSTALL['typo3conf_files'], '_bak')) {
// Get the subpart to show the save button
$showSaveButtonSubPart = $this->contentObject->getSubpart($fileEditTemplate, '###SHOWSAVEBUTTON###');
$showSaveButtonSubPart = t3lib_parsehtml::getSubpart($fileEditTemplate, '###SHOWSAVEBUTTON###');
}
if ($this->allowFileEditOutsite_typo3conf_dir) {
// Get the subpart to show if files are allowed outside the directory typo3conf
$allowFileEditOutsideTypo3ConfDirSubPart = $this->contentObject->getSubpart($fileEditTemplate, '###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###');
$allowFileEditOutsideTypo3ConfDirSubPart = t3lib_parsehtml::getSubpart($fileEditTemplate, '###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###');
}
// Substitute the subpart for the save button
$fileEditContent = $this->contentObject->substituteSubpart(
$fileEditContent = t3lib_parsehtml::substituteSubpart(
$fileEditTemplate,
'###SHOWSAVEBUTTON###',
$showSaveButtonSubPart
);
// Substitute the subpart to show if files are allowed outside the directory typo3conf
$fileEditContent = $this->contentObject->substituteSubpart(
$fileEditContent = t3lib_parsehtml::substituteSubpart(
$fileEditContent,
'###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###',
$allowFileEditOutsideTypo3ConfDirSubPart
......
'backup' => 'Make backup copy (rename to ' . basename($backupFile) . ')'
);
// Fill the markers in the subpart to edit the files
$fileEditContent = $this->contentObject->substituteMarkerArray(
$fileEditContent = t3lib_parsehtml::substituteMarkerArray(
$fileEditContent,
$fileEditMarkers,
'###|###',
......
if ($this->allowFileEditOutsite_typo3conf_dir) {
// Get the subpart to show if files are allowed outside the directory typo3conf
$allowFileEditOutsideTypo3ConfDirSubPart = $this->contentObject->getSubpart($template, '###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###');
$allowFileEditOutsideTypo3ConfDirSubPart = t3lib_parsehtml::getSubpart($template, '###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###');
// Define the markers content
$allowFileEditOutsideTypo3ConfDirMarkers = array(
'action' => $this->action,
......
'set' => 'Set'
);
// Fill the markers in the subpart
$allowFileEditOutsideTypo3ConfDirSubPart = $this->contentObject->substituteMarkerArray(
$allowFileEditOutsideTypo3ConfDirSubPart = t3lib_parsehtml::substituteMarkerArray(
$allowFileEditOutsideTypo3ConfDirSubPart,
$allowFileEditOutsideTypo3ConfDirMarkers,
'###|###',
......
);
}
// Substitute the subpart to edit the file
$fileListContent = $this->contentObject->substituteSubpart(
$fileListContent = t3lib_parsehtml::substituteSubpart(
$template,
'###FILEEDIT###',
$fileEditContent
);
// Substitute the subpart when files can be edited outside typo3conf directory
$fileListContent = $this->contentObject->substituteSubpart(
$fileListContent = t3lib_parsehtml::substituteSubpart(
$fileListContent,
'###ALLOWFILEEDITOUTSIDETYPO3CONFDIR###',
$allowFileEditOutsideTypo3ConfDirSubPart
);
// Substitute the subpart for the files
$fileListContent = $this->contentObject->substituteSubpart(
$fileListContent = t3lib_parsehtml::substituteSubpart(
$fileListContent,
'###FILES###',
implode(chr(10), $files)
......
'deleteTempCached' => 'Delete temp_CACHED* files'
);
// Fill the markers
$fileListContent = $this->contentObject->substituteMarkerArray(
$fileListContent = t3lib_parsehtml::substituteMarkerArray(
$fileListContent,
$fileListMarkers,
'###|###',
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'PhpInformation.html');
// Get the template part from the file
$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
$template = t3lib_parsehtml::getSubpart($templateFile, '###TEMPLATE###');
// Define the markers content
$markers = array(
'explanation' => 'Please copy/paste the information from this text field into an email or bug-report as "Debug System Information" whenever you wish to get support or report problems. This information helps others to check if your system has some obvious misconfiguration and you\'ll get your help faster!',
'debugInfo' => t3lib_div::formatForTextarea(implode(chr(10), $debugInfo))
);
// Fill the markers
$content = $this->contentObject->substituteMarkerArray(
$content = t3lib_parsehtml::substituteMarkerArray(
$template,
$markers,
'###|###',
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'Typo3TempManager.html');
// Get the template part from the file
$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
$template = t3lib_parsehtml::getSubpart($templateFile, '###TEMPLATE###');
// Get the subpart for 'Delete files by condition' dropdown
$deleteOptionsSubpart = $this->contentObject->getSubpart($template, '###DELETEOPTIONS###');
$deleteOptionsSubpart = t3lib_parsehtml::getSubpart($template, '###DELETEOPTIONS###');
$deleteOptions = array();
foreach ($deleteType as $deleteKey => $deleteValue) {
......
'data' => htmlspecialchars($deleteValue)
);
// Fill the markers in the subpart
$deleteOptions[] = $this->contentObject->substituteMarkerArray(
$deleteOptions[] = t3lib_parsehtml::substituteMarkerArray(
$deleteOptionsSubpart,
$deleteMarkers,
'###|###',
......
);
}
// Substitute the subpart for 'Delete files by condition' dropdown
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$template,
'###DELETEOPTIONS###',
implode(chr(10), $deleteOptions)
);
// Get the subpart for 'Number of files at a time' dropdown
$actionOptionsSubpart = $this->contentObject->getSubpart($template, '###ACTIONOPTIONS###');
$actionOptionsSubpart = t3lib_parsehtml::getSubpart($template, '###ACTIONOPTIONS###');
$actionOptions = array();
foreach ($actionType as $actionKey => $actionValue) {
......
'data' => htmlspecialchars($actionValue)
);
// Fill the markers in the subpart
$actionOptions[] = $this->contentObject->substituteMarkerArray(
$actionOptions[] = t3lib_parsehtml::substituteMarkerArray(
$actionOptionsSubpart,
$actionMarkers,
'###|###',
......
);
}
// Substitute the subpart for 'Number of files at a time' dropdown
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$content,
'###ACTIONOPTIONS###',
implode(chr(10), $actionOptions)
);
// Get the subpart for 'From sub-directory' dropdown
$subDirectoryOptionsSubpart = $this->contentObject->getSubpart($template, '###SUBDIRECTORYOPTIONS###');
$subDirectoryOptionsSubpart = t3lib_parsehtml::getSubpart($template, '###SUBDIRECTORYOPTIONS###');
$subDirectoryOptions = array();
foreach ($subdirRegistry as $subDirectoryKey => $subDirectoryValue) {
......
'data' => htmlspecialchars($subDirectoryValue)
);
// Fill the markers in the subpart
$subDirectoryOptions[] = $this->contentObject->substituteMarkerArray(
$subDirectoryOptions[] = t3lib_parsehtml::substituteMarkerArray(
$subDirectoryOptionsSubpart,
$subDirectoryMarkers,
'###|###',
......
);
}
// Substitute the subpart for 'From sub-directory' dropdown
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$content,
'###SUBDIRECTORYOPTIONS###',
implode(chr(10), $subDirectoryOptions)
......
'
);
// Fill the markers
$content = $this->contentObject->substituteMarkerArray(
$content = t3lib_parsehtml::substituteMarkerArray(
$content,
$markers,
'###|###',
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CleanUpManager.html');
// Get the template part from the file
$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
$template = t3lib_parsehtml::getSubpart($templateFile, '###TEMPLATE###');
// Get the subpart for the 'Clean up' dropdown
$cleanUpOptionsSubpart = $this->contentObject->getSubpart($template, '###CLEANUPOPTIONS###');
$cleanUpOptionsSubpart = t3lib_parsehtml::getSubpart($template, '###CLEANUPOPTIONS###');
$cleanUpOptions = array();
foreach ($cleanupType as $cleanUpKey => $cleanUpValue) {
......
'data' => htmlspecialchars($cleanUpValue)
);
// Fill the markers in the subpart
$cleanUpOptions[] = $this->contentObject->substituteMarkerArray(
$cleanUpOptions[] = t3lib_parsehtml::substituteMarkerArray(
$cleanUpOptionsSubpart,
$cleanUpMarkers,
'###|###',
......
);
}
// Substitute the subpart for the 'Clean up' dropdown
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$template,
'###CLEANUPOPTIONS###',
implode(chr(10), $cleanUpOptions)
......
'execute' => 'Execute'
);
// Fill the markers
$content = $this->contentObject->substituteMarkerArray(
$content = t3lib_parsehtml::substituteMarkerArray(
$content,
$markers,
'###|###',
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'GenerateConfigForm.html');
// Get the template part from the file
$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
$template = t3lib_parsehtml::getSubpart($templateFile, '###TEMPLATE###');
foreach ($GLOBALS['TYPO3_CONF_VARS'] as $k => $va) {
$ext='['.$k.']';
......
if ($isTextarea) {
// Get the subpart for a textarea
$textAreaSubpart = $this->contentObject->getSubpart($template, '###TEXTAREA###');
$textAreaSubpart = t3lib_parsehtml::getSubpart($template, '###TEXTAREA###');
// Define the markers content
$textAreaMarkers = array(
'id' => $k . '-' . $vk,
......
'value' => $value
);
// Fill the markers in the subpart
$textAreaSubpart = $this->contentObject->substituteMarkerArray(
$textAreaSubpart = t3lib_parsehtml::substituteMarkerArray(
$textAreaSubpart,
$textAreaMarkers,
'###|###',
......
);
} elseif (preg_match('/^boolean/i',$description)) {
// Get the subpart for a checkbox
$booleanSubpart = $this->contentObject->getSubpart($template, '###BOOLEAN###');
$booleanSubpart = t3lib_parsehtml::getSubpart($template, '###BOOLEAN###');
// Define the markers content
$booleanMarkers = array(
'id' => $k . '-' . $vk,
......
'checked' => $value ? 'checked="checked"' : ''
);
// Fill the markers in the subpart
$booleanSubpart = $this->contentObject->substituteMarkerArray(
$booleanSubpart = t3lib_parsehtml::substituteMarkerArray(
$booleanSubpart,
$booleanMarkers,
'###|###',
......
);
} else {
// Get the subpart for an input text field
$textLineSubpart = $this->contentObject->getSubpart($template, '###TEXTLINE###');
$textLineSubpart = t3lib_parsehtml::getSubpart($template, '###TEXTLINE###');
// Define the markers content
$textLineMarkers = array(
'id' => $k . '-' . $vk,
......
'value' => $value
);
// Fill the markers in the subpart
$textLineSubpart = $this->contentObject->substituteMarkerArray(
$textLineSubpart = t3lib_parsehtml::substituteMarkerArray(
$textLineSubpart,
$textLineMarkers,
'###|###',
......
);
}
// Substitute the subpart for a textarea
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$template,
'###TEXTAREA###',
$textAreaSubpart
);
// Substitute the subpart for a checkbox
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$content,
'###BOOLEAN###',
$booleanSubpart
);
// Substitute the subpart for an input text field
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$content,
'###TEXTLINE###',
$textLineSubpart
......
'label' => htmlspecialchars(t3lib_div::fixed_lgd_cs($value, 40))
);
// Fill the markers
$content = $this->contentObject->substituteMarkerArray(
$content = t3lib_parsehtml::substituteMarkerArray(
$content,
$markers,
'###|###',
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckMail.html');
// Get the template part from the file
$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
$template = t3lib_parsehtml::getSubpart($templateFile, '###TEMPLATE###');
if (!empty($this->mailMessage)) {
// Get the subpart for the mail is sent message
$mailSentSubpart = $this->contentObject->getSubpart($template, '###MAILSENT###');
$mailSentSubpart = t3lib_parsehtml::getSubpart($template, '###MAILSENT###');
}
// Substitute the subpart for the mail is sent message
$template = $this->contentObject->substituteSubpart(
$template = t3lib_parsehtml::substituteSubpart(
$template,
'###MAILSENT###',
$mailSentSubpart
......
'submit' => 'Send test mail'
);
// Fill the markers
$out .= $this->contentObject->substituteMarkerArray(
$out .= t3lib_parsehtml::substituteMarkerArray(
$template,
$markers,
'###|###',
......
', 2);
} else {
// Get the subpart for the ImageMagick versions
$theCode = $this->contentObject->getSubpart($templateFile, '###VERSIONS###');
$theCode = t3lib_parsehtml::getSubpart($templateFile, '###VERSIONS###');
// Get the subpart for each ImageMagick version
$rowsSubPart = $this->contentObject->getSubpart($theCode, '###ROWS###');
$rowsSubPart = t3lib_parsehtml::getSubpart($theCode, '###ROWS###');
foreach ($this->config_array['im_versions'] as $p => $v) {
$ka = array();
......
'version' => implode('<br />', $v)
);
// Fill the markers in the subpart
$rows[] = $this->contentObject->substituteMarkerArray(
$rows[] = t3lib_parsehtml::substituteMarkerArray(
$rowsSubPart,
$rowsMarkers,
'###|###',
......
);
}
// Substitute the subpart for the ImageMagick versions
$theCode = $this->contentObject->substituteSubpart(
$theCode = t3lib_parsehtml::substituteSubpart(
$theCode,
'###ROWS###',
implode(chr(10), $rows)
......
$this->message($ext, 'Available ImageMagick/GraphicsMagick installations:', $theCode, -1);
}
// Get the template file
$formSubPart = $this->contentObject->getSubpart($templateFile, '###FORM###');
$formSubPart = t3lib_parsehtml::getSubpart($templateFile, '###FORM###');
// Define the markers content
$formMarkers = array(
'actionUrl' => $this->action,
......
'send' => 'Send'
);
// Fill the markers
$formSubPart = $this->contentObject->substituteMarkerArray(
$formSubPart = t3lib_parsehtml::substituteMarkerArray(
$formSubPart,
$formMarkers,
'###|###',
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'SetupGeneral.html');
// Get the template part from the file
$form = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
$form = t3lib_parsehtml::getSubpart($templateFile, '###TEMPLATE###');
// Get the subpart for all modes
$allModesSubpart = $this->contentObject->getSubpart($form, '###ALLMODES###');
$allModesSubpart = t3lib_parsehtml::getSubpart($form, '###ALLMODES###');
// Define the markers content
$formMarkers['actionUrl'] = $this->action;
......
} elseif ($this->config_array['sql.safe_mode_user']) {
$username = $this->config_array['sql.safe_mode_user'];
// Get the subpart for the sql safe mode user
$sqlSafeModeUserSubpart = $this->contentObject->getSubpart($allModesSubpart, '###SQLSAFEMODEUSERSUBPART###');
$sqlSafeModeUserSubpart = t3lib_parsehtml::getSubpart($allModesSubpart, '###SQLSAFEMODEUSERSUBPART###');
// Define the markers content
$sqlSafeModeUserMarkers = array(
'labelSqlSafeModeUser' => 'sql.safe_mode_user:',
'sqlSafeModeUser' => $this->config_array['sql.safe_mode_user']
);
// Fill the markers in the subpart
$sqlSafeModeUserSubpart = $this->contentObject->substituteMarkerArray(
$sqlSafeModeUserSubpart = t3lib_parsehtml::substituteMarkerArray(
$sqlSafeModeUserSubpart,
$sqlSafeModeUserMarkers,
'###|###',
......
);
}
// Get the subpart for all modes
$allModesSubpart = $this->contentObject->substituteSubpart(
$allModesSubpart = t3lib_parsehtml::substituteSubpart(
$allModesSubpart,
'###SQLSAFEMODEUSERSUBPART###',
$sqlSafeModeUserSubpart
......
'labelCreateDatabase' => 'Create database?'
);
// Get the subpart for the database list
$databasesSubpart = $this->contentObject->getSubpart($allModesSubpart, '###DATABASELIST###');
$databasesSubpart = t3lib_parsehtml::getSubpart($allModesSubpart, '###DATABASELIST###');
if ($this->config_array['mysqlConnect']) {
// Get the subpart when database is available
$databaseAvailableSubpart = $this->contentObject->getSubpart($databasesSubpart, '###DATABASEAVAILABLE###');
$databaseAvailableSubpart = t3lib_parsehtml::getSubpart($databasesSubpart, '###DATABASEAVAILABLE###');
// Get the subpart for each database table
$databaseItemSubpart = $this->contentObject->getSubpart($databaseAvailableSubpart, '###DATABASEITEM###');
$databaseItemSubpart = t3lib_parsehtml::getSubpart($databaseAvailableSubpart, '###DATABASEITEM###');
$dbArr = $this->getDatabaseList();
$options='';
$dbIncluded=0;
......
$databaseItemMarkers['databaseSelected'] = 'selected="selected"';
}
// Fill the markers in the subpart
$databaseItems[] = $this->contentObject->substituteMarkerArray(
$databaseItems[] = t3lib_parsehtml::substituteMarkerArray(
$databaseItemSubpart,
$databaseItemMarkers,
'###|###',
......
$databaseItemMarkers['databaseSelected'] = 'selected="selected"';
$databaseItemMarkers['databaseValue'] = htmlspecialchars(TYPO3_db) . ' (NO ACCESS!)';
// Fill the markers in the subpart
$databaseItems[] = $this->contentObject->substituteMarkerArray(
$databaseItems[] = t3lib_parsehtml::substituteMarkerArray(
$databaseItemSubpart,
$databaseItemMarkers,
'###|###',
......
);
}
// Substitute the subpart for the database tables
$databaseAvailableSubpart = $this->contentObject->substituteSubpart(
$databaseAvailableSubpart = t3lib_parsehtml::substituteSubpart(
$databaseAvailableSubpart,
'###DATABASEITEM###',
implode(chr(10), $databaseItems)
);
} else {
// Get the subpart when the database is not available
$databaseNotAvailableSubpart = $this->contentObject->getSubpart($databasesSubpart, '###DATABASENOTAVAILABLE###');
$databaseNotAvailableSubpart = t3lib_parsehtml::getSubpart($databasesSubpart, '###DATABASENOTAVAILABLE###');
$databaseNotAvailableMarkers = array(
'typo3Db' => htmlspecialchars(TYPO3_db),
'labelNoDatabase' => '
......
'
);
// Fill the markers in the subpart
$databaseNotAvailableSubpart = $this->contentObject->substituteMarkerArray(
$databaseNotAvailableSubpart = t3lib_parsehtml::substituteMarkerArray(
$databaseNotAvailableSubpart,
$databaseNotAvailableMarkers,
'###|###',
......
);
}
// Substitute the subpart when database is available
$databasesSubpart = $this->contentObject->substituteSubpart(
$databasesSubpart = t3lib_parsehtml::substituteSubpart(
$databasesSubpart,
'###DATABASEAVAILABLE###',
$databaseAvailableSubpart
);
// Substitute the subpart when database is not available
$databasesSubpart = $this->contentObject->substituteSubpart(
$databasesSubpart = t3lib_parsehtml::substituteSubpart(
$databasesSubpart,
'###DATABASENOTAVAILABLE###',
$databaseNotAvailableSubpart
);
// Substitute the subpart for the databases
$allModesSubpart = $this->contentObject->substituteSubpart(
$allModesSubpart = t3lib_parsehtml::substituteSubpart(
$allModesSubpart,
'###DATABASELIST###',
$databasesSubpart
);
// Fill the markers in the subpart for all modes
$allModesSubpart = $this->contentObject->substituteMarkerArray(
$allModesSubpart = t3lib_parsehtml::substituteMarkerArray(
$allModesSubpart,
$allModesMarkers,
'###|###',
......
1
);
// Substitute the subpart for all modes
$form = $this->contentObject->substituteSubpart(
$form = t3lib_parsehtml::substituteSubpart(
$form,
'###ALLMODES###',
$allModesSubpart
......
TYPO3_mainDir .
'sysext/install/Resources/Public/Javascript/install.js"></script>';
// Get the subpart for the regular mode
$regularModeSubpart = $this->contentObject->getSubpart($form, '###REGULARMODE###');
$regularModeSubpart = t3lib_parsehtml::getSubpart($form, '###REGULARMODE###');
// Define the markers content
$regularModeMarkers = array(
'labelSiteName' => 'Site name:',
......
// Disable exec function
if (is_array($fA['disable_exec_function'])) {
// Get the subpart for the disable exec function
$disableExecFunctionSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###DISABLEEXECFUNCTIONSUBPART###');
$disableExecFunctionSubpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###DISABLEEXECFUNCTIONSUBPART###');
$regularModeMarkers['labelDisableExecFunction'] = '[BE][disable_exec_function]=';
$regularModeMarkers['strongDisableExecFunction'] = (integer) current($fA['disable_exec_function']);
$regularModeMarkers['defaultDisableExecFunction'] = (integer) $GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function'];
$regularModeMarkers['disableExecFunction'] = (integer) current($fA['disable_exec_function']);
// Fill the markers in the subpart
$disableExecFunctionSubpart = $this->contentObject->substituteMarkerArray(
$disableExecFunctionSubpart = t3lib_parsehtml::substituteMarkerArray(
$disableExecFunctionSubpart,
$regularModeMarkers,
'###|###',
......
);
}
// Substitute the subpart for the disable exec function
$regularModeSubpart = $this->contentObject->substituteSubpart(
$regularModeSubpart = t3lib_parsehtml::substituteSubpart(
$regularModeSubpart,
'###DISABLEEXECFUNCTIONSUBPART###',
$disableExecFunctionSubpart
......
// GDlib
if (is_array($fA['gdlib'])) {
// Get the subpart for the disable gd lib
$gdLibSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###DISABLEGDLIB###');
$gdLibSubpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###DISABLEGDLIB###');
$regularModeMarkers['labelGdLib'] = '[GFX][gdlib]=';
$regularModeMarkers['strongGdLib'] = (integer) current($fA['gdlib']);
$regularModeMarkers['defaultGdLib'] = (integer) $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'];
$regularModeMarkers['gdLib'] = (integer) current($fA['gdlib']);
// Fill the markers in the subpart
$gdLibSubpart = $this->contentObject->substituteMarkerArray(
$gdLibSubpart = t3lib_parsehtml::substituteMarkerArray(
$gdLibSubpart,
$regularModeMarkers,
'###|###',
......
);
}
// Substitute the subpart for the disable gdlib
$regularModeSubpart = $this->contentObject->substituteSubpart(
$regularModeSubpart = t3lib_parsehtml::substituteSubpart(
$regularModeSubpart,
'###DISABLEGDLIB###',
$gdLibSubpart
......
// GDlib PNG
if (is_array($fA['gdlib_png']) && $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
// Get the subpart for the gdlib png
$gdLibPngSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###GDLIBPNGSUBPART###');
$gdLibPngSubpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###GDLIBPNGSUBPART###');
// Get the subpart for the dropdown options
$gdLibPngOptionSubpart = $this->contentObject->getSubpart($gdLibPngSubpart, '###GDLIBPNGOPTION###');
$gdLibPngOptionSubpart = t3lib_parsehtml::getSubpart($gdLibPngSubpart, '###GDLIBPNGOPTION###');
$gdLibPngLabels = $this->setLabelValueArray($fA['gdlib_png'], 2);
reset($gdLibPngLabels);
......
$gdLibPngMarker['selected'] = 'selected="selected"';
}
// Fill the markers in the subpart
$gdLibPngOptions[] = $this->contentObject->substituteMarkerArray(
$gdLibPngOptions[] = t3lib_parsehtml::substituteMarkerArray(
$gdLibPngOptionSubpart,
$gdLibPngMarker,
'###|###',
......
);
}
// Substitute the subpart for the dropdown options
$gdLibPngSubpart = $this->contentObject->substituteSubpart(
$gdLibPngSubpart = t3lib_parsehtml::substituteSubpart(
$gdLibPngSubpart,
'###GDLIBPNGOPTION###',
implode(chr(10), $gdLibPngOptions)
);
// Fill the markers in the subpart
$gdLibPngSubpart = $this->contentObject->substituteMarkerArray(
$gdLibPngSubpart = t3lib_parsehtml::substituteMarkerArray(
$gdLibPngSubpart,
$regularModeMarkers,
'###|###',
......
);
}
// Substitute the subpart for the gdlib png
$regularModeSubpart = $this->contentObject->substituteSubpart(
$regularModeSubpart = t3lib_parsehtml::substituteSubpart(
$regularModeSubpart,
'###GDLIBPNGSUBPART###',
$gdLibPngSubpart
......
// ImageMagick
if (is_array($fA['im'])) {
// Get the subpart for ImageMagick
$imageMagickSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMAGEMAGICKSUBPART###');
$imageMagickSubpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###IMAGEMAGICKSUBPART###');
// Define the markers content
$regularModeMarkers['labelImageMagick'] = '[GFX][im]=';
$regularModeMarkers['strongImageMagick'] = (string) current($fA['im']);
$regularModeMarkers['defaultImageMagick'] = (integer) $GLOBALS['TYPO3_CONF_VARS']['GFX']['im'];
$regularModeMarkers['imageMagick'] = (integer) current($fA['im']);
// Fill the markers in the subpart
$imageMagickSubpart = $this->contentObject->substituteMarkerArray(
$imageMagickSubpart = t3lib_parsehtml::substituteMarkerArray(
$imageMagickSubpart,
$regularModeMarkers,
'###|###',
......
// IM Combine Filename
// Get the subpart for ImageMagick Combine filename
$imCombineFileNameSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMCOMBINEFILENAMESUBPART###');
$imCombineFileNameSubpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###IMCOMBINEFILENAMESUBPART###');
// Define the markers content
$regularModeMarkers['labelImCombineFilename'] = '[GFX][im_combine_filename]';
$regularModeMarkers['strongImCombineFilename'] = (string) current($fA['im_combine_filename']);
$regularModeMarkers['defaultImCombineFilename'] = (string) $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_combine_filename'];
$regularModeMarkers['imCombineFilename'] = (string) ($fA['im_combine_filename'] ? current($fA['im_combine_filename']) : 'combine');
// Fill the markers in the subpart
$imCombineFileNameSubpart = $this->contentObject->substituteMarkerArray(
$imCombineFileNameSubpart = t3lib_parsehtml::substituteMarkerArray(
$imCombineFileNameSubpart,
$regularModeMarkers,
'###|###',
......
// IM Version 5
// Get the subpart for ImageMagick Version 5
$imVersion5Subpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMVERSION5SUBPART###');
$imVersion5Subpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###IMVERSION5SUBPART###');
// Define the markers content
$regularModeMarkers['labelImVersion5'] = '[GFX][im_version_5]=';
$regularModeMarkers['strongImVersion5'] = (string) current($fA['im_version_5']);
$regularModeMarkers['defaultImVersion5'] = (string) $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5'];
$regularModeMarkers['imVersion5'] = (string) ($fA['im_version_5'] ? current($fA['im_version_5']) : '');
// Fill the markers in the subpart
$imVersion5Subpart = $this->contentObject->substituteMarkerArray(
$imVersion5Subpart = t3lib_parsehtml::substituteMarkerArray(
$imVersion5Subpart,
$regularModeMarkers,
'###|###',
......
// IM Path
if (is_array($fA['im_path'])) {
// Get the subpart for ImageMagick path
$imPathSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMPATHSUBPART###');
$imPathSubpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###IMPATHSUBPART###');
$labelImPath = $this->setLabelValueArray($fA['im_path'], 1);
reset($labelImPath);
......
$regularModeMarkers['defaultImPath'] = (string) $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path'];
$regularModeMarkers['ImPath'] = (string) current($imPath);
// Fill the markers in the subpart
$imPathSubpart = $this->contentObject->substituteMarkerArray(
$imPathSubpart = t3lib_parsehtml::substituteMarkerArray(
$imPathSubpart,
$regularModeMarkers,
'###|###',
......
// IM Path LZW
if (is_array($fA['im_path_lzw'])) {
// Get the subpart for ImageMagick lzw path
$imPathLzwSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMPATHLZWSUBPART###');
$imPathLzwSubpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###IMPATHLZWSUBPART###');
// Get the subpart for ImageMagick lzw path dropdown options
$imPathOptionSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###IMPATHLZWOPTION###');
$imPathOptionSubpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###IMPATHLZWOPTION###');
$labelImPathLzw = $this->setLabelValueArray($fA['im_path_lzw'], 1);
reset($labelImPathLzw);
......
$imPathLzwMarker['selected'] = 'selected="selected"';
}
// Fill the markers in the subpart
$imPathLzwOptions[] = $this->contentObject->substituteMarkerArray(
$imPathLzwOptions[] = t3lib_parsehtml::substituteMarkerArray(
$imPathOptionSubpart,
$imPathLzwMarker,
'###|###',
......
);
}
// Substitute the subpart for ImageMagick lzw path dropdown options
$imPathLzwSubpart = $this->contentObject->substituteSubpart(
$imPathLzwSubpart = t3lib_parsehtml::substituteSubpart(
$imPathLzwSubpart,
'###IMPATHLZWOPTION###',
implode(chr(10), $imPathLzwOptions)
);
// Fill the markers in the subpart
$imPathLzwSubpart = $this->contentObject->substituteMarkerArray(
$imPathLzwSubpart = t3lib_parsehtml::substituteMarkerArray(
$imPathLzwSubpart,
$regularModeMarkers,
'###|###',
......
}
}
// Substitute the subpart for ImageMagick
$regularModeSubpart = $this->contentObject->substituteSubpart(
$regularModeSubpart = t3lib_parsehtml::substituteSubpart(
$regularModeSubpart,
'###IMAGEMAGICKSUBPART###',
$imageMagickSubpart
);
// Substitute the subpart for ImageMagick Combine filename
$regularModeSubpart = $this->contentObject->substituteSubpart(
$regularModeSubpart = t3lib_parsehtml::substituteSubpart(
$regularModeSubpart,
'###IMCOMBINEFILENAMESUBPART###',
$imCombineFileNameSubpart
);
// Substitute the subpart for ImageMagick Version 5
$regularModeSubpart = $this->contentObject->substituteSubpart(
$regularModeSubpart = t3lib_parsehtml::substituteSubpart(
$regularModeSubpart,
'###IMVERSION5SUBPART###',
$imVersion5Subpart
);
// Substitute the subpart for ImageMagick path
$regularModeSubpart = $this->contentObject->substituteSubpart(
$regularModeSubpart = t3lib_parsehtml::substituteSubpart(
$regularModeSubpart,
'###IMPATHSUBPART###',
$imPathSubpart
);
// Substitute the subpart for ImageMagick lzw path
$regularModeSubpart = $this->contentObject->substituteSubpart(
$regularModeSubpart = t3lib_parsehtml::substituteSubpart(
$regularModeSubpart,
'###IMPATHLZWSUBPART###',
$imPathLzwSubpart
......
// TrueType Font dpi
// Get the subpart for TrueType dpi
$ttfDpiSubpart = $this->contentObject->getSubpart($regularModeSubpart, '###TTFDPISUBPART###');
$ttfDpiSubpart = t3lib_parsehtml::getSubpart($regularModeSubpart, '###TTFDPISUBPART###');
// Define the markers content
$regularModeMarkers['labelTtfDpi'] = '[GFX][TTFdpi]=';
$regularModeMarkers['ttfDpi'] = htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi']);
// Fill the markers in the subpart
$ttfDpiSubpart = $this->contentObject->substituteMarkerArray(
$ttfDpiSubpart = t3lib_parsehtml::substituteMarkerArray(
$ttfDpiSubpart,
$regularModeMarkers,
'###|###',
......
1
);
// Substitute the subpart for TrueType dpi
$regularModeSubpart = $this->contentObject->substituteSubpart(
$regularModeSubpart = t3lib_parsehtml::substituteSubpart(
$regularModeSubpart,
'###TTFDPISUBPART###',
$ttfDpiSubpart
);
// Fill the markers in the regular mode subpart
$regularModeSubpart = $this->contentObject->substituteMarkerArray(
$regularModeSubpart = t3lib_parsehtml::substituteMarkerArray(
$regularModeSubpart,
$regularModeMarkers,
'###|###',
......
$formMarkers['labelNotice'] = 'NOTICE:';
$formMarkers['labelCommentUpdateLocalConf'] = 'By clicking this button, localconf.php is updated with new values for the parameters listed above!';
// Substitute the subpart for regular mode
$form = $this->contentObject->substituteSubpart(
$form = t3lib_parsehtml::substituteSubpart(
$form,
'###REGULARMODE###',
$regularModeSubpart
);
// Fill the markers
$out = $this->contentObject->substituteMarkerArray(
$out = t3lib_parsehtml::substituteMarkerArray(
$form,
$formMarkers,
'###|###',
......
switch($returnVal) {
case 'continue':
// Get the template part from the file
$template = $this->contentObject->getSubpart($templateFile, '###CONTINUE###');
$template = t3lib_parsehtml::getSubpart($templateFile, '###CONTINUE###');
// Get the subpart for messages
$messagesSubPart = $this->contentObject->getSubpart($template, '###MESSAGES###');
$messagesSubPart = t3lib_parsehtml::getSubpart($template, '###MESSAGES###');
$messages = array();
......
// Define the markers content
$messagesMarkers['message'] = $message;
// Fill the markers in the subpart
$messages[] = $this->contentObject->substituteMarkerArray(
$messages[] = t3lib_parsehtml::substituteMarkerArray(
$messagesSubPart,
$messagesMarkers,
'###|###',
......
);
}
// Substitute the subpart for messages
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$template,
'###MESSAGES###',
implode(chr(10), $messages)
......
'label' => 'Click to continue...'
);
// Fill the markers
$content = $this->contentObject->substituteMarkerArray(
$content = t3lib_parsehtml::substituteMarkerArray(
$content,
$markers,
'###|###',
......
break;
case 'nochange':
// Get the template part from the file
$template = $this->contentObject->getSubpart($templateFile, '###NOCHANGE###');
$template = t3lib_parsehtml::getSubpart($templateFile, '###NOCHANGE###');
// Define the markers content
$markers = array(
'header' => 'Writing to \'localconf.php\'',
......
'label' => 'Click to continue...'
);
// Fill the markers
$content = $this->contentObject->substituteMarkerArray(
$content = t3lib_parsehtml::substituteMarkerArray(
$template,
$markers,
'###|###',
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'DisplayTwinImage.html');
// Get the template part from the file
$template = $this->contentObject->getSubpart($templateFile, '###TEMPLATE###');
$template = t3lib_parsehtml::getSubpart($templateFile, '###TEMPLATE###');
$content = '';
$errorLevels=array(-1);
if ($imageFile) {
// Get the subpart for the images
$imageSubpart = $this->contentObject->getSubpart($template, '###IMAGE###');
$imageSubpart = t3lib_parsehtml::getSubpart($template, '###IMAGE###');
$verifyFile = t3lib_extMgm::extPath('install').'verify_imgs/'.basename($imageFile);
$destImg = @getImageSize($imageFile);
$destImgCode ='<img src="'.$this->backPath.'../'.substr($imageFile,strlen(PATH_site)).'" '.$destImg[3].'>';
......
// Display a warning if the generated image is more than 2KB larger than its reference...
if (($destImg['filesize']!=$verifyImg['filesize']) && (intval($destImg['filesize']) && ($destImg['filesize']-$verifyImg['filesize']) > 2048)) {
// Get the subpart for the different filesize message
$differentFileSizeSubpart = $this->contentObject->getSubpart($imageSubpart, '###DIFFERENTFILESIZE###');
$differentFileSizeSubpart = t3lib_parsehtml::getSubpart($imageSubpart, '###DIFFERENTFILESIZE###');
// Define the markers content
$differentFileSizeMarkers = array(
'message' => 'File size is very different from reference',
......
'referenceFileSize' => $verifyImg['filesize']
);
// Fill the markers in the subpart
$differentFileSizeSubpart = $this->contentObject->substituteMarkerArray(
$differentFileSizeSubpart = t3lib_parsehtml::substituteMarkerArray(
$differentFileSizeSubpart,
$differentFileSizeMarkers,
'###|###',
......
$errorLevels[]=2;
}
// Substitute the subpart for different filesize message
$imageSubpart = $this->contentObject->substituteSubpart(
$imageSubpart = t3lib_parsehtml::substituteSubpart(
$imageSubpart,
'###DIFFERENTFILESIZE###',
$differentFileSizeSubpart
......
if ($destImg[0]!=$verifyImg[0] || $destImg[1]!=$verifyImg[1]) {
// Get the subpart for the different pixel dimensions message
$differentPixelDimensionsSubpart = $this->contentObject->getSubpart($imageSubpart, '###DIFFERENTPIXELDIMENSIONS###');
$differentPixelDimensionsSubpart = t3lib_parsehtml::getSubpart($imageSubpart, '###DIFFERENTPIXELDIMENSIONS###');
// Define the markers content
$differentPixelDimensionsMarkers = array(
'message' => 'Pixel dimension are not equal!'
);
// Fill the markers in the subpart
$differentPixelDimensionsSubpart = $this->contentObject->substituteMarkerArray(
$differentPixelDimensionsSubpart = t3lib_parsehtml::substituteMarkerArray(
$differentPixelDimensionsSubpart,
$differentPixelDimensionsMarkers,
'###|###',
......
$errorLevels[]=2;
}
// Substitute the subpart for different pixel dimensions message
$imageSubpart = $this->contentObject->substituteSubpart(
$imageSubpart = t3lib_parsehtml::substituteSubpart(
$imageSubpart,
'###DIFFERENTPIXELDIMENSIONS###',
$differentPixelDimensionsSubpart
......
if ($note) {
// Get the subpart for the note
$noteSubpart = $this->contentObject->getSubpart($imageSubpart, '###NOTE###');
$noteSubpart = t3lib_parsehtml::getSubpart($imageSubpart, '###NOTE###');
// Define the markers content
$noteMarkers = array(
'message' => $note[0],
'label' => $note[1]
);
// Fill the markers in the subpart
$noteSubpart = $this->contentObject->substituteMarkerArray(
$noteSubpart = t3lib_parsehtml::substituteMarkerArray(
$noteSubpart,
$noteMarkers,
'###|###',
......
);
}
// Substitute the subpart for the note
$imageSubpart = $this->contentObject->substituteSubpart(
$imageSubpart = t3lib_parsehtml::substituteSubpart(
$imageSubpart,
'###NOTE###',
$noteSubpart
......
if ($this->dumpImCommands && count($IMcommands)) {
$commands = $this->formatImCmds($IMcommands);
// Get the subpart for the ImageMagick commands
$imCommandsSubpart = $this->contentObject->getSubpart($imageSubpart, '###IMCOMMANDS###');
$imCommandsSubpart = t3lib_parsehtml::getSubpart($imageSubpart, '###IMCOMMANDS###');
// Define the markers content
$imCommandsMarkers = array(
'message' => 'ImageMagick commands executed:',
......
'commands' => htmlspecialchars(implode($commands, chr(10)))
);
// Fill the markers in the subpart
$imCommandsSubpart = $this->contentObject->substituteMarkerArray(
$imCommandsSubpart = t3lib_parsehtml::substituteMarkerArray(
$imCommandsSubpart,
$imCommandsMarkers,
'###|###',
......
);
}
// Substitute the subpart for the ImageMagick commands
$imageSubpart = $this->contentObject->substituteSubpart(
$imageSubpart = t3lib_parsehtml::substituteSubpart(
$imageSubpart,
'###IMCOMMANDS###',
$imCommandsSubpart
);
// Fill the markers
$imageSubpart = $this->contentObject->substituteMarkerArray(
$imageSubpart = t3lib_parsehtml::substituteMarkerArray(
$imageSubpart,
$imageMarkers,
'###|###',
......
} else {
// Get the subpart when no image has been generated
$noImageSubpart = $this->contentObject->getSubpart($template, '###NOIMAGE###');
$noImageSubpart = t3lib_parsehtml::getSubpart($template, '###NOIMAGE###');
$commands = $this->formatImCmds($IMcommands);
if (count($commands)) {
// Get the subpart for the ImageMagick commands
$commandsSubpart = $this->contentObject->getSubpart($noImageSubpart, '###COMMANDSAVAILABLE###');
$commandsSubpart = t3lib_parsehtml::getSubpart($noImageSubpart, '###COMMANDSAVAILABLE###');
// Define the markers content
$commandsMarkers = array(
'rows' => t3lib_div::intInRange(count($commands), 2, 10),
'commands' => htmlspecialchars(implode($commands, chr(10)))
);
// Fill the markers in the subpart
$commandsSubpart = $this->contentObject->substituteMarkerArray(
$commandsSubpart = t3lib_parsehtml::substituteMarkerArray(
$commandsSubpart,
$commandsMarkers,
'###|###',
......
);
}
// Substitute the subpart for the ImageMagick commands
$noImageSubpart = $this->contentObject->substituteSubpart(
$noImageSubpart = t3lib_parsehtml::substituteSubpart(
$noImageSubpart,
'###COMMANDSAVAILABLE###',
$commandsSubpart
......
'label' => 'Below there\'s a dump of the ImageMagick commands executed:'
);
// Fill the markers
$noImageSubpart = $this->contentObject->substituteMarkerArray(
$noImageSubpart = t3lib_parsehtml::substituteMarkerArray(
$noImageSubpart,
$noImageMarkers,
'###|###',
......
$errorLevels[]=3;
}
// Substitute the subpart when image has been generated
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$template,
'###IMAGE###',
$imageSubpart
);
// Substitute the subpart when no image has been generated
$content = $this->contentObject->substituteSubpart(
$content = t3lib_parsehtml::substituteSubpart(
$content,
'###NOIMAGE###',
$noImageSubpart
......
// Get the template file
$template = @file_get_contents(PATH_site . $this->templateFilePath . 'ImageMenu.html');
// Get the subpart for the menu
$menuSubPart = $this->contentObject->getSubpart($template, '###MENU###');
$menuSubPart = t3lib_parsehtml::getSubpart($template, '###MENU###');
// Get the subpart for the single item in the menu
$menuItemSubPart = $this->contentObject->getSubpart($menuSubPart, '###MENUITEM###');
$menuItemSubPart = t3lib_parsehtml::getSubpart($menuSubPart, '###MENUITEM###');
$menuitems = array(
'read' => 'Reading image formats',
......
'item' => $v
);
// Fill the markers in the subpart
$items[] = $this->contentObject->substituteMarkerArray(
$items[] = t3lib_parsehtml::substituteMarkerArray(
$menuItemSubPart,
$markers,
'###|###',
......
);
}
// Substitute the subpart for the single item in the menu
$menuSubPart = $this->contentObject->substituteSubpart(
$menuSubPart = t3lib_parsehtml::substituteSubpart(
$menuSubPart,
'###MENUITEM###',
implode(chr(10), $items)
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckTheDatabaseMenu.html');
// Get the template part from the file
$menu = $this->contentObject->getSubpart($templateFile, '###MENU###');
$menu = t3lib_parsehtml::getSubpart($templateFile, '###MENU###');
$menuMarkers = array(
'action' => $this->action,
......
'clearTables' => 'Clear tables'
);
// Get the subpart for extra SQL
$extraSql = $this->contentObject->getSubpart($menu, '###EXTRASQL###');
$extraSql = t3lib_parsehtml::getSubpart($menu, '###EXTRASQL###');
$directJump='';
$extraSqlFiles = array();
......
'view' => 'VIEW'
);
// Fill the markers in the subpart
$extraSqlFiles[] = $this->contentObject->substituteMarkerArray(
$extraSqlFiles[] = t3lib_parsehtml::substituteMarkerArray(
$extraSql,
$extraSqlMarkers,
'###|###',
......
);
}
// Substitute the subpart for extra SQL
$menu = $this->contentObject->substituteSubpart(
$menu = t3lib_parsehtml::substituteSubpart(
$menu,
'###EXTRASQL###',
implode(chr(10), $extraSqlFiles)
);
// Fill the markers
$menu = $this->contentObject->substituteMarkerArray(
$menu = t3lib_parsehtml::substituteMarkerArray(
$menu,
$menuMarkers,
'###|###',
......
// Get the template file
$templateFile = @file_get_contents(PATH_site . $this->templateFilePath . 'CheckTheDatabaseImport.html');
// Get the template part from the file
$content = $this->contentObject->getSubpart($templateFile, '###IMPORT###');
$content = t3lib_parsehtml::getSubpart($templateFile, '###IMPORT###');
if ($this->mode!='123') {
$tables = array();
// Get the subpart for regular mode
$regularModeSubpart = $this->contentObject->getSubpart($content, '###REGULARMODE###');
$regularModeSubpart = t3lib_parsehtml::getSubpart($content, '###REGULARMODE###');
foreach ($statements_table as $table => $definition) {
// Get the subpart for rows
$tableSubpart = $this->contentObject->getSubpart($content, '###ROWS###');
$tableSubpart = t3lib_parsehtml::getSubpart($content, '###ROWS###');
// Fill the 'table exists' part when it exists
$exist=isset($whichTables[$table]);
if ($exist) {
// Get the subpart for table exists
$existSubpart = $this->contentObject->getSubpart($tableSubpart, '###EXIST###');
$existSubpart = t3lib_parsehtml::getSubpart($tableSubpart, '###EXIST###');
// Define the markers content
$existMarkers = array (
'tableExists' => 'Table exists!',
'backPath' => $this->backPath
);
// Fill the markers in the subpart
$existSubpart = $this->contentObject->substituteMarkerArray(
$existSubpart = t3lib_parsehtml::substituteMarkerArray(
$existSubpart,
$existMarkers,
'###|###',
......
);
}
// Substitute the subpart for table exists
$tableHtml = $this->contentObject->substituteSubpart(
$tableHtml = t3lib_parsehtml::substituteSubpart(
$tableSubpart,
'###EXIST###',
$existSubpart
......
'backPath' => $this->backPath
);
// Fill the markers
$tables[] = $this->contentObject->substituteMarkerArray(
$tables[] = t3lib_parsehtml::substituteMarkerArray(
$tableHtml,
$tableMarkers,
'###|###',
......
);
}
// Substitute the subpart for the rows
$regularModeSubpart = $this->contentObject->substituteSubpart(
... This diff was truncated because it exceeds the maximum size that can be displayed.
    (1-1/1)