plugins/SpecialPageFuncs.php
changeset 156 6df5f7a55a30
parent 132 0ae1b281a884
child 181 9237767a23ae
equal deleted inserted replaced
155:edbff85d43e8 156:6df5f7a55a30
   149     $q = $db->sql_query('INSERT INTO '.table_prefix.'pages(name,urlname,namespace,delvote_ips) VALUES(\''.$name.'\', \''.$urlname.'\', \''.$_POST['namespace'].'\',\'' . $ips . '\');');
   149     $q = $db->sql_query('INSERT INTO '.table_prefix.'pages(name,urlname,namespace,delvote_ips) VALUES(\''.$name.'\', \''.$urlname.'\', \''.$_POST['namespace'].'\',\'' . $ips . '\');');
   150     if ( !$q )
   150     if ( !$q )
   151     {
   151     {
   152       $db->_die('The page entry could not be inserted.');
   152       $db->_die('The page entry could not be inserted.');
   153     }
   153     }
   154     $q = $db->sql_query('INSERT INTO '.table_prefix.'page_text(page_id,namespace,page_text) VALUES(\''.$urlname.'\', \''.$_POST['namespace'].'\', \''.$db->escape('Please edit this page! <nowiki><script type="text/javascript">ajaxEditor();</script></nowiki>').'\');');
   154     $q = $db->sql_query('INSERT INTO '.table_prefix.'page_text(page_id,namespace,page_text) VALUES(\''.$urlname.'\', \''.$_POST['namespace'].'\', \''.'\');');
   155     if ( !$q )
   155     if ( !$q )
   156     {
   156     {
   157       $db->_die('The page text entry could not be inserted.');
   157       $db->_die('The page text entry could not be inserted.');
   158     }
   158     }
   159     
   159     
   160     header('Location: '.makeUrlNS($_POST['namespace'], sanitize_page_id($p)));
   160     header('Location: '.makeUrlNS($_POST['namespace'], sanitize_page_id($p)) . '#do:edit');
   161     exit;
   161     exit;
   162   }
   162   }
   163   $template->header();
   163   $template->header();
   164   if ( !$session->get_permissions('create_page') )
   164   if ( !$session->get_permissions('create_page') )
   165   {
   165   {