Commit ddad0441 authored by Joe's avatar Joe Committed by agata

Fix scope of $noblogs_master variable

parent 0740f7f0
...@@ -16,7 +16,7 @@ function get_blogs() { ...@@ -16,7 +16,7 @@ function get_blogs() {
global $wpdb; global $wpdb;
$sql = "SELECT blog_id, domain FROM $wpdb->blogs WHERE deleted = 0 AND archived = '0' ORDER BY domain ASC"; $sql = "SELECT blog_id, domain FROM $wpdb->blogs WHERE deleted = 0 AND archived = '0' ORDER BY domain ASC";
$result = $wpdb->get_results($sql); $result = $wpdb->get_results($sql);
return ($result); return ($result);
} }
function printline($s) { function printline($s) {
...@@ -35,6 +35,7 @@ function backend_to_http_endpoint($backend) { ...@@ -35,6 +35,7 @@ function backend_to_http_endpoint($backend) {
// Print the blog -> backend map. // Print the blog -> backend map.
function generate_map() { function generate_map() {
global $wpdb; global $wpdb;
global $noblogs_master;
$wpdb_hash = &$wpdb->hash_map; $wpdb_hash = &$wpdb->hash_map;
$blogs = get_blogs(); $blogs = get_blogs();
...@@ -54,4 +55,3 @@ function generate_map() { ...@@ -54,4 +55,3 @@ function generate_map() {
generate_map(); generate_map();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment