Skip to content

Commit

Permalink
Merge branch 'master' into 2.06
Browse files Browse the repository at this point in the history
Conflicts:
	application/config/internal.php
	application/controllers/InstallerController.php
	application/controllers/OptoutController.php
	application/controllers/admin/checkintegrity.php
	application/controllers/admin/conditionsaction.php
	application/controllers/admin/globalsettings.php
	application/controllers/admin/labels.php
	application/controllers/admin/participantsaction.php
	application/controllers/admin/printablesurvey.php
	application/controllers/admin/surveyadmin.php
	application/controllers/admin/tokens.php
	application/controllers/admin/translate.php
	application/controllers/admin/update.php
	application/controllers/admin/useraction.php
	application/extensions/SettingsWidget/SettingsWidget.php
	application/helpers/admin/import_helper.php
	application/helpers/common_helper.php
	application/helpers/expressions/em_manager_helper.php
	application/helpers/frontend_helper.php
	application/helpers/qanda_helper.php
	application/models/Token.php
	application/models/TokenDynamic.php
	application/views/admin/checkintegrity/check_view.php
	application/views/admin/emailtemplates/email_language_template_tab.php
	application/views/admin/export/exportresults_view.php
	application/views/admin/labels/labelbar_view.php
	application/views/admin/labels/labelsetsbar_view.php
	application/views/admin/labels/labelview_view.php
	application/views/admin/participants/attributeControl_view.php
	application/views/admin/participants/displayParticipants_view.php
	application/views/admin/survey/Question/answerOptions_view.php
	application/views/admin/survey/Question/subQuestion_view.php
	application/views/admin/survey/deactivateSurvey_view.php
	application/views/admin/survey/editSurvey_view.php
	application/views/admin/survey/subview/tabNotification_view.php
	application/views/admin/survey/subview/tabTokens_view.php
	application/views/admin/token/csvpost.php
	application/views/admin/token/email.php
	application/views/admin/token/tokenbar.php
	application/views/admin/token/tokenform.php
	application/views/admin/token/tokensummary.php
	application/views/admin/translate/translateformheader_view.php
	application/views/admin/translate/translatetabs_view.php
	application/views/installer/dbconfig_view.php
	application/views/installer/precheck_view.php
	application/views/surveys/publicSurveyList.php
	installer/sql/create-mssql.sql
	locale/_template/limesurvey.pot
	locale/ar/LC_MESSAGES/ar.mo
	locale/cs-informal/LC_MESSAGES/cs-informal.mo
	locale/cs/LC_MESSAGES/cs.mo
	locale/de-informal/LC_MESSAGES/de-informal.mo
	locale/de/LC_MESSAGES/de.mo
	locale/el/LC_MESSAGES/el.mo
	locale/es-MX/LC_MESSAGES/es-MX.mo
	locale/es/LC_MESSAGES/es.mo
	locale/et/LC_MESSAGES/et.mo
	locale/fi/LC_MESSAGES/fi.mo
	locale/fr/LC_MESSAGES/fr.mo
	locale/hr/LC_MESSAGES/hr.mo
	locale/hu/LC_MESSAGES/hu.mo
	locale/id/LC_MESSAGES/id.mo
	locale/it-informal/LC_MESSAGES/it-informal.mo
	locale/it/LC_MESSAGES/it.mo
	locale/ja/LC_MESSAGES/ja.mo
	locale/ka/LC_MESSAGES/ka.mo
	locale/lt/LC_MESSAGES/lt.mo
	locale/lv/LC_MESSAGES/lv.mo
	locale/ms/LC_MESSAGES/ms.mo
	locale/nb/LC_MESSAGES/nb.mo
	locale/nl-informal/LC_MESSAGES/nl-informal.mo
	locale/nl/LC_MESSAGES/nl.mo
	locale/nn/LC_MESSAGES/nn.mo
	locale/pl/LC_MESSAGES/pl.mo
	locale/pt/LC_MESSAGES/pt.mo
	locale/ru/LC_MESSAGES/ru.mo
	locale/sv/LC_MESSAGES/sv.mo
	locale/th/LC_MESSAGES/th.mo
	locale/tr/LC_MESSAGES/tr.mo
	locale/uk/LC_MESSAGES/uk.mo
	locale/zh-Hans/LC_MESSAGES/zh-Hans.mo
	locale/zh-Hant-HK/LC_MESSAGES/zh-Hant-HK.mo
	locale/zh-Hant-TW/LC_MESSAGES/zh-Hant-TW.mo
  • Loading branch information
