Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:LimeSurvey/LimeSurvey.git int…
Browse files Browse the repository at this point in the history
…o develop
  • Loading branch information
Shnoulle committed Dec 17, 2016
2 parents f983dac + 2f9b7ee commit 0fd6840
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 1 addition & 4 deletions application/commands/PluginCommand.php
Expand Up @@ -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);


}
}

?>
?>
7 changes: 6 additions & 1 deletion application/commands/console.php
Expand Up @@ -36,7 +36,12 @@
}
unset ($config['defaultController']);
unset ($config['config']);
$config['runtimePath']=$settings['tempdir'].'/runtime';
/* fix runtime path, unsure you can lauch function anywhere (if you use php /var/www/limesurvey/... : can be /root/ for config */
$runtimePath=$settings['tempdir'].'/runtime';
if(!is_dir($runtimePath) || !is_writable($runtimePath)){
$runtimePath=str_replace($settings['rootdir'],dirname(dirname(dirname(__FILE__))),$runtimePath);
}
$config['runtimePath']=$runtimePath;

// fix for fcgi
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
Expand Down
5 changes: 1 addition & 4 deletions application/controllers/admin/templates.php
Expand Up @@ -79,12 +79,9 @@ public function templatezip($templatename)
*/
public function tmp($id)
{
$id = (int) $id;
$iTime= preg_replace("/[^0-9]$/", '', $id);
$iTime = $id = CHtml::encode($id);
$sFile = Yii::app()->getConfig("tempdir").DIRECTORY_SEPARATOR."template_temp_{$iTime}.html";

$id = CHtml::encode($id);

if(!is_file($sFile) || !file_exists($sFile)) {
die("Found no file with id " . $id);
}
Expand Down

0 comments on commit 0fd6840

Please sign in to comment.