if ($webId == "-1") { // Update all foreach (Website::getAllWebsites() as $site) { echoSite($site); } } else { // Update single site QueryBuilder::create(SQL::getConnection())->withQuery("SELECT display_name, folder_name FROM websites WHERE id = ?")->withParam($webId, QueryBuilder::PARAM_TYPE_INT)->build()->forEachResult(function ($row) { $site = new Website(0, $row['display_name'], $row['folder_name']); echoSite($site); }); } } else { function echoStart(Startables $starter) { echo $starter->getName() . ":\r\n"; echo $starter->start() . "\r\n"; } $webId = $_GET['start-id']; /*if ($webId == "-1") { // Update all foreach (Website::getAllWebsites() as $site) { echoSite($site); } } else {*/ // Update single site QueryBuilder::create(SQL::getConnection())->withQuery("SELECT display_name, folder_name, executable FROM websites WHERE id = ?")->withParam($webId, QueryBuilder::PARAM_TYPE_INT)->build()->forEachResult(function ($row) { $starter = new Startables(0, $row['display_name'], $row['folder_name']); echoStart($starter); }); }
$modstate->active = 1; $db->insertObject($modstate, "modstate"); } if ($db->tableIsEmpty("section")) { $section = null; $section->name = "Home"; $section->public = 1; $section->active = 1; $section->rank = 0; $section->parent = 0; $sid = $db->insertObject($section, "section"); } echoSuccess(); } if ($passed) { echoStart("Saving Configuration"); $values = array("c" => $config, "opts" => array(), "configname" => "Default", "activate" => 1); if (!defined("SYS_CONFIG")) { require_once BASE . "subsystems/config.php"; } pathos_config_saveConfiguration($values); // ERROR CHECKING echoSuccess(); } ?> </table> <?php if ($passed) { // Do some final cleanup foreach ($db->getTables() as $t) { // FIX table prefix problem
} } if ($db->tableIsEmpty('section')) { $section = null; $section->name = gt('Home'); //FIXME not sure if we should do this? $section->public = 1; $section->active = 1; $section->rank = 0; $section->parent = 0; $sid = $db->insertObject($section, 'section'); } echoSuccess(); } if ($passed) { echoStart(gt('Saving Configuration')); $config = $_POST['sc']; foreach ($config as $key => $value) { expSettings::change($key, addslashes($value)); } // version tracking $db->delete('version', 1); // clear table of old accumulated entries // $version = EXPONENT_VERSION_MAJOR.'.'.EXPONENT_VERSION_MINOR.'.'.EXPONENT_VERSION_REVISION.'-'.EXPONENT_VERSION_TYPE.''.EXPONENT_VERSION_ITERATION; $vo = null; // $vo->version = EXPONENT_VERSION_MAJOR.'.'.EXPONENT_VERSION_MINOR.'.'.EXPONENT_VERSION_REVISION; $vo->type = EXPONENT_VERSION_TYPE; $vo->major = EXPONENT_VERSION_MAJOR; $vo->minor = EXPONENT_VERSION_MINOR; $vo->revision = EXPONENT_VERSION_REVISION; $vo->type = EXPONENT_VERSION_TYPE; $vo->iteration = EXPONENT_VERSION_ITERATION;
$modstate->active = 1; $db->insertObject($modstate, 'modstate'); } if ($db->tableIsEmpty('section')) { $section = null; $section->name = 'Home'; $section->public = 1; $section->active = 1; $section->rank = 0; $section->parent = 0; $sid = $db->insertObject($section, 'section'); } echoSuccess(); } if ($passed) { echoStart($i18n['saving_config']); $values = array('c' => $config, 'opts' => array(), 'configname' => 'Default', 'activate' => 1); if (!defined('SYS_CONFIG')) { include_once BASE . 'subsystems/config.php'; } exponent_config_saveConfiguration($values); // ERROR CHECKING echoSuccess(); } ?> </table> <?php if ($passed) { // Do some final cleanup foreach ($db->getTables() as $t) { // FIX table prefix problem