c-schmitz committed Oct 23, 2014
2 parents b74d0f6 + efb5e0f commit b5142e7
Show file tree
Hide file tree
Showing 406 changed files with 30,861 additions and 61,642 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,3 +1,4 @@
.settings
.project
/upload/surveys/*
/styles/gringegreen/images/Thumbs.db
Expand All @@ -19,3 +20,4 @@
/third_party/jqgrid/src
.settings/org.eclipse.php.core.prefs
.buildpath
/application/config/config.php
2 changes: 1 addition & 1 deletion application/commands/InstallCommand.php
Expand Up @@ -52,7 +52,7 @@ public function run($sArgument)
$sql_file = 'mssql';
break;
default:
throw new Exception(sprintf('Unkown database type "%s".', $this->connection->driverName));
throw new Exception(sprintf('Unknown database type "%s".', $this->connection->driverName));
}
$this->_executeSQLFile(dirname(Yii::app()->basePath).'/installer/sql/create-'.$sql_file.'.sql');
$this->connection->createCommand()->insert($this->connection->tablePrefix.'users', array(
Expand Down
18 changes: 9 additions & 9 deletions application/config/config-defaults.php
Expand Up @@ -68,7 +68,7 @@
$config['defaultlang'] = 'en'; // The default language to use - the available languages are the directory names in the /locale dir - for example de = German

$config['timeadjust'] = 0; // Number of hours to adjust between your webserver local time and your own local time (for datestamping responses)
$config['allowexportalldb'] = 1; // 0 will only export prefixed tables when doing a database dump. If set to 1 ALL tables in the database will be exported
$config['allowexportalldb'] = 0; // 0 will only export prefixed tables when doing a database dump. If set to 1 ALL tables in the database will be exported
$config['maxdumpdbrecords'] = 500; // The maximum number of records that would be ouputted in a go during a database backup. Reduce this number if you're getting errors while backing up the entire database.
$config['allowmandbackwards'] = 1; // Allow moving backwards (ie: << prev) through survey if a mandatory question
// has not been answered. 1=Allow, 0=Deny
Expand Down Expand Up @@ -237,15 +237,15 @@
$config['demoMode'] = false;

/**
* Prefill the login mask using the parameters 'defaultuser' and 'default pass'. This works only if demo mode (demoMode) is activated.
* Prefill the login mask using the parameters 'defaultuser' and 'default pass'. This works only if demo mode (demoMode) is activated.
* Also a notice will be shown that the user knows that he can just login by using the Login button.
*
*
* @var $config['demoModePrefill'] boolan If set to true prefill the login mask
*/
$config['demoModePrefill'] = false;


/**
/**
* column_style
* Because columns are tricky things, in terms of balancing visual
* layout against semantic markup. The choice has been left to the
Expand Down Expand Up @@ -312,15 +312,15 @@
$config['showsgqacode'] = false;

/**
* When this settings is true/1 (default = false/0) then the printable survey option will show
* When this settings is true/1 (default = false/0) then the printable survey option will show
* the raw relevance equation below the general fill-out instructions in case the question has conditions.
*/
$config['showrelevance'] = false;

/**
* PDF Export Settings
* This feature configures PDF export for Export Answers
* PDF core fonts are not included in PDF: make ligther pdf
* PDF core fonts are not included in PDF: make ligther pdf
* See http://www.tcpdf.org/fonts.php to have the list of PDF core fonts
*/

Expand All @@ -334,9 +334,9 @@
'ar'=>'dejavusans',// 'dejavusans' work but maybe more characters in aealarabiya or almohanad: but then need a dynamic font size too
'be'=>'dejavusans',
'bg'=>'dejavusans',
'zh-Hans'=>'chinese',
'zh-Hant-HK'=>'chinese',
'zh-Hant-TW'=>'chinese',
'zh-Hans'=>'cid0cs',
'zh-Hant-HK'=>'cid0ct',
'zh-Hant-TW'=>'cid0ct',
'cs'=>'dejavusans',
'cs-informal'=>'dejavusans',// This one not really tested: no translation for Yes/No or Gender
'el'=>'dejavusans',
Expand Down
3 changes: 1 addition & 2 deletions application/config/config-sample-mysql.php
Expand Up @@ -22,10 +22,9 @@
|
*/
return array(
'name' => 'LimeSurvey',
'components' => array(
'db' => array(
'connectionString' => 'mysql:host=localhost;port=3306;dbname=limesurvey',
'connectionString' => 'mysql:host=localhost;port=3306;dbname=limesurvey;',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
Expand Down
1 change: 0 additions & 1 deletion application/config/internal.php
Expand Up @@ -66,7 +66,6 @@
'useMoFile' => true,
'basePath' => __DIR__ . DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'locale'
)

)
);

