diff -r f31c252c52c1 -r c75754f5b1da plugins/admin/PageManager.php
--- a/plugins/admin/PageManager.php Sat Apr 11 16:58:32 2009 -0400
+++ b/plugins/admin/PageManager.php Sat Apr 11 22:32:45 2009 -0400
@@ -28,6 +28,8 @@
return;
}
+ require_once(ENANO_ROOT . '/includes/pageutils.php');
+
echo '
' . $lang->get('acppm_heading_main') . '
';
$show_select = true;
@@ -160,7 +162,7 @@
}
// Field: namespace
- $namespace = $_POST['page_namespace'];
+ $namespace_new = $_POST['page_namespace'];
if ( !isset($paths->nslist[ $namespace ]) )
{
$errors[] = $lang->get('acppm_err_invalid_namespace');
@@ -168,7 +170,7 @@
else
{
$namespace_changed = ( $_POST['page_namespace'] !== $dataset['namespace'] );
- $dataset['namespace'] = $namespace;
+ $dataset['namespace'] = $namespace_new;
}
// Field: comments enabled
@@ -254,6 +256,12 @@
$db->_die('PageManager running slave update query after page ID/namespace change');
}
+ // If we're going File -> other, remove files
+ if ( $namespace_db === 'File' )
+ {
+ PageUtils::delete_page_files($page_id);
+ }
+
// update $paths with the new pathskey
$new_pathskey = $paths->nslist[$namespace_new] . $page_id_new;
$paths->pages[$new_pathskey] =& $paths->pages[$pathskey];
@@ -318,6 +326,10 @@
+
+
+ {lang:acppm_msg_file_ns_warning}
+
|
@@ -481,7 +493,8 @@
'protected_semi' => ( $dataset['protected'] == 2 ),
'wikimode_off' => ( $dataset['wiki_mode'] == 0 ),
'wikimode_on' => ( $dataset['wiki_mode'] == 1 ),
- 'wikimode_global' => ( $dataset['wiki_mode'] == 2 )
+ 'wikimode_global' => ( $dataset['wiki_mode'] == 2 ),
+ 'is_file' => ( $dataset['namespace'] == 'File' )
));
if ( isset($errors) )