diff --git a/bin/noblogs.in b/bin/noblogs.in index c0138d26f99cbb9b135b4358994159986bfb692a..d4637d4140614f9549893719457fd7467cc98398 100755 --- a/bin/noblogs.in +++ b/bin/noblogs.in @@ -115,7 +115,7 @@ function do_info($args) { echo "ID: {$blog->blog_id}\n"; echo "Name: {$blog->domain}\n"; - echo "Host: {$dbinfo['host']}\n"; + echo "Shard: {$dbinfo['shard']}\n"; echo "Status: {$status}\n"; echo "Registered: {$blog->registered}\n"; echo "Last Update: {$blog->last_updated}\n"; diff --git a/debian/changelog b/debian/changelog index abbb663834d08ace9d927662423e4e15fc099925..8d8dfac9fff1afe0e89a20da735d66f598c8fa29 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +noblogs-cli (0.2) unstable; urgency=medium + + * Bump version. + + -- Autistici/Inventati <debian@autistici.org> Thu, 07 Oct 2021 11:51:35 +0100 + noblogs-cli (0.1) unstable; urgency=low * Initial Release. diff --git a/debian/rules b/debian/rules index cc81dde9e0e5877be31b96120106c15af9703f55..2b07bd8e3d27c5b3b7478543b712dc3b7167d4e1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,11 +1,4 @@ #!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -#DH_VERBOSE = 1 - -# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* -DPKG_EXPORT_BUILDFLAGS = 1 -include /usr/share/dpkg/default.mk %: dh $@ --with autotools-dev diff --git a/lib/blogs.php b/lib/blogs.php index cf18bd3d1d440fc37ba8bea407f9bbd8fabd7c7c..3055e2236b5b5dfafcdd6ca4b7f322ffa020f7b2 100644 --- a/lib/blogs.php +++ b/lib/blogs.php @@ -42,16 +42,18 @@ function noblogs_get_backend_for_blog($blog_id) { $backend = $wpdb_reverse_backend_map[$lookup]; // Be nice and split the database host into 'host' and 'port' elements. - $result = array(); + $result = array( + "shard" => $lookup, + "user" => $backend['user'], + "password" => $backend['password'], + "db" => $backend['name'] + ); if (preg_match('/^(.*):([0-9]*)$/', $backend['host'], $matches)) { $result['host'] = $matches[1]; $result['port'] = $matches[2]; } else { $result['host'] = $backend['host']; } - $result['user'] = $backend['user']; - $result['password'] = $backend['password']; - $result['db'] = $backend['name']; return $result; }