diff --git a/application/commands/PluginCommand.php b/application/commands/PluginCommand.php index 276a3f987e7..50109d0c41e 100644 --- a/application/commands/PluginCommand.php +++ b/application/commands/PluginCommand.php @@ -17,14 +17,11 @@ class PluginCommand extends CConsoleCommand public function actionCron($interval) { - $pm = \Yii::app()->pluginManager; $event = new PluginEvent('cron'); $event->set('interval', $interval); $pm->dispatchEvent($event); - - } } -?> \ No newline at end of file +?> diff --git a/application/commands/console.php b/application/commands/console.php index b26a05367ad..e56666803c0 100644 --- a/application/commands/console.php +++ b/application/commands/console.php @@ -36,7 +36,12 @@ } unset ($config['defaultController']); unset ($config['config']); - $config['runtimePath']=$settings['tempdir'].'/runtime'; + /* fix tempdir for runtime path, unsure you can lauch function anywhere (if you use php /var/www/limesurvey/... : can be /root/ for config */ + $tempdir=$settings['tempdir']; + if(!is_dir($tempdir)){ + $tempdir=str_replace($settings['rootdir'],dirname(dirname(dirname(__FILE__))),$settings['tempdir']); + } + $config['runtimePath']=$tempdir.'/runtime'; // fix for fcgi defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));