includes/pageutils.php
changeset 240 f0149a27df5f
parent 238 a78537db2850
child 266 917dcc6c4ceb
equal deleted inserted replaced
239:0f1b353570a7 240:f0149a27df5f
  1411    
  1411    
  1412   function flushlogs($page_id, $namespace)
  1412   function flushlogs($page_id, $namespace)
  1413   {
  1413   {
  1414     global $db, $session, $paths, $template, $plugins; // Common objects
  1414     global $db, $session, $paths, $template, $plugins; // Common objects
  1415     global $lang;
  1415     global $lang;
       
  1416     if ( !is_object($lang) && defined('IN_ENANO_INSTALL') )
       
  1417     {
       
  1418       // This is a special exception for the Enano installer, which doesn't init languages yet.
       
  1419       $lang = new Language('eng');
       
  1420     }
  1416     if(!$session->get_permissions('clear_logs'))
  1421     if(!$session->get_permissions('clear_logs'))
  1417     {
  1422     {
  1418       return $lang->get('etc_access_denied');
  1423       return $lang->get('etc_access_denied');
  1419     }
  1424     }
  1420     $e = $db->sql_query('DELETE FROM ' . table_prefix.'logs WHERE page_id=\'' . $db->escape($page_id) . '\' AND namespace=\'' . $db->escape($namespace) . '\';');
  1425     $e = $db->sql_query('DELETE FROM ' . table_prefix.'logs WHERE page_id=\'' . $db->escape($page_id) . '\' AND namespace=\'' . $db->escape($namespace) . '\';');