本文整理匯總了PHP中Install::checkTableExists方法的典型用法代碼示例。如果您正苦於以下問題:PHP Install::checkTableExists方法的具體用法?PHP Install::checkTableExists怎麽用?PHP Install::checkTableExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Install
的用法示例。
在下文中一共展示了Install::checkTableExists方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
}
} elseif ($c_obj->getStatus() == 30) {
$error_message = TTi18n::gettext('Sorry, your company\'s account has been CANCELLED, please contact customer support if you believe this is an error');
}
}
$validator->isTrue('user_name', FALSE, $error_message);
}
break;
default:
Misc::redirectMobileBrowser();
//Redirect mobile browsers automatically. Don't do it if the submit button is pressed though.
if (DEPLOYMENT_ON_DEMAND == FALSE and isset($config_vars['other']['installer_enabled']) and $config_vars['other']['installer_enabled'] == TRUE) {
//Installer is enabled, check to see if any companies have been created, if not redirect to installer automatically, as they skipped it somehow.
//Check if Company table exists first, incase the installer hasn't run at all, this avoids a SQL error.
$install_obj = new Install();
if ($install_obj->checkTableExists('company') == TRUE) {
$clf = TTnew('CompanyListFactory');
$clf->getAll();
if ($clf->getRecordCount() == 0) {
Redirect::Page(URLBuilder::getURL(array('external_installer' => 1), 'install/install.php'));
}
} else {
Redirect::Page(URLBuilder::getURL(array('external_installer' => 1), 'install/install.php'));
}
}
break;
}
$smarty->assign_by_ref('user_name', $user_name);
$smarty->assign_by_ref('password', $password);
$smarty->assign_by_ref('password_reset', $password_reset);
$smarty->assign('language_options', TTi18n::getLanguageArray());
示例2: Install
*/
$smarty->assign('title', TTi18n::gettext($title = '3. Database Configuration'));
// See index.php
/*
* Get FORM variables
*/
extract(FormVariables::GetVariables(array('action', 'data', 'external_installer')));
$install_obj = new Install();
if ($install_obj->isInstallMode() == FALSE) {
Redirect::Page(URLBuilder::getURL(NULL, 'install.php'));
}
$database_engine = TRUE;
$install_obj->setDatabaseConnection($db);
//Default connection
if ($install_obj->checkDatabaseExists($config_vars['database']['database_name']) == TRUE) {
if ($install_obj->checkTableExists('system_setting') == TRUE) {
$install_obj->setIsUpgrade(TRUE);
//$upgrade = TRUE;
} else {
$install_obj->setIsUpgrade(FALSE);
//$upgrade = FALSE;
}
}
$action = Misc::findSubmitButton();
switch ($action) {
case 'install_schema':
//Need to create the tables after the database
//exists and Database.inc.php has made a connection.
//Otherwise we can't use objects yet.
//Debug::setVerbosity(11);
Debug::Text('Install Schema', __FILE__, __LINE__, __METHOD__, 10);