equal
deleted
inserted
replaced
352 else |
352 else |
353 { |
353 { |
354 // Something sent content, so we'll assume the page exist...ed at least according to the plugin |
354 // Something sent content, so we'll assume the page exist...ed at least according to the plugin |
355 if ( $this->namespace != 'Special' && $this->namespace != 'Admin' && $do_stats ) |
355 if ( $this->namespace != 'Special' && $this->namespace != 'Admin' && $do_stats ) |
356 { |
356 { |
|
357 require_once(ENANO_ROOT.'/includes/stats.php'); |
357 doStats($this->page_id, $this->namespace); |
358 doStats($this->page_id, $this->namespace); |
358 } |
359 } |
359 } |
360 } |
360 } |
361 } |
361 else // (disabled for compatibility reasons) if ( in_array($this->namespace, array('Article', 'User', 'Project', 'Help', 'File', 'Category')) && $this->page_exists ) |
362 else // (disabled for compatibility reasons) if ( in_array($this->namespace, array('Article', 'User', 'Project', 'Help', 'File', 'Category')) && $this->page_exists ) |
860 // Not much to do but to rename it now |
861 // Not much to do but to rename it now |
861 $new_name = $db->escape($new_name); |
862 $new_name = $db->escape($new_name); |
862 $q = $db->sql_query('UPDATE ' . table_prefix . "pages SET name = '$new_name' WHERE urlname = '{$this->page_id}' AND namespace = '{$this->namespace}';"); |
863 $q = $db->sql_query('UPDATE ' . table_prefix . "pages SET name = '$new_name' WHERE urlname = '{$this->page_id}' AND namespace = '{$this->namespace}';"); |
863 if ( !$q ) |
864 if ( !$q ) |
864 $db->_die(); |
865 $db->_die(); |
|
866 |
|
867 // Update the cache |
|
868 $paths->update_metadata_cache(); |
865 |
869 |
866 return array( |
870 return array( |
867 'success' => true |
871 'success' => true |
868 ); |
872 ); |
869 } |
873 } |