includes/pageprocess.php
changeset 878 ecc764c10138
parent 877 e9ee4e246f96
child 904 10076b28194b
equal deleted inserted replaced
875:0c3dd4c166c0 878:ecc764c10138
   461       return false;
   461       return false;
   462     }
   462     }
   463     
   463     
   464     // Set page_format
   464     // Set page_format
   465     $pathskey = $paths->nslist[ $this->namespace ] . $this->page_id;
   465     $pathskey = $paths->nslist[ $this->namespace ] . $this->page_id;
   466     if ( $paths->pages[ $pathskey ]['page_format'] != $page_format )
   466     // Using @ due to warning thrown when saving new page
       
   467     if ( @$paths->pages[ $pathskey ]['page_format'] !== $page_format )
   467     {
   468     {
   468       // Note: no SQL injection to worry about here. Everything that goes into this is sanitized already, barring some rogue plugin.
   469       // Note: no SQL injection to worry about here. Everything that goes into this is sanitized already, barring some rogue plugin.
   469       // (and if there's a rogue plugin running, we have bigger things to worry about anyway.)
   470       // (and if there's a rogue plugin running, we have bigger things to worry about anyway.)
   470       if ( !$db->sql_query('UPDATE ' . table_prefix . "pages SET page_format = '$page_format' WHERE urlname = '$this->page_id' AND namespace = '$this->namespace';") )
   471       if ( !$db->sql_query('UPDATE ' . table_prefix . "pages SET page_format = '$page_format' WHERE urlname = '$this->page_id' AND namespace = '$this->namespace';") )
   471       {
   472       {