本文整理汇总了PHP中OOAddon::isInstalled方法的典型用法代码示例。如果您正苦于以下问题:PHP OOAddon::isInstalled方法的具体用法?PHP OOAddon::isInstalled怎么用?PHP OOAddon::isInstalled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OOAddon
的用法示例。
在下文中一共展示了OOAddon::isInstalled方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rex_uninstall_addon
function rex_uninstall_addon($addons, $addonname, $regenerate_addons = true)
{
global $REX, $I18N;
$state = true;
$uninstall_file = $REX['INCLUDE_PATH'] . "/addons/{$addonname}/uninstall.inc.php";
if (is_readable($uninstall_file)) {
include $uninstall_file;
// Wurde das "uninstall" Flag gesetzt, oder eine Fehlermeldung ausgegeben? Wenn ja, Abbruch
if (OOAddon::isInstalled($addonname) || !empty($REX['ADDON']['installmsg'][$addonname])) {
$state = $I18N->msg('addon_no_uninstall', $addonname) . '<br/>';
if (empty($REX['ADDON']['installmsg'][$addonname])) {
$state .= $I18N->msg('addon_no_reason');
} else {
$state .= $REX['ADDON']['installmsg'][$addonname];
}
} else {
$state = rex_deactivate_addon($addons, $addonname);
if ($state === true && $regenerate_addons) {
// regenerate Addons file
$state = rex_generateAddons($addons);
}
}
} else {
$state = $I18N->msg("addon_uninstall_not_found");
}
return $state;
}
示例2: rex_setup_addons
function rex_setup_addons($uninstallBefore = false, $installDump = true)
{
global $REX, $I18N;
require_once $REX['INCLUDE_PATH'] . '/functions/function_rex_addons.inc.php';
$state = true;
$addonErr = '';
$ADDONS = rex_read_addons_folder();
foreach ($REX['SYSTEM_ADDONS'] as $systemAddon) {
if ($state === true && $uninstallBefore) {
$state = rex_uninstall_addon($ADDONS, $systemAddon);
}
if ($state === true && !OOAddon::isInstalled($systemAddon)) {
$state = rex_install_addon($ADDONS, $systemAddon, $installDump);
}
if ($state === true && !OOAddon::isActivated($systemAddon)) {
$state = rex_activate_addon($ADDONS, $systemAddon);
}
if ($state !== true) {
$addonErr .= '<li>' . $systemAddon . '<ul><li>' . $state . '</li></ul></li>';
}
}
if ($addonErr != '') {
$addonErr = '<ul>
<li>
<h3>' . $I18N->msg('setup_011', '<span class="rex-error">', '</span>') . '</h3>
<ul>' . $addonErr . '</ul>
</li>
</ul>';
}
return $addonErr;
}
示例3: rex_generateAddons
/**
* Schreibt Addoneigenschaften in die Datei include/addons.inc.php
* @param array Array mit den Namen der Addons aus dem Verzeichnis addons/
*/
function rex_generateAddons($ADDONS, $debug = false)
{
global $REX;
natsort($ADDONS);
$content = "// --- DYN\n\n";
foreach ($ADDONS as $cur) {
if (!OOAddon::isInstalled($cur)) {
$REX['ADDON']['install'][$cur] = 0;
}
if (!OOAddon::isActivated($cur)) {
$REX['ADDON']['status'][$cur] = 0;
}
$content .= "\$REX['ADDON']['install']['{$cur}'] = " . $REX['ADDON']['install'][$cur] . ";\n" . "\$REX['ADDON']['status']['{$cur}'] = " . $REX['ADDON']['status'][$cur] . ";\n\n";
}
$content .= "// --- /DYN";
$file = $REX['INCLUDE_PATH'] . "/addons.inc.php";
// Sichergehen, dass die Datei existiert und beschreibbar ist
if (is_writable($file)) {
if (!($h = fopen($file, "r"))) {
return 'Konnte Datei "' . $file . '" nicht lesen';
}
$fcontent = fread($h, filesize($file));
$fcontent = ereg_replace("(\\/\\/.---.DYN.*\\/\\/.---.\\/DYN)", $content, $fcontent);
fclose($h);
if (!($h = fopen($file, "w+"))) {
return 'Konnte Datei "' . $file . '" nicht zum schreiben oeffnen';
}
//if (!fwrite($h, $fcontent, strlen($fcontent))) {
if (!fwrite($h, $fcontent, strlen($fcontent))) {
return 'Konnte Inhalt nicht in Datei "' . $file . '" schreiben';
}
fclose($h);
// alles ist gut gegangen
return true;
} else {
return 'Datei "' . $file . '" hat keine Schreibrechte';
}
}
示例4: rex_generateAddons
/**
* Schreibt Addoneigenschaften in die Datei include/addons.inc.php
*
* @param array Array mit den Namen der Addons aus dem Verzeichnis addons/
*
* @return TRUE bei Erfolg, sonst FALSE
*/
function rex_generateAddons($ADDONS)
{
global $REX;
natsort($ADDONS);
$content = '';
foreach ($ADDONS as $addon) {
if (!OOAddon::isInstalled($addon)) {
OOAddon::setProperty($addon, 'install', 0);
}
if (!OOAddon::isActivated($addon)) {
OOAddon::setProperty($addon, 'status', 0);
}
foreach (array('install', 'status') as $prop) {
$content .= sprintf("\$REX['ADDON']['%s']['%s'] = '%d';\n", $prop, $addon, OOAddon::getProperty($addon, $prop));
}
$content .= "\n";
}
// Da dieser Funktion öfter pro request aufgerufen werden kann,
// hier die caches löschen
clearstatcache();
$file = $REX['INCLUDE_PATH'] . '/addons.inc.php';
if (rex_replace_dynamic_contents($file, $content) === false) {
return 'Datei "' . $file . '" hat keine Schreibrechte';
}
return true;
}
示例5: rex_uninstall_addon
function rex_uninstall_addon($addons, $addonname)
{
global $REX, $I18N;
$state = true;
$install_dir = $REX['INCLUDE_PATH'] . '/addons/' . $addonname;
$uninstall_file = $install_dir . '/uninstall.inc.php';
$uninstall_sql = $install_dir . '/uninstall.sql';
if (is_readable($uninstall_file)) {
require $uninstall_file;
// Wurde das "uninstall" Flag gesetzt, oder eine Fehlermeldung ausgegeben? Wenn ja, Abbruch
if (OOAddon::isInstalled($addonname) || !empty($REX['ADDON']['installmsg'][$addonname])) {
$state = $I18N->msg('addon_no_uninstall', $addonname) . '<br/>';
if (empty($REX['ADDON']['installmsg'][$addonname])) {
$state .= $I18N->msg('addon_no_reason');
} else {
$state .= $REX['ADDON']['installmsg'][$addonname];
}
} else {
$state = rex_deactivate_addon($addons, $addonname);
if ($state === true && is_readable($uninstall_sql)) {
$state = rex_install_dump($uninstall_sql);
if ($state !== true) {
$state = 'Error found in uninstall.sql:<br />' . $state;
}
}
if ($state === true) {
// regenerate Addons file
$state = rex_generateAddons($addons);
}
}
} else {
$state = $I18N->msg("addon_uninstall_not_found");
}
// Fehler beim uninstall -> Addon bleibt installiert
if ($state !== true) {
$REX['ADDON']['install'][$addonname] = 1;
}
return $state;
}
示例6: foreach
foreach ($ADDONS as $cur) {
if (OOAddon::isSystemAddon($cur)) {
$delete = $I18N->msg("addon_systemaddon");
} else {
$delete = '<a href="index.php?page=addon&addonname=' . $cur . '&delete=1" onclick="return confirm(\'' . htmlspecialchars($I18N->msg('addon_delete_question', $cur)) . '\');">' . $I18N->msg("addon_delete") . '</a>';
}
if (OOAddon::isInstalled($cur)) {
$install = $I18N->msg("addon_yes") . ' - <a href="index.php?page=addon&addonname=' . $cur . '&install=1">' . $I18N->msg("addon_reinstall") . '</a>';
$uninstall = '<a href="index.php?page=addon&addonname=' . $cur . '&uninstall=1" onclick="return confirm(\'' . htmlspecialchars($I18N->msg("addon_uninstall_question", $cur)) . '\');">' . $I18N->msg("addon_uninstall") . '</a>';
} else {
$install = $I18N->msg("addon_no") . ' - <a href="index.php?page=addon&addonname=' . $cur . '&install=1">' . $I18N->msg("addon_install") . '</a>';
$uninstall = $I18N->msg("addon_notinstalled");
}
if (OOAddon::isActivated($cur)) {
$status = $I18N->msg("addon_yes") . ' - <a href="index.php?page=addon&addonname=' . $cur . '&activate=0">' . $I18N->msg("addon_deactivate") . '</a>';
} elseif (OOAddon::isInstalled($cur)) {
$status = $I18N->msg("addon_no") . ' - <a href="index.php?page=addon&addonname=' . $cur . '&activate=1">' . $I18N->msg("addon_activate") . '</a>';
} else {
$status = $I18N->msg("addon_notinstalled");
}
echo '
<tr>
<td class="rex-icon"><img src="media/addon.gif" alt="' . htmlspecialchars($cur) . '" title="' . htmlspecialchars($cur) . '"/></td>
<td>' . htmlspecialchars($cur) . ' [<a href="index.php?page=addon&spage=help&addonname=' . $cur . '">?</a>]</td>
<td>' . $install . '</td>
<td>' . $status . '</td>
<td>' . $uninstall . '</td>
<td>' . $delete . '</td>
</tr>' . "\n ";
}
echo '</tbody>
示例7: foreach
$this_REX = $REX['VERSION'] . '.' . $REX['SUBVERSION'] . '.' . ($REX['MINORVERSION'] = "1");
if (version_compare($this_REX, $requiered_REX, '<')) {
$REX['ADDON']['installmsg'][$mypage] = 'Dieses Addon benötigt Redaxo Version ' . $requiered_REX . ' oder höher.';
$REX['ADDON']['install'][$mypage] = 0;
$do_install = false;
}
// CHECK PHP VERSION
////////////////////////////////////////////////////////////////////////////////
if (intval(PHP_VERSION) < $requiered_PHP) {
$REX['ADDON']['installmsg'][$mypage] = 'Dieses Addon benötigt mind. PHP ' . $requiered_PHP . '!';
$REX['ADDON']['install'][$mypage] = 0;
$do_install = false;
}
// CHECK REQUIERED ADDONS
////////////////////////////////////////////////////////////////////////////////
foreach ($requiered_addons as $a) {
if (!OOAddon::isInstalled($a)) {
$REX['ADDON']['installmsg'][$mypage] = '<br />Addon "' . $a . '" ist nicht installiert. >>> <a href="index.php?page=addon&addonname=' . $a . '&install=1">jetzt installieren</a> <<<';
$do_install = false;
} else {
if (!OOAddon::isAvailable($a)) {
$REX['ADDON']['installmsg'][$mypage] = '<br />Addon "' . $a . '" ist nicht aktiviert. >>> <a href="index.php?page=addon&addonname=' . $a . '&activate=1">jetzt aktivieren</a> <<<';
$do_install = false;
}
}
}
// DO INSTALL
////////////////////////////////////////////////////////////////////////////////
if ($do_install) {
$REX['ADDON']['install'][$mypage] = 1;
}
示例8: isAvailable
function isAvailable($addon)
{
return OOAddon::isInstalled($addon) && OOAddon::isActivated($addon);
}
示例9: rex_generateAddons
/**
* Schreibt Addoneigenschaften in die Datei include/addons.inc.php
* @param array Array mit den Namen der Addons aus dem Verzeichnis addons/
*/
function rex_generateAddons($ADDONS, $debug = false)
{
global $REX;
natsort($ADDONS);
$content = "";
foreach ($ADDONS as $cur) {
if (!OOAddon::isInstalled($cur)) {
$REX['ADDON']['install'][$cur] = 0;
}
if (!OOAddon::isActivated($cur)) {
$REX['ADDON']['status'][$cur] = 0;
}
$content .= "\$REX['ADDON']['install']['{$cur}'] = " . $REX['ADDON']['install'][$cur] . ";\n" . "\$REX['ADDON']['status']['{$cur}'] = " . $REX['ADDON']['status'][$cur] . ";\n\n";
}
// Da dieser Funktion öfter pro request aufgerufen werden kann,
// hier die caches löschen
clearstatcache();
$file = $REX['INCLUDE_PATH'] . "/addons.inc.php";
if (!rex_replace_dynamic_contents($file, $content)) {
return 'Datei "' . $file . '" hat keine Schreibrechte';
}
return true;
}
示例10: confirm
}
if (OOAddon::isInstalled($addon)) {
$install = $I18N->msg('addon_yes') . ' - <a href="' . $addonurl . 'install=1">' . $I18N->msg('addon_reinstall') . '</a>';
if (count(OOPlugin::getInstalledPlugins($addon)) > 0) {
$uninstall = $I18N->msg('plugin_plugins_installed');
$delete = $I18N->msg('plugin_plugins_installed');
} else {
$uninstall = '<a href="' . $addonurl . 'uninstall=1" onclick="return confirm(\'' . htmlspecialchars($I18N->msg('addon_uninstall_question', $addon)) . '\');">' . $I18N->msg('addon_uninstall') . '</a>';
}
} else {
$install = $I18N->msg('addon_no') . ' - <a href="' . $addonurl . 'install=1">' . $I18N->msg('addon_install') . '</a>';
$uninstall = $I18N->msg('addon_notinstalled');
}
if (OOAddon::isActivated($addon)) {
$status = $I18N->msg('addon_yes') . ' - <a href="' . $addonurl . 'activate=0">' . $I18N->msg('addon_deactivate') . '</a>';
} elseif (OOAddon::isInstalled($addon)) {
$status = $I18N->msg('addon_no') . ' - <a href="' . $addonurl . 'activate=1">' . $I18N->msg('addon_activate') . '</a>';
} else {
$status = $I18N->msg('addon_notinstalled');
}
echo '
<tr class="rex-addon">
<td class="rex-icon rex-col-a"><span class="rex-i-element rex-i-addon"><span class="rex-i-element-text">' . htmlspecialchars($addon) . '</span></span></td>
<td class="rex-col-b">' . htmlspecialchars($addon) . ' [<a href="index.php?page=addon&subpage=help&addonname=' . $addon . '">?</a>]</td>
<td class="rex-col-c">' . $install . '</td>
<td class="rex-col-d">' . $status . '</td>
<td class="rex-col-e">' . $uninstall . '</td>
<td class="rex-col-f">' . $delete . '</td>
</tr>' . "\n ";
if (OOAddon::isAvailable($addon)) {
foreach ($PLUGINS[$addon] as $plugin) {
示例11: array
$myself = 'seo42';
$myroot = $REX['INCLUDE_PATH'] . '/addons/' . $myself;
$error = array();
// append lang file
$I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/seo42/lang/');
// includes
require_once $REX['INCLUDE_PATH'] . '/addons/seo42/classes/class.seo42_utils.inc.php';
// check redaxo version
if (version_compare($REX['VERSION'] . '.' . $REX['SUBVERSION'] . '.' . $REX['MINORVERSION'], '4.4.1', '<=')) {
$error[] = $I18N->msg('seo42_install_rex_version');
}
// check for concurrent addons
$disable_addons = array('url_rewrite', 'yrewrite', 'rexseo', 'rexseo42', 'resource_includer');
foreach ($disable_addons as $a) {
if (OOAddon::isInstalled($a) || OOAddon::isAvailable($a)) {
$error[] = $I18N->msg('seo42_install_concurrent') . ' ' . $a;
}
}
// auto install plugins
$returnmsg = seo42_utils::autoInstallPlugins('seo42', array());
// no plugins yet to auto install
if ($returnmsg != '') {
$error[] = $returnmsg;
}
// setup seo db fields
if (count($error) == 0) {
$sql = new rex_sql();
//$sql->debugsql = true;
// IMPORTANT: if adding/removing db fields here, check also for uninstall.inc.php and seo42_utils::afterDBImport() and seo42::emptySEODataAfterClangAdded()
$sql->setQuery('ALTER TABLE `' . $REX['TABLE_PREFIX'] . 'article` ADD `seo_title` TEXT, ADD `seo_description` TEXT, ADD `seo_keywords` TEXT, ADD `seo_custom_url` TEXT, ADD `seo_canonical_url` TEXT, ADD `seo_noindex` VARCHAR(1), ADD `seo_ignore_prefix` VARCHAR(1)');
示例12: foreach
$_SESSION['addonsAsObject'] = $getAddons;
} else {
// Keine erneute Abfrage an Redaxo.de stellen
// Array bereits in Session gespeichert
}
//print_r($result);
//print_r($_SESSION['addonsAsObject']);
if (is_array($_SESSION['addonsAsArray'])) {
foreach (Installer_group_addons_by_id($_SESSION['addonsAsArray']) as $key => $addon) {
// Damit nur die neueste Version in der Liste erscheint, müssen wir hier
// noch mal eine Sortierungsfunktion aufrufen
usort($addon, "cmp");
$addon_status = '';
if (OOAddon::isAvailable($addon[0]['addon_key'])) {
$addon_status = '<img src="media/addons/installer/play.gif" title="Installert und aktiviert" alt="Installiert und aktiviert" />';
} elseif (OOAddon::isInstalled($addon[0]['addon_key']) && !OOAddon::isActivated($addon[0]['addon_key'])) {
$addon_status = '<img src="media/addons/installer/pause.gif" title="Installiert, jedoch nicht aktiviert" alt="Nicht aktiviert" />';
} elseif (Installer_check_if_addon_exists($REX['INCLUDE_PATH'] . "/addons/" . $addon[0]['addon_key'])) {
$addon_status = '<img src="media/addons/installer/on_server.gif" title="Im AddOn Ordner vorhanden" alt="Im AddOn Ordner vorhanden" />';
} else {
$addon_status = '<img src="media/addons/installer/addon.gif" title="Nicht auf Server vorhanden" alt="Nicht auf dem Server" />';
}
if (OOAddon::isAvailable($addon[0]['addon_key']) && !OOAddon::getVersion($addon[0]['addon_key'])) {
$systemVersion = '<img src="media/addons/installer/no_version.gif" title="Versionsangabe in der config.inc.php fehlt" alt="Versionsangabe in der config.inc.php fehlt" />';
} elseif (!OOAddon::isAvailable($addon[0]['addon_key'])) {
$systemVersion = '-';
} else {
$systemVersion = OOAddon::getVersion($addon[0]['addon_key']);
}
$updateAvailable = "";
if (checkAddonVersion(OOAddon::getVersion($addon[0]['addon_key']), $addon[0]['file_version'])) {
示例13: createWebsite
//.........这里部分代码省略.........
rex_website_manager_utils::logQuery($log, $sql, 'CREATE VIEW ' . $tablePrefix . 'template AS SELECT * FROM rex_template');
} else {
// different
rex_website_manager_utils::logQuery($log, $sql, 'CREATE TABLE `' . $tablePrefix . 'template` ( `id` int(11) NOT NULL auto_increment, `label` varchar(255) NULL , `name` varchar(255) NULL , `content` text NULL , `active` tinyint(1) NULL , `createuser` varchar(255) NOT NULL , `updateuser` varchar(255) NOT NULL , `createdate` int(11) NOT NULL , `updatedate` int(11) NOT NULL , `attributes` text NULL , `revision` int(11) NOT NULL , PRIMARY KEY (`id`)) ENGINE=MyISAM;');
}
// meta infos
if ($REX['WEBSITE_MANAGER_SETTINGS']['identical_meta_infos']) {
// identical
rex_website_manager_utils::logQuery($log, $sql, 'CREATE VIEW ' . $tablePrefix . '62_type AS SELECT * FROM rex_62_type');
rex_website_manager_utils::logQuery($log, $sql, 'CREATE VIEW ' . $tablePrefix . '62_params AS SELECT * FROM rex_62_params');
} else {
// different (addon will be reinstalled)
if (!in_array('metainfo', $REX['WEBSITE_MANAGER_SETTINGS']['reinstall_addons'])) {
$REX['WEBSITE_MANAGER_SETTINGS']['reinstall_addons'][] = 'metainfo';
}
}
// image types
if ($REX['WEBSITE_MANAGER_SETTINGS']['identical_image_types']) {
// identical
rex_website_manager_utils::logQuery($log, $sql, 'CREATE VIEW ' . $tablePrefix . '679_types AS SELECT * FROM rex_679_types');
rex_website_manager_utils::logQuery($log, $sql, 'CREATE VIEW ' . $tablePrefix . '679_type_effects AS SELECT * FROM rex_679_type_effects');
} else {
// different (addon will be reinstalled)
if (!in_array('image_manager', $REX['WEBSITE_MANAGER_SETTINGS']['reinstall_addons'])) {
$REX['WEBSITE_MANAGER_SETTINGS']['reinstall_addons'][] = 'image_manager';
}
}
// ***************************************************************************************************
// directories
// ***************************************************************************************************
$includePath = realpath($REX['HTDOCS_PATH'] . 'redaxo/include/') . DIRECTORY_SEPARATOR;
$htdocsPath = realpath($REX['HTDOCS_PATH']) . DIRECTORY_SEPARATOR;
rex_website_manager_utils::logMkDir($log, $includePath . $generatedDir);
rex_website_manager_utils::logMkDir($log, $includePath . $generatedDir . '/articles');
rex_website_manager_utils::logMkDir($log, $includePath . $generatedDir . '/files');
rex_website_manager_utils::logMkDir($log, $includePath . $generatedDir . '/templates');
if (!$REX['WEBSITE_MANAGER_SETTINGS']['identical_media']) {
rex_website_manager_utils::logMkDir($log, $htdocsPath . $mediaDir);
}
// ***************************************************************************************************
// addons/plugins
// ***************************************************************************************************
$reinstallAddons = $REX['WEBSITE_MANAGER_SETTINGS']['reinstall_addons'];
$reinstallPlugins = $REX['WEBSITE_MANAGER_SETTINGS']['reinstall_plugins'];
// set stuff for new website
$REX['TABLE_PREFIX'] = $tablePrefix;
$REX['GENERATED_PATH'] = realpath($REX['HTDOCS_PATH'] . 'redaxo/include/' . $generatedDir);
// reinstall addons
for ($curAddonCount = 0; $curAddonCount < count($reinstallAddons); $curAddonCount++) {
if (OOAddon::isInstalled($reinstallAddons[$curAddonCount])) {
require_once $REX['INCLUDE_PATH'] . '/addons/' . $reinstallAddons[$curAddonCount] . '/install.inc.php';
$log->logInfo('[REINSTALL ADDON] ' . $reinstallAddons[$curAddonCount]);
$sqlFile = $REX['INCLUDE_PATH'] . '/addons/' . $reinstallAddons[$curAddonCount] . '/install.sql';
if (file_exists($sqlFile)) {
$returnValue = rex_install_dump($sqlFile);
if ($returnValue) {
$log->logInfo('[REINSTALL ADDON SQL DUMP] ' . $sqlFile);
} else {
$log->logError('[REINSTALL ADDON SQL DUMP] ' . $sqlFile);
}
}
} else {
$log->logError('[REINSTALL ADDON] ' . $reinstallAddons[$curAddonCount]);
}
}
// reinstall plugins
for ($curPluginCount = 0; $curPluginCount < count($reinstallPlugins); $curPluginCount++) {
$curAddon = '';
$curPlugin = '';
$reinstallPluginsArray = explode(WEBSITE_MANAGER_PLUGIN_DELIMITER, $reinstallPlugins[$curPluginCount]);
if (isset($reinstallPluginsArray[0])) {
$curAddon = $reinstallPluginsArray[0];
}
if (isset($reinstallPluginsArray[1])) {
$curPlugin = $reinstallPluginsArray[1];
}
if ($curAddon != '' && $curPlugin != '' && OOPlugin::isInstalled($curAddon, $curPlugin)) {
require_once $REX['INCLUDE_PATH'] . '/addons/' . $curAddon . '/plugins/' . $curPlugin . '/install.inc.php';
$log->logInfo('[REINSTALL PLUGIN] ' . $curPlugin);
$sqlFile = $REX['INCLUDE_PATH'] . '/addons/' . $curAddon . '/plugins/' . $curPlugin . '/install.sql';
if (file_exists($sqlFile)) {
$returnValue = rex_install_dump($sqlFile);
if ($returnValue) {
$log->logInfo('[REINSTALL PLUGIN SQL DUMP] ' . $sqlFile);
} else {
$log->logError('[REINSTALL PLUGIN SQL DUMP] ' . $sqlFile);
}
}
} else {
$log->logError('[REINSTALL PLUGIN] ' . $reinstallPlugins[$curPluginCount]);
}
}
// include custom php file with additional userdefined stuff
require_once WEBSITE_MANAGER_CUSTOM_DIR . 'create_website.after.inc.php';
// extension point
rex_register_extension_point('WEBSITE_AFTER_CREATED', array('website_id' => $websiteId, 'sql_object' => $sql, 'table_prefix' => $tablePrefix, 'generated_dir' => $generatedDir, 'media_dir' => $mediaDir, 'log_object' => $log));
// put back stuff for master website
$REX['TABLE_PREFIX'] = rex_website::tablePrefix;
$REX['GENERATED_PATH'] = realpath($REX['HTDOCS_PATH'] . 'redaxo/include/' . rex_website::generatedDir);
}
示例14:
$content .= '
<div class="rex-form-row">
<p class="rex-form-col-a rex-form-checkbox rex-form-label-right">
<input class="rex-form-checkbox" id="install-packages-upload-status" type="checkbox" name="upload[status]" value="1" ' . (!$new && $file['status'] ? 'checked="checked" ' : '') . '/>
<label for="install-packages-upload-status">' . $I18N->msg('install_online') . '</label>
</p>
</div>';
$content .= '
<div class="rex-form-row">
<p class="rex-form-col-a rex-form-checkbox rex-form-label-right">
' . $hiddenField . '
<input class="rex-form-checkbox" id="install-packages-upload-upload-file" type="checkbox" name="upload[upload_file]" value="1" ' . ($new ? 'checked="checked" ' : '') . $uploadCheckboxDisabled . '/>
<label for="install-packages-upload-upload-file">' . $I18N->msg('install_upload_file') . '</label>
</p>
</div>';
if (OOAddon::isInstalled($addonkey) && is_dir(rex_path::addonAssets($addonkey))) {
$content .= '
<div class="rex-form-row">
<p class="rex-form-col-a rex-form-checkbox rex-form-label-right">
<input class="rex-form-checkbox" id="install-packages-upload-replace-assets" type="checkbox" name="upload[replace_assets]" value="1" ' . ($new ? '' : 'disabled="disabled" ') . '/>
<label for="install-packages-upload-replace-assets">' . $I18N->msg('install_replace_assets') . '</label>
</p>
</div>';
}
if (is_dir(rex_path::addon($addonkey, 'tests'))) {
$content .= '
<div class="rex-form-row">
<p class="rex-form-col-a rex-form-checkbox rex-form-label-right">
<input class="rex-form-checkbox" id="install-packages-upload-ignore-tests" type="checkbox" name="upload[ignore_tests]" value="1" checked="checked"' . ($new ? '' : 'disabled="disabled" ') . '/>
<label for="install-packages-upload-ignore-tests">' . $I18N->msg('install_ignore_tests') . '</label>
</p>