Skip to content

Commit

Permalink
Dev: manual merge with 2.06 - core
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Dec 22, 2015
1 parent 7d5414a commit 1bfb907
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion application/core/LSYii_Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function getApi()
{
if (!isset($this->api))
{
$this->api = new \ls\pluginmanager\LimesurveyApi();
$this->api = new \ls\pluginmanager\LimesurveyApi();
}
return $this->api;
}
Expand Down
10 changes: 5 additions & 5 deletions application/core/LSYii_Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ protected function _init()
// Do not localize/translate this!

$dieoutput='';
if (version_compare(PHP_VERSION, '5.3.0', '<'))
$dieoutput .= 'This script can only be run on PHP version 5.3.0 or later! Your version: '.PHP_VERSION.'<br />';
if (version_compare(PHP_VERSION, '5.3.3', '<'))
$dieoutput .= 'This script can only be run on PHP version 5.3.3 or later! Your version: '.PHP_VERSION.'<br />';

if (!function_exists('mb_convert_encoding'))
$dieoutput .= "This script needs the PHP Multibyte String Functions library installed: See <a href='http://manual.limesurvey.org/wiki/Installation_FAQ'>FAQ</a> and <a href='http://de.php.net/manual/en/ref.mbstring.php'>PHP documentation</a><br />";
Expand Down Expand Up @@ -127,7 +127,7 @@ protected function _init()
@ini_set("display_errors", 0);
error_reporting(0);
}

//SET LOCAL TIME
$timeadjust = Yii::app()->getConfig("timeadjust");
if (substr($timeadjust,0,1)!='-' && substr($timeadjust,0,1)!='+') {$timeadjust='+'.$timeadjust;}
Expand All @@ -152,7 +152,7 @@ public function createAbsoluteUrl($route,$params=array(),$schema='',$ampersand='
{
$sPublicUrl=Yii::app()->getConfig("publicurl");
// Control if public url are really public : need scheme and host
// If yes: use it
// If yes: use it
$aPublicUrl=parse_url($sPublicUrl);
if(isset($aPublicUrl['scheme']) && isset($aPublicUrl['host']))
{
Expand All @@ -163,7 +163,7 @@ public function createAbsoluteUrl($route,$params=array(),$schema='',$ampersand='
}
return trim($sPublicUrl,"/").$url;
}
else
else
return parent::createAbsoluteUrl($route,$params,$schema,$ampersand);
}
}
3 changes: 2 additions & 1 deletion application/core/LSYii_Validators.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ protected function validateAttribute($object,$attribute)
$object->$attribute=str_replace('javascript:','',html_entity_decode($object->$attribute, ENT_QUOTES, "UTF-8"));
}
}
// Note that URL checking only checks basic URL properties. As a URL can contain EM expression there needs to be a lot of freedom.
if($this->isUrl)
{
if ($object->$attribute== 'http://' || $object->$attribute=='https://') {$object->$attribute="";}
$object->$attribute=str_replace(array('"',"'",' ','<','>'),'',html_entity_decode($object->$attribute, ENT_QUOTES, "UTF-8")); // 140219 : Why not urlencode ?
$object->$attribute=html_entity_decode($object->$attribute, ENT_QUOTES, "UTF-8");
}
if($this->isLanguage)
{
Expand Down
4 changes: 3 additions & 1 deletion application/core/Survey_Common_Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
*/
class Survey_Common_Action extends CAction
{
public function __construct($controller=null, $id=null)
public function __construct($controller, $id)
{
parent::__construct($controller, $id);

// Make sure viewHelper can be autoloaded
Yii::import('application.helpers.viewHelper');
}
Expand Down Expand Up @@ -1246,6 +1247,7 @@ protected function _filterImportedResources($extractdir, $destdir)
return array($aImportedFilesInfo, $aErrorFilesInfo);
}


/**
* Creates a temporary directory
*
Expand Down

0 comments on commit 1bfb907

Please sign in to comment.