aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console/command/cron/run.php
diff options
context:
space:
mode:
authorLEZY Thomas <thomas.gif.91@gmail.com>2014-05-29 18:03:23 +0200
committerLEZY Thomas <thomas.gif.91@gmail.com>2014-05-29 18:03:23 +0200
commitfda2cc636cd3df852c7dc7ca0f12b4696ff0553c (patch)
tree9c8474ec4504b01d22fd660e080b963842540b87 /phpBB/phpbb/console/command/cron/run.php
parent2f2e404639bd0164387615a1f5c338cdbf9e2dfe (diff)
downloadforums-fda2cc636cd3df852c7dc7ca0f12b4696ff0553c.tar
forums-fda2cc636cd3df852c7dc7ca0f12b4696ff0553c.tar.gz
forums-fda2cc636cd3df852c7dc7ca0f12b4696ff0553c.tar.bz2
forums-fda2cc636cd3df852c7dc7ca0f12b4696ff0553c.tar.xz
forums-fda2cc636cd3df852c7dc7ca0f12b4696ff0553c.zip
[ticket/12597] Changing place of lock release in execute() method
PHPBB3-12597
Diffstat (limited to 'phpBB/phpbb/console/command/cron/run.php')
-rw-r--r--phpBB/phpbb/console/command/cron/run.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/phpbb/console/command/cron/run.php b/phpBB/phpbb/console/command/cron/run.php
index 07949cc962..c0fb521c52 100644
--- a/phpBB/phpbb/console/command/cron/run.php
+++ b/phpBB/phpbb/console/command/cron/run.php
@@ -85,12 +85,15 @@ class run extends \phpbb\console\command\command
$task_name = $input->getArgument('name');
if ($task_name)
{
- return $this->run_one($input, $output, $task_name);
+ $exit_status = $this->run_one($input, $output, $task_name);
}
else
{
- return $this->run_all($input, $output);
+ $exit_status = $this->run_all($input, $output);
}
+
+ $this->lock_db->release();
+ return $exit_status;
}
else
{
@@ -134,7 +137,6 @@ class run extends \phpbb\console\command\command
}
}
- $this->lock_db->release();
return 0;
}
@@ -163,13 +165,11 @@ class run extends \phpbb\console\command\command
}
$task->run();
- $this->lock_db->release();
return 0;
}
else
{
$output->writeln('<error>' . $this->user->lang('CRON_NO_SUCH_TASK') . '</error>');
- $this->lock_db->release();
return 2;
}
}