567 |
571 |
568 function stg_set_version() |
572 function stg_set_version() |
569 { |
573 { |
570 global $db, $session, $paths, $template, $plugins; // Common objects |
574 global $db, $session, $paths, $template, $plugins; // Common objects |
571 // log the upgrade |
575 // log the upgrade |
|
576 global $db_version; |
572 $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,author_uid,page_text,edit_summary) VALUES' |
577 $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,author_uid,page_text,edit_summary) VALUES' |
573 . '(\'security\', \'upgrade_enano\', ' . time() . ', \'[DEPRECATED]\', \'' . $db->escape($session->username) . '\', ' . $session->user_id . ', \'' . $db->escape(installer_enano_version()) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');'); |
578 . '(\'security\', \'upgrade_enano\', ' . time() . ', \'[DEPRECATED]\', \'' . $db->escape($session->username) . '\', ' . $session->user_id . ', \'' . $db->escape($db_version) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');'); |
574 if ( !$q ) |
579 if ( !$q ) |
575 { |
580 { |
576 $db->_die(); |
581 $db->_die(); |
577 return false; |
582 return false; |
578 } |
583 } |
|
584 setConfig('db_version', $db_version); |
579 setConfig('enano_version', installer_enano_version()); |
585 setConfig('enano_version', installer_enano_version()); |
580 return true; |
586 setConfig('newly_upgraded', 1); |
581 } |
587 return true; |
|
588 } |