plugins/admin/PageManager.php
changeset 1325 1e20add419c8
parent 1227 bdac73ed481e
child 1326 f99dfb1b0530
equal deleted inserted replaced
1324:612680c02316 1325:1e20add419c8
   246 											'UPDATE ' . table_prefix . "logs SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';",
   246 											'UPDATE ' . table_prefix . "logs SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';",
   247 											'UPDATE ' . table_prefix . "tags SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';",
   247 											'UPDATE ' . table_prefix . "tags SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';",
   248 											'UPDATE ' . table_prefix . "comments SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';",
   248 											'UPDATE ' . table_prefix . "comments SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';",
   249 											'UPDATE ' . table_prefix . "page_text SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';",
   249 											'UPDATE ' . table_prefix . "page_text SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';",
   250 											'UPDATE ' . table_prefix . "categories SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';"
   250 											'UPDATE ' . table_prefix . "categories SET page_id = '$page_id_new', namespace = '$namespace_new' WHERE page_id = '$page_id_db' AND namespace = '$namespace_db';"
       
   251 											'UPDATE ' . table_prefix . "files SET page_id = '$page_id_new', filename = '$page_id_new' WHERE page_id = '$page_id_db';"
   251 										);
   252 										);
   252 									foreach ( $sql as $q )
   253 									foreach ( $sql as $q )
   253 									{
   254 									{
   254 										if ( !$db->sql_query($q) )
   255 										if ( !$db->sql_query($q) )
   255 											$db->_die('PageManager running slave update query after page ID/namespace change');
   256 											$db->_die('PageManager running slave update query after page ID/namespace change');
   256 									}
   257 									}
   257 									
   258 									
   258 									// If we're going File -> other, remove files
   259 									// If we're going File -> other, remove files
   259 									if ( $namespace_db === 'File' )
   260 									if ( $namespace_db === 'File' && $namespace_new !== 'File' )
   260 									{
   261 									{
   261 										PageUtils::delete_page_files($page_id);
   262 										PageUtils::delete_page_files($page_id);
   262 									}
   263 									}
   263 								}
   264 								}
   264 								
   265