plugins/SpecialPageFuncs.php
changeset 345 4ccdfeee9a11
parent 343 eefe9ab7fe7c
child 387 92664d2efab8
equal deleted inserted replaced
344:be6c5fdd9203 345:4ccdfeee9a11
   159     
   159     
   160     $perms = $session->fetch_page_acl($urlname, $namespace);
   160     $perms = $session->fetch_page_acl($urlname, $namespace);
   161     if ( !$perms->get_permissions('create_page') )
   161     if ( !$perms->get_permissions('create_page') )
   162       die_friendly($lang->get('pagetools_create_err_title'), '<p>An access control rule is preventing you from creating pages.</p>');
   162       die_friendly($lang->get('pagetools_create_err_title'), '<p>An access control rule is preventing you from creating pages.</p>');
   163     
   163     
   164     $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.time().', \''.date('d M Y h:i a').'\', \'page\', \'create\', \''.$session->username.'\', \''.$urlname.'\', \''.$_POST['namespace'].'\');');
   164     $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(time_id,date_string,log_type,action,author,page_id,namespace) VALUES('.time().', \''.enano_date('d M Y h:i a').'\', \'page\', \'create\', \''.$session->username.'\', \''.$urlname.'\', \''.$_POST['namespace'].'\');');
   165     if ( !$q )
   165     if ( !$q )
   166     {
   166     {
   167       $db->_die('The page log could not be updated.');
   167       $db->_die('The page log could not be updated.');
   168     }
   168     }
   169     
   169     
   331 
   331 
   332 function page_Special_SpecialPages()
   332 function page_Special_SpecialPages()
   333 {
   333 {
   334   // This should be an easy one
   334   // This should be an easy one
   335   global $db, $session, $paths, $template, $plugins; // Common objects
   335   global $db, $session, $paths, $template, $plugins; // Common objects
       
   336   global $lang;
       
   337   
   336   $template->header();
   338   $template->header();
   337   $sz = sizeof($paths->pages) / 2;
   339   $sz = sizeof($paths->pages) / 2;
   338   echo '<p>' . $lang->get('pagetools_specialpages_blurb') . '</p><div class="tblholder"><table border="0" width="100%" cellspacing="1" cellpadding="4">';
   340   echo '<p>' . $lang->get('pagetools_specialpages_blurb') . '</p><div class="tblholder"><table border="0" width="100%" cellspacing="1" cellpadding="4">';
   339   $cclass='row1';
   341   $cclass='row1';
   340   for ( $i = 0; $i < $sz; $i = $i)
   342   for ( $i = 0; $i < $sz; $i = $i)