Expand Down
12 changes: 3 additions & 9 deletions application/config/tcpdf.php
Expand Up @@ -97,15 +97,6 @@
$tcpdf['blank_image'] = $tcpdf['image_directory'].'_blank.png';


/************************************************************
* TCPDF language settings file
* ----------------------------------------------------------
* Directory and filename of the language settings file
***********************************************************/

$tcpdf['language_file'] = $tcpdf['base_directory'].'config'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.'eng.php';



/***************************************************************************
* DOCUMENT CONFIGURATION PARAMETERS
Expand Down Expand Up @@ -205,6 +196,9 @@

$tcpdf['page_font'] = 'freemono';
$tcpdf['page_font_size'] = 9;
$tcpdf['data_font'] = 'freemono';
$tcpdf['data_font_size'] = 8;
$tcpdf['mono_font'] = 'freemono';

$tcpdf['small_font_ratio'] = 2/3;

Expand Down
31 changes: 7 additions & 24 deletions application/controllers/InstallerController.php
Expand Up @@ -567,7 +567,7 @@ function stepPopulateDb()
$sql_file = 'pgsql';
break;
default:
throw new Exception(sprintf('Unkown database type "%s".', $sDatabaseType));
throw new Exception(sprintf('Unknown database type "%s".', $sDatabaseType));
}

//checking DB Connection
Expand Down Expand Up @@ -647,6 +647,10 @@ private function stepOptionalConfiguration()
if ($this->connection->getActive() == true) {
$sPasswordHash=hash('sha256', $sAdminPassword);
try {

if (User::model()->count()>0){
die();
}
// Save user
$user=new User;
$user->users_name=$sAdminUserName;
Expand Down Expand Up @@ -855,7 +859,7 @@ function check_DirectoryWriteable($directory, &$data, $base, $keyError, $bRecurs
if (version_compare(PHP_VERSION, '5.3.0', '<'))
$bProceed = !$aData['verror'] = true;

if ($this->return_bytes(ini_get('memory_limit'))/1024/1024<64 && ini_get('memory_limit')!=-1)
if (convertPHPSizeToBytes(ini_get('memory_limit'))/1024/1024<64 && ini_get('memory_limit')!=-1)
$bProceed = !$aData['bMemoryError'] = true;


Expand Down Expand Up @@ -1258,33 +1262,12 @@ function _dbConnect($aDbConfig = array(), $aData = array())
return true;
} catch(Exception $e) {
if (!empty($aData['model']) && !empty($aData['clang'])) {
$aData['model']->addError('dblocation', $aData['clang']->gT('Try again! Connection with database failed. Reason: ') . $e->message);
$aData['model']->addError('dblocation', $aData['clang']->gT('Try again! Connection with database failed. Reason: ') . $e->getMessage());
$this->render('/installer/dbconfig_view', $aData);
} else {
return false;
}
}
}

/**
* This function returns the full number from a PHP ini value
*
* @param string $sValue
*/
function return_bytes($sValue) {
$sValue = trim($sValue);
$sLast = strtolower($sValue[strlen($sValue)-1]);
switch($sLast) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$sValue *= 1024;
case 'm':
$sValue *= 1024;
case 'k':
$sValue *= 1024;
}

return $sValue;
}

}
4 changes: 2 additions & 2 deletions application/controllers/OptoutController.php
Expand Up @@ -69,7 +69,7 @@ function actiontokens()
}
else
{
if ($oToken->emailstatus == 'OK')
if (substr($oToken->emailstatus, 0, strlen('OptOut')) !== 'OptOut')
{
$oToken->emailstatus = 'OptOut';
$oToken->save();
Expand Down Expand Up @@ -138,7 +138,7 @@ function actionparticipants()
}
else
{
if ($oToken->emailstatus == 'OK')
if (substr($oToken->emailstatus, 0, strlen('OptOut')) !== 'OptOut')
{
$oToken->emailstatus = 'OptOut';
$oToken->save();
Expand Down

1 comment on commit b5142e7

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/ Maybe time to cherry pick 2.05 fix to 2.06 ;)

Please sign in to comment.