Esempio n. 1
0
             echo nl2br($e->getTraceAsString());
             exit;
         }
     }
     $ext = '';
     while ($mysqli->more_results()) {
         $mysqli->next_result();
         if ($mysqli->insert_id > 0) {
             $ext = $ext . ' ' . $mysqli->insert_id;
         }
     }
     echo "<li>LOADED student_help: " . $ext . "</li>\n";
 }
 $mysqli->commit();
 // 01/05/2013
 if (!$updater_utils->does_column_exist('users', 'password_expire')) {
     $updater_utils->execute_query("ALTER TABLE users ADD COLUMN password_expire int(11) unsigned", true);
 }
 // 02/05/2013 - Add password expire config file.
 $new_lines = array("\$cfg_password_expire = 30;    // Set in days\n");
 $target_line = '$authentication = array';
 $updater_utils->add_line($string, '$percent_decimals', $new_lines, 80, $cfg_web_root, $target_line, 7);
 // 09/05/2013 (brzsw) - Remove $protocol and insert $cfg_secure_connection
 $lines = array();
 $cfg = file($cfg_web_root . 'config/config.inc.php');
 $found = false;
 foreach ($cfg as $line) {
     if (strpos($line, '$protocol = ') !== false) {
         $lines[] = "\$cfg_secure_connection = true;    // If true site must be accessed via HTTPS\n";
         $found = true;
     } else {
Esempio n. 2
0
 $cfg_db_username = $configObject->get('cfg_db_username');
 $cfg_db_external_user = $configObject->get('cfg_db_external_user');
 $cfg_db_inv_username = $configObject->get('cfg_db_inv_user');
 $cfg_use_ldap = $configObject->get('cfg_use_ldap');
 $mysqli->autocommit(false);
 error_reporting(-1);
 ob_start();
 echo "<div>Starting at " . date("H:i:s") . "</div>";
 echo "\n<blockquote>\n<h1>" . $string['startingupdate'] . "</h1>\n<ol>";
 // 15/06/2011
 // Add index to improve performance for standards setting index page
 if (!$updater_utils->does_index_exist('ebel', 'SETTER_AND_DATE')) {
     $updater_utils->execute_query("ALTER TABLE ebel ADD INDEX SETTER_AND_DATE (setterID, date_set)", true);
 }
 // 16/06/2011
 if ($updater_utils->does_column_exist('log_late', 'year')) {
     $updater_utils->execute_query("ALTER TABLE log_late DROP COLUMN year", true);
     $updater_utils->execute_query("ALTER TABLE log_late DROP COLUMN student_grade", true);
     $updater_utils->execute_query("ALTER TABLE log_late DROP COLUMN ipaddress", true);
 }
 // 16/06/2011
 if (!$updater_utils->does_column_exist('sys_errors', 'fixed')) {
     $updater_utils->execute_query("ALTER TABLE sys_errors ADD COLUMN fixed datetime", true);
     $updater_utils->execute_query("ALTER TABLE sys_errors ADD COLUMN php_self text", true);
     $updater_utils->execute_query("ALTER TABLE sys_errors ADD COLUMN query_string text", true);
     $updater_utils->execute_query("ALTER TABLE sys_errors ADD COLUMN request_method enum('GET', 'HEAD', 'POST', 'PUT', 'DELETE')", true);
 }
 $mysqli->commit();
 // Get a list of reviews where group = 'Yes'
 $group_reviews = $mysqli->prepare("SELECT DISTINCT paperID FROM standards_setting WHERE group_review = 'Yes' AND paperID > 0");
 $group_reviews->execute();