diff --git a/bin/noblogs.in b/bin/noblogs.in index a8dc743cf816f25debe1767f73dc2b90c4ad5eec..d03dcf213aa94082f6b6cb01e5470422e9b3e301 100755 --- a/bin/noblogs.in +++ b/bin/noblogs.in @@ -44,9 +44,6 @@ Known commands: for a blog that is not local is dangerous! Use the 'on-local-blogs' wrapper. - fix-rewrites BLOG [...] - Fix broken rewrite rules for the specified blogs. NOTE: dangerous!!!! - close-comments-if-inactive BLOG [...] Closes old posts for comments on non-active blogs. @@ -61,10 +58,6 @@ Known commands: -mail sends email to ai-changes@investici.org -json print JSON output - set-readonly on|off - Set read-only mode for the local noblogs installation. The argument - must be either the literal 'on' or 'off'. - ngg-convert BLOG Convert Next Gen Gallery (NGG) photo galleries to stardard Wordpress galleries, and then notify (via email) admins of the fact. @@ -205,7 +198,6 @@ function do_dump_shards($args) { echo "\n"; } - // 'print-all-blogs': List all blog IDs. function do_print_all_blogs($args) { $blogs = noblogs_get_blogs(); @@ -214,7 +206,6 @@ function do_print_all_blogs($args) { } } - // 'print-local-blogs': List the blog IDs that are local to this machine. function do_print_local_blogs($args) { $local_blogs = noblogs_get_local_blogs(); @@ -223,7 +214,6 @@ function do_print_local_blogs($args) { } } - // 'remove-network-upgrade-message': Remove the annoying "network // upgrade necessary" banner from the dashboard. function do_remove_network_upgrade_message($args) { @@ -231,7 +221,6 @@ function do_remove_network_upgrade_message($args) { update_site_option('wpmu_upgrade_site', $wp_db_version); } - // 'check-upgrade': Check if a blog needs to be upgraded. function do_check_upgrade($args) { global $wp_db_version; @@ -252,7 +241,6 @@ function do_check_upgrade($args) { } } - // 'upgrade': Upgrade a blog. function do_upgrade($args) { //include(NOBLOGS_ROOT . "/wp-admin/includes/upgrade.php"); @@ -270,7 +258,6 @@ function do_upgrade($args) { } } - // 'run-cron': Run cron jobs. function do_run_cron($args) { foreach ($args as $arg) { @@ -286,25 +273,6 @@ function do_run_cron($args) { } } - -// 'fix-rewrites': Fix rewrite rules -function do_fix_rewrites($args) { - global $wp_rewrite; - foreach ($args as $arg) { - $blog = noblogs_get_blog($arg); - if (!$blog) { - echo "Blog {$arg} not found.\n"; - continue; - } - switch_to_blog($blog->blog_id); - $wp_rewrite->init(); - create_initial_taxonomies(); - $wp_rewrite->flush_rules(); - echo "{$arg}: ok\n"; - restore_current_blog(); - } -} - function do_check_spam($args) { global $wpdb; $spamcount = 0; @@ -422,19 +390,6 @@ function do_check_updates($args) { } -// 'set-readonly': toggle readonly mode by modifying .htaccess -function do_set_readonly($args) { - $htaccess = NOBLOGS_ROOT . '/.htaccess'; - if ($args[0] == "on") { - comment_with_markers($htaccess, 'readonly', false); - } elseif ($args[0] == "off") { - comment_with_markers($htaccess, 'readonly', true); - } else { - print "Argument must be either 'on' or 'off'."; - } -} - - function do_ngg_convert($args) { require_once(dirname(__FILE__) . '/ngg.php'); foreach ($args as $arg) {