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
ed181ab0
Commit
ed181ab0
authored
3 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Remove obsolete update-friend-domains command
parent
9c186279
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/noblogs.in
+2
-30
2 additions, 30 deletions
bin/noblogs.in
lib/friends.php
+0
-16
0 additions, 16 deletions
lib/friends.php
lib/noblogs.php.in
+0
-1
0 additions, 1 deletion
lib/noblogs.php.in
with
2 additions
and
47 deletions
bin/noblogs.in
+
2
−
30
View file @
ed181ab0
...
@@ -12,9 +12,6 @@ Known commands:
...
@@ -12,9 +12,6 @@ Known commands:
info BLOG [...]
info BLOG [...]
Print some basic information about one or more blogs.
Print some basic information about one or more blogs.
connectdb BLOG
Connect to the MySQL instance that has the blog db.
get-option OPTION_NAME BLOG [...]
get-option OPTION_NAME BLOG [...]
Print the value of an option for the specified blogs.
Print the value of an option for the specified blogs.
...
@@ -57,9 +54,6 @@ Known commands:
...
@@ -57,9 +54,6 @@ Known commands:
Remove the 'network upgrade' message when all the blogs have
Remove the 'network upgrade' message when all the blogs have
been upgraded individually.
been upgraded individually.
update-friend-domains
Update the list of 'friend' email domains.
check-updates
check-updates
Check for updates of core, plugins and themes.
Check for updates of core, plugins and themes.
Options:
Options:
...
@@ -123,22 +117,6 @@ function do_info($args) {
...
@@ -123,22 +117,6 @@ function do_info($args) {
}
}
}
}
// 'connectdb': Connect to the database hosting a specific blog.
function
do_connectdb
(
$args
)
{
$blog
=
noblogs_get_blog
(
$args
[
0
]);
if
(
!
$blog
)
{
die
(
"Blog not found.
\n
"
);
}
$backend
=
noblogs_get_backend_for_blog
(
$blog
->
blog_id
);
echo
"ID:
{
$blog
->
blog_id
}
\n
"
;
$cmd
=
"mysql -A -h
{
$backend
[
'host'
]
}
-P
{
$backend
[
'port'
]
}
-u
{
$backend
[
'user'
]
}
-p
{
$backend
[
'password'
]
}
{
$backend
[
'db'
]
}
"
;
echo
"
$cmd
\n
"
;
//system($cmd);
}
// 'get-option': Print the value of a blog option.
// 'get-option': Print the value of a blog option.
function
do_get_option
(
$args
)
{
function
do_get_option
(
$args
)
{
$option
=
$args
[
0
];
$option
=
$args
[
0
];
...
@@ -327,12 +305,6 @@ function do_fix_rewrites($args) {
...
@@ -327,12 +305,6 @@ function do_fix_rewrites($args) {
}
}
}
}
function
do_update_friend_domains
(
$args
)
{
$domains
=
noblogs_list_friend_domains
();
update_site_option
(
'limited_email_domains'
,
$domains
);
echo
"Update done.
\n
"
;
}
function
do_check_spam
(
$args
)
{
function
do_check_spam
(
$args
)
{
global
$wpdb
;
global
$wpdb
;
$spamcount
=
0
;
$spamcount
=
0
;
...
@@ -464,8 +436,8 @@ function do_set_readonly($args) {
...
@@ -464,8 +436,8 @@ function do_set_readonly($args) {
function
do_ngg_convert
(
$args
)
{
function
do_ngg_convert
(
$args
)
{
require_once
(
dirname
(
__FILE__
)
.
'/ngg.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/ngg.php'
);
foreach
(
$args
as
$arg
)
{
foreach
(
$args
as
$arg
)
{
$blog
=
noblogs_get_blog
(
$arg
);
$blog
=
noblogs_get_blog
(
$arg
);
if
(
!
$blog
)
{
if
(
!
$blog
)
{
echo
"Blog
{
$arg
}
not found.
\n
"
;
echo
"Blog
{
$arg
}
not found.
\n
"
;
...
...
This diff is collapsed.
Click to expand it.
lib/friends.php
deleted
100644 → 0
+
0
−
16
View file @
9c186279
<?php
function
_is_domain
(
$x
)
{
return
(
$x
!=
""
&&
$x
[
0
]
!=
"#"
);
}
function
noblogs_list_friend_domains
()
{
exec
(
"ldapsearch -LLL -u -x '(&(status=active)(acceptMail=true))' cn | awk '/^cn:/ {print $2}'"
,
$ldap_domains
);
$ext_domains
=
explode
(
"
\n
"
,
file_get_contents
(
"/etc/noblogs/friend_domains"
));
$all_domains
=
array_filter
(
array_merge
(
$ldap_domains
,
$ext_domains
),
"_is_domain"
);
sort
(
$all_domains
);
return
$all_domains
;
}
This diff is collapsed.
Click to expand it.
lib/noblogs.php.in
+
0
−
1
View file @
ed181ab0
...
@@ -8,7 +8,6 @@ define('AI_CRON_SCRIPT', true);
...
@@ -8,7 +8,6 @@ define('AI_CRON_SCRIPT', true);
// Load our includes.
// Load our includes.
require_once
(
dirname
(
__FILE__
)
.
'/blogs.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/blogs.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/cron.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/cron.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/friends.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/editfiles.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/editfiles.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/wp-piwik.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/wp-piwik.php'
);
...
...
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