install/includes/payload.php
changeset 627 460e483987ab
parent 626 be0e904eec17
child 685 17ebe24cdf85
equal deleted inserted replaced
626:be0e904eec17 627:460e483987ab
   472   return purge_all_caches();
   472   return purge_all_caches();
   473 }
   473 }
   474 
   474 
   475 function stg_set_version()
   475 function stg_set_version()
   476 {
   476 {
   477   global $db;
   477   global $db, $session, $paths, $template, $plugins; // Common objects
   478   // log the upgrade
   478   // log the upgrade
   479   $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES'
   479   $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES'
   480          . '(\'security\', \'upgrade_enano\', ' . time() . ', \'[DEPRECATED]\', \'' . $db->escape($session->username) . '\', \'' . $db->escape($this_version) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');');
   480          . '(\'security\', \'upgrade_enano\', ' . time() . ', \'[DEPRECATED]\', \'' . $db->escape($session->username) . '\', \'' . $db->escape(installer_enano_version()) . '\', \'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\');');
   481   if ( !$q )
   481   if ( !$q )
   482   {
   482   {
   483     $db->_die();
   483     $db->_die();
   484     return false;
   484     return false;
   485   }
   485   }