aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-05-30 22:52:01 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-05-30 22:52:01 +0200
commita6a2d1bc2d85157bdd1e79fd5c853b30eeccd02d (patch)
treef3ade92acbc5127c27b46d450c1d1d29b905c921
parentbbb83c09c0f53fda26ff0d06083bf900f4babdae (diff)
parentcc41e2eef7b22f0a2c5960589620867fe7b987d5 (diff)
downloadforums-a6a2d1bc2d85157bdd1e79fd5c853b30eeccd02d.tar
forums-a6a2d1bc2d85157bdd1e79fd5c853b30eeccd02d.tar.gz
forums-a6a2d1bc2d85157bdd1e79fd5c853b30eeccd02d.tar.bz2
forums-a6a2d1bc2d85157bdd1e79fd5c853b30eeccd02d.tar.xz
forums-a6a2d1bc2d85157bdd1e79fd5c853b30eeccd02d.zip
Merge pull request #2523 from bantu/ticket/12597
[ticket/12597] Command for executing all available cron tasks * bantu/ticket/12597: [ticket/12597] Update USE_SYSTEM_CRON_EXPLAIN to be a bit more verbose. [ticket/12597] Improve language for cron:run command. [ticket/12597] Do not output anything besides the gif image.
-rw-r--r--phpBB/cron.php10
-rw-r--r--phpBB/language/en/acp/board.php2
-rw-r--r--phpBB/language/en/acp/common.php6
-rw-r--r--phpBB/phpbb/console/command/cron/run.php6
4 files changed, 7 insertions, 17 deletions
diff --git a/phpBB/cron.php b/phpBB/cron.php
index 611d5d4aaf..8bb49bd5d2 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -41,8 +41,6 @@ function output_image()
// the cron lock locked, especially when working on cron-related code.
//
// Attempt to alleviate the problem by doing setup outside of the lock as much as possible.
-//
-// If DEBUG is defined and cron lock cannot be obtained, a message will be printed.
$cron_type = request_var('cron_type', '');
@@ -68,12 +66,4 @@ if ($cron_lock->acquire())
}
}
$cron_lock->release();
-
-}
-else
-{
- if (defined('DEBUG'))
- {
- echo $user->lang('CRON_LOCK_ERROR') . "\n";
- }
}
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index 3702662253..5e4961c435 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -461,7 +461,7 @@ $lang = array_merge($lang, array(
'UPLOAD_ICONS_PATH' => 'Extension group icons storage path',
'UPLOAD_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/upload_icons</samp>.',
'USE_SYSTEM_CRON' => 'Run periodic tasks from system cron',
- 'USE_SYSTEM_CRON_EXPLAIN' => 'When off, phpBB will arrange for periodic tasks to be run automatically. When on, phpBB will not schedule any periodic tasks by itself; a system administrator must arrange for <code>cron:run</code> command to be run by the system cron facility at regular intervals (e.g. every 5 minutes).',
+ 'USE_SYSTEM_CRON_EXPLAIN' => 'When off, phpBB will arrange for periodic tasks to be run automatically. When on, phpBB will not schedule any periodic tasks by itself; a system administrator must arrange for <code>bin/phpbbcli.php cron:run</code> to be run by the system cron facility at regular intervals (e.g. every 5 minutes).',
));
// Security Settings
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index a9c5eaf184..ace8522ec8 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -223,14 +223,14 @@ $lang = array_merge($lang, array(
'BACK' => 'Back',
- 'CLI_DESCRIPTION_CRON_RUN' => 'Runs all available cron tasks.',
+ 'CLI_DESCRIPTION_CRON_RUN' => 'Runs all ready cron tasks.',
'CLI_DESCRIPTION_CRON_RUN_ARGUMENT_1' => 'Name of the task to be run',
'COLOUR_SWATCH' => 'Web-safe colour swatch',
'CONFIG_UPDATED' => 'Configuration updated successfully.',
'CRON_LOCK_ERROR' => 'Could not obtain cron lock.',
- 'CRON_NO_SUCH_TASK' => 'No such cron task',
- 'CRON_NO_TASK' => 'No task to be run',
+ 'CRON_NO_SUCH_TASK' => 'Could not find cron task ā€œ%sā€.',
+ 'CRON_NO_TASK' => 'No cron tasks need to be run right now.',
'DEACTIVATE' => 'Deactivate',
'DIRECTORY_DOES_NOT_EXIST' => 'The entered path ā€œ%sā€ does not exist.',
diff --git a/phpBB/phpbb/console/command/cron/run.php b/phpBB/phpbb/console/command/cron/run.php
index f76fb30e3b..1029a2e085 100644
--- a/phpBB/phpbb/console/command/cron/run.php
+++ b/phpBB/phpbb/console/command/cron/run.php
@@ -3,7 +3,7 @@
*
* This file is part of the phpBB Forum Software package.
*
-* @copyright (c) phpBB Limited
+* @copyright (c) phpBB Limited
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
@@ -67,7 +67,7 @@ class run extends \phpbb\console\command\command
* and the exit status is set to 1.
* If the verbose option is specified, each start of a task is printed.
* Otherwise there is no output.
- * If an argument is given to the command, only the task whose name matches the
+ * If an argument is given to the command, only the task whose name matches the
* argument will be started. If verbose option is specified,
* an info message containing the name of the task is printed.
* If no task matches the argument given, an error message is printed
@@ -169,7 +169,7 @@ class run extends \phpbb\console\command\command
}
else
{
- $output->writeln('<error>' . $this->user->lang('CRON_NO_SUCH_TASK') . '</error>');
+ $output->writeln('<error>' . $this->user->lang('CRON_NO_SUCH_TASK', $task_name) . '</error>');
return 2;
}
}