Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
noblogs-cli
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Noblogs
noblogs-cli
Commits
9b03120d
Commit
9b03120d
authored
3 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Show shard in "noblogs info", not host
parent
dce802fa
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bin/noblogs.in
+1
-1
1 addition, 1 deletion
bin/noblogs.in
debian/changelog
+6
-0
6 additions, 0 deletions
debian/changelog
debian/rules
+0
-7
0 additions, 7 deletions
debian/rules
lib/blogs.php
+6
-4
6 additions, 4 deletions
lib/blogs.php
with
13 additions
and
12 deletions
bin/noblogs.in
+
1
−
1
View file @
9b03120d
...
...
@@ -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
"
;
...
...
This diff is collapsed.
Click to expand it.
debian/changelog
+
6
−
0
View file @
9b03120d
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.
...
...
This diff is collapsed.
Click to expand it.
debian/rules
+
0
−
7
View file @
9b03120d
#!/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
...
...
This diff is collapsed.
Click to expand it.
lib/blogs.php
+
6
−
4
View file @
9b03120d
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment