diff --git a/application/config/config-defaults.php b/application/config/config-defaults.php index 4c01967f367..382d926c597 100644 --- a/application/config/config-defaults.php +++ b/application/config/config-defaults.php @@ -388,13 +388,13 @@ $config['updatecheckperiod']=7; /** - * @var $showXquestions string allows you to control whether or not + * @var $showxquestions string allows you to control whether or not * {THEREAREXQUESTIONS} is displayed (if it is included in a template) * hide = always hide {THEREAREXQUESTIONS} * show = always show {THEREAREXQUESTIONS} * choose = allow survey admins to choose */ -$config['showXquestions'] = 'choose'; +$config['showxquestions'] = 'choose'; /** diff --git a/application/controllers/admin/database.php b/application/controllers/admin/database.php index 7bc89a50cae..842561de39c 100644 --- a/application/controllers/admin/database.php +++ b/application/controllers/admin/database.php @@ -1010,7 +1010,7 @@ function index($sa = null) 'printanswers'=> Yii::app()->request->getPost('printanswers'), 'publicstatistics'=> Yii::app()->request->getPost('publicstatistics'), 'autoredirect'=> Yii::app()->request->getPost('autoredirect'), - 'showXquestions'=> Yii::app()->request->getPost('showXquestions'), + 'showxquestions'=> Yii::app()->request->getPost('showxquestions'), 'showgroupinfo'=> Yii::app()->request->getPost('showgroupinfo'), 'showqnumcode'=> Yii::app()->request->getPost('showqnumcode'), 'shownoanswer'=> Yii::app()->request->getPost('shownoanswer'), diff --git a/application/controllers/admin/globalsettings.php b/application/controllers/admin/globalsettings.php index bbe4d8a1891..930f842d746 100644 --- a/application/controllers/admin/globalsettings.php +++ b/application/controllers/admin/globalsettings.php @@ -136,7 +136,7 @@ private function _saveSettings() setGlobalSetting('siteadminemail', strip_tags($_POST['siteadminemail'])); setGlobalSetting('siteadminname', strip_tags($_POST['siteadminname'])); setGlobalSetting('shownoanswer', sanitize_int($_POST['shownoanswer'])); - setGlobalSetting('showXquestions', ($_POST['showXquestions'])); + setGlobalSetting('showxquestions', ($_POST['showxquestions'])); setGlobalSetting('showgroupinfo', ($_POST['showgroupinfo'])); setGlobalSetting('showqnumcode', ($_POST['showqnumcode'])); $repeatheadingstemp = (int)($_POST['repeatheadings']); diff --git a/application/controllers/admin/surveyaction.php b/application/controllers/admin/surveyaction.php index cf1304c89b3..35a5038527a 100644 --- a/application/controllers/admin/surveyaction.php +++ b/application/controllers/admin/surveyaction.php @@ -1171,7 +1171,7 @@ private function _generalTabEditSurvey($surveyid, $esrow) private function _tabPresentationNavigation($esrow) { $clang = $this->getController()->lang; - global $showXquestions, $showgroupinfo, $showqnumcode; + global $showxquestions, $showgroupinfo, $showqnumcode; Yii::app()->loadHelper('globalsettings'); @@ -1180,7 +1180,7 @@ private function _tabPresentationNavigation($esrow) $aData['clang'] = $clang; $aData['esrow'] = $esrow; $aData['shownoanswer'] = $shownoanswer; - $aData['showXquestions'] = $showXquestions; + $aData['showxquestions'] = $showxquestions; $aData['showgroupinfo'] = $showgroupinfo; $aData['showqnumcode'] = $showqnumcode; return $aData; @@ -1497,7 +1497,7 @@ function insert($iSurveyId=null) 'allowsave' => $_POST['allowsave'], 'navigationdelay' => $_POST['navigationdelay'], 'autoredirect' => $_POST['autoredirect'], - 'showXquestions' => $_POST['showXquestions'], + 'showxquestions' => $_POST['showxquestions'], 'showgroupinfo' => $_POST['showgroupinfo'], 'showqnumcode' => $_POST['showqnumcode'], 'shownoanswer' => $_POST['shownoanswer'], diff --git a/application/helpers/replacements_helper.php b/application/helpers/replacements_helper.php index 728c6a95e01..34f0ffb385e 100644 --- a/application/helpers/replacements_helper.php +++ b/application/helpers/replacements_helper.php @@ -28,12 +28,12 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $debugSrc = 'Unspecified', $anonymized = false, $questionNum = NULL, $registerdata = array()) { /* - global $clienttoken,$token,$sitename,$move,$showXquestions,$showqnumcode,$questioncode,$register_errormsg; + global $clienttoken,$token,$sitename,$move,$showxquestions,$showqnumcode,$questioncode,$register_errormsg; global $s_lang,$errormsg,$saved_id, $totalBoilerplatequestions, $relativeurl, $languagechanger,$captchapath,$loadname; */ /* $allowedvars = array('surveylist', 'sitename', 'clienttoken', 'rooturl', 'thissurvey', 'imageurl', 'defaulttemplate', - 'percentcomplete', 'move', 'groupname', 'groupdescription', 'question', 'showXquestions', + 'percentcomplete', 'move', 'groupname', 'groupdescription', 'question', 'showxquestions', 'showgroupinfo', 'showqnumcode', 'questioncode', 'answer', 'navigator', 'help', 'totalquestions', 'surveyformat', 'completed', 'register_errormsg', 'notanswered', 'privacy', 'surveyid', 'publicurl', 'templatedir', 'token', 'assessments', 's_lang', 'errormsg', 'clang', 'saved_id', 'usertemplaterootdir', @@ -63,7 +63,7 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de 'saved_id', 'showgroupinfo', 'showqnumcode', - 'showXquestions', + 'showxquestions', 'sitename', 'surveylist', 'templatedir', @@ -95,7 +95,7 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de if (!isset($showqnumcode)) { $showqnumcode = Yii::app()->getConfig('showqnumcode'); } $_surveyid = Yii::app()->getConfig('surveyID'); if (!isset($totalBoilerplatequestions)) { $totalBoilerplatequestions = 0; } - if (!isset($showXquestions)) { $showXquestions = Yii::app()->getConfig('showXquestions'); } + if (!isset($showxquestions)) { $showxquestions = Yii::app()->getConfig('showxquestions'); } if (!isset($s_lang)) { $s_lang = (isset(Yii::app()->session['survey_'.$_surveyid]['s_lang']) ? Yii::app()->session['survey_'.$_surveyid]['s_lang'] : 'en'); } if (!isset($captchapath)) { $captchapath = ''; } @@ -267,9 +267,9 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de if(!isset($totalquestions)) $totalquestions = 0; $_totalquestionsAsked = $totalquestions - $totalBoilerplatequestions; if ( - $showXquestions == 'show' || - ($showXquestions == 'choose' && !isset($thissurvey['showXquestions'])) || - ($showXquestions == 'choose' && $thissurvey['showXquestions'] == 'Y') + $showxquestions == 'show' || + ($showxquestions == 'choose' && !isset($thissurvey['showxquestions'])) || + ($showxquestions == 'choose' && $thissurvey['showxquestions'] == 'Y') ) { if ($_totalquestionsAsked < 1) diff --git a/application/helpers/update/upgrade-mssql_helper.php b/application/helpers/update/upgrade-mssql_helper.php index 55e0ccebfa5..ab601ae0fe8 100644 --- a/application/helpers/update/upgrade-mssql_helper.php +++ b/application/helpers/update/upgrade-mssql_helper.php @@ -397,7 +397,7 @@ function db_upgrade($oldversion) { if ($oldversion < 145) //Modify surveys table { - modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD showXquestions CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();@ob_flush(); + modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD showxquestions CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();@ob_flush(); modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD showgroupinfo CHAR(1) NULL default 'B'"); echo $modifyoutput; flush();@ob_flush(); modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD shownoanswer CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();@ob_flush(); modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD showqnumcode CHAR(1) NULL default 'X'"); echo $modifyoutput; flush();@ob_flush(); diff --git a/application/helpers/update/upgrade-mssqlnative_helper.php b/application/helpers/update/upgrade-mssqlnative_helper.php index 9c9b7f0e297..44753adf2a3 100644 --- a/application/helpers/update/upgrade-mssqlnative_helper.php +++ b/application/helpers/update/upgrade-mssqlnative_helper.php @@ -400,7 +400,7 @@ function db_upgrade($oldversion) { if ($oldversion < 145) //Modify surveys table { - modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD showXquestions CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();ob_flush(); + modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD showxquestions CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();ob_flush(); modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD showgroupinfo CHAR(1) NULL default 'B'"); echo $modifyoutput; flush();ob_flush(); modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD shownoanswer CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();ob_flush(); modifyDatabase("", "ALTER TABLE [prefix_surveys] ADD showqnumcode CHAR(1) NULL default 'X'"); echo $modifyoutput; flush();ob_flush(); diff --git a/application/helpers/update/upgrade-mysql_helper.php b/application/helpers/update/upgrade-mysql_helper.php index 2b66e116239..db5257bcaff 100644 --- a/application/helpers/update/upgrade-mysql_helper.php +++ b/application/helpers/update/upgrade-mysql_helper.php @@ -393,7 +393,7 @@ function db_upgrade($oldversion) { if ($oldversion < 145) { modifyDatabase("", "ALTER TABLE `prefix_surveys` ADD `savetimings` CHAR(1) NULL default 'N' AFTER `format`"); echo $modifyoutput; flush();@ob_flush(); - modifyDatabase("", "ALTER TABLE `prefix_surveys` ADD `showXquestions` CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();@ob_flush(); + modifyDatabase("", "ALTER TABLE `prefix_surveys` ADD `showxquestions` CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();@ob_flush(); modifyDatabase("", "ALTER TABLE `prefix_surveys` ADD `showgroupinfo` CHAR(1) NULL default 'B'"); echo $modifyoutput; flush();@ob_flush(); modifyDatabase("", "ALTER TABLE `prefix_surveys` ADD `shownoanswer` CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();@ob_flush(); modifyDatabase("", "ALTER TABLE `prefix_surveys` ADD `showqnumcode` CHAR(1) NULL default 'X'"); echo $modifyoutput; flush();@ob_flush(); diff --git a/application/helpers/update/upgrade-postgres_helper.php b/application/helpers/update/upgrade-postgres_helper.php index 47906252ef3..8947f2d8f25 100644 --- a/application/helpers/update/upgrade-postgres_helper.php +++ b/application/helpers/update/upgrade-postgres_helper.php @@ -235,7 +235,7 @@ function db_upgrade($oldversion) { if ($oldversion < 145) { modifyDatabase("", "ALTER TABLE prefix_surveys ADD savetimings CHAR(1) NULL default 'N'"); echo $modifyoutput; flush();@ob_flush(); - modifyDatabase("", "ALTER TABLE prefix_surveys ADD showXquestions CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();@ob_flush(); + modifyDatabase("", "ALTER TABLE prefix_surveys ADD showxquestions CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();@ob_flush(); modifyDatabase("", "ALTER TABLE prefix_surveys ADD showgroupinfo CHAR(1) NULL default 'B'"); echo $modifyoutput; flush();@ob_flush(); modifyDatabase("", "ALTER TABLE prefix_surveys ADD shownoanswer CHAR(1) NULL default 'Y'"); echo $modifyoutput; flush();@ob_flush(); modifyDatabase("", "ALTER TABLE prefix_surveys ADD showqnumcode CHAR(1) NULL default 'X'"); echo $modifyoutput; flush();@ob_flush(); diff --git a/application/models/InstallerConfigForm.php b/application/models/InstallerConfigForm.php index 82ccc5a9792..b9c2931fefe 100644 --- a/application/models/InstallerConfigForm.php +++ b/application/models/InstallerConfigForm.php @@ -28,14 +28,14 @@ class InstallerConfigForm extends CFormModel public $db_names = array( 'mysql' => 'MySQL', 'mysqli' => 'MySQLi', - 'sqlite' => 'SQLite', - 'sqlite2' => 'SQLite2', +// 'sqlite' => 'SQLite', +// 'sqlite2' => 'SQLite2', 'mssql' => 'Microsoft SQL Server', 'dblib' => 'Microsoft SQL Server (dblib)', 'sqlsrv' => 'Microsoft SQL Server (sqlsrv)', 'sybase' => 'Microsoft SQL Server (sybase)', 'pgsql' => 'PostgreSQL', - 'oci' => 'Oracle' +// 'oci' => 'Oracle' ); // Optional diff --git a/application/views/admin/globalSettings_view.php b/application/views/admin/globalSettings_view.php index a5abe31b5b4..b46877b888b 100644 --- a/application/views/admin/globalSettings_view.php +++ b/application/views/admin/globalSettings_view.php @@ -364,8 +364,8 @@ '' , 'show' => '' , 'choose' => ''); $sel_xq[$set_xq] = ' selected="selected"'; if( empty($sel_xq['hide']) && empty($sel_xq['show']) && empty($sel_xq['choose'])) @@ -373,8 +373,8 @@ $sel_xq['choose'] = ' selected="selected"'; }; ?> -
  • - diff --git a/application/views/admin/survey/subview/tabPresentation_view.php b/application/views/admin/survey/subview/tabPresentation_view.php index 34c9b3abcae..be7dec440e9 100644 --- a/application/views/admin/survey/subview/tabPresentation_view.php +++ b/application/views/admin/survey/subview/tabPresentation_view.php @@ -211,32 +211,32 @@
  • - - -
  • eT('Show "There are X questions in this survey"'); ?>
  • -
  • eT('Show "There are X questions in this survey"'); ?>
  • '' , 'N' => '' ); - if (isset($esrow['showXquestions'])) { - $set_showxq = $esrow['showXquestions']; + if (isset($esrow['showxquestions'])) { + $set_showxq = $esrow['showxquestions']; $sel_showxq[$set_showxq] = ' selected="selected"'; } if (empty($sel_showxq['Y']) && empty($sel_showxq['N'])) { $sel_showxq['Y'] = ' selected="selected"'; }; ?> -
  • - diff --git a/installer/sql/create-mssql.sql b/installer/sql/create-mssql.sql index 4f4752b1f48..aa393776280 100644 --- a/installer/sql/create-mssql.sql +++ b/installer/sql/create-mssql.sql @@ -276,7 +276,7 @@ CREATE TABLE [prefix_surveys] ( [allowsave] char(1) default 'Y', [autonumber_start] bigint default '0', [autoredirect] char(1) default 'N', - [showXquestions] char(1) default 'Y', + [showxquestions] char(1) default 'Y', [showgroupinfo] char(1) default 'B', [shownoanswer] char(1) default 'Y', [showqnumcode] char(1) default 'X', diff --git a/installer/sql/create-mssqlnative.sql b/installer/sql/create-mssqlnative.sql index 3be9221479a..06a7a0d8289 100644 --- a/installer/sql/create-mssqlnative.sql +++ b/installer/sql/create-mssqlnative.sql @@ -284,7 +284,7 @@ CREATE TABLE [prefix_surveys] ( [allowsave] char(1) default 'Y', [autonumber_start] bigint default '0', [autoredirect] char(1) default 'N', - [showXquestions] char(1) default 'Y', + [showxquestions] char(1) default 'Y', [showgroupinfo] char(1) default 'B', [shownoanswer] char(1) default 'Y', [showqnumcode] char(1) default 'X', diff --git a/installer/sql/create-mysql.sql b/installer/sql/create-mysql.sql index 1995e7e619c..354194f1a36 100644 --- a/installer/sql/create-mysql.sql +++ b/installer/sql/create-mysql.sql @@ -282,7 +282,7 @@ CREATE TABLE `prefix_surveys` ( `emailresponseto` text default NULL, `emailnotificationto` text default NULL, `tokenlength` tinyint(2) default '15', - `showXquestions` char(1) default 'Y', + `showxquestions` char(1) default 'Y', `showgroupinfo` char(1) default 'B', `shownoanswer` char(1) default 'Y', `showqnumcode` char(1) default 'X', diff --git a/installer/sql/create-pgsql.sql b/installer/sql/create-pgsql.sql index 93548dc1c9b..9b2ec948c58 100644 --- a/installer/sql/create-pgsql.sql +++ b/installer/sql/create-pgsql.sql @@ -71,8 +71,8 @@ CREATE TABLE prefix_defaultvalues ( -- CREATE TABLE prefix_expression_errors ( - id integer NOT NULL AUTO_INCREMENT, - errortime varchar(50) DEFAULT NULL, + id serial, + errortime character varying(50) DEFAULT NULL, sid integer DEFAULT NULL, gid integer DEFAULT NULL, qid integer DEFAULT NULL, @@ -95,7 +95,7 @@ CREATE TABLE prefix_groups ( group_order integer DEFAULT 0 NOT NULL, description text, "language" character varying(20) DEFAULT 'en'::character varying NOT NULL, - randomization_group varying(20) DEFAULT ''::character varying NOT NULL, + randomization_group character varying(20) DEFAULT ''::character varying NOT NULL, grelevance text DEFAULT NULL, CONSTRAINT prefix_groups_pkey PRIMARY KEY (gid, "language") ); @@ -274,7 +274,7 @@ CREATE TABLE prefix_surveys ( printanswers character(1) DEFAULT 'N'::bpchar, autonumber_start integer DEFAULT 0, autoredirect character(1) DEFAULT 'N'::bpchar, - showXquestions character(1) DEFAULT 'Y'::bpchar, + showxquestions character(1) DEFAULT 'Y'::bpchar, showgroupinfo character(1) DEFAULT 'B'::bpchar, shownoanswer character(1) DEFAULT 'Y'::bpchar, showqnumcode character(1) DEFAULT 'X'::bpchar, @@ -436,11 +436,11 @@ CREATE TABLE prefix_templates_rights ( -- CREATE TABLE prefix_participants ( "participant_id" character varying( 50 ) PRIMARY KEY NOT NULL, - "firstname" character varying( 40 ) NOT NULL, - "lastname" character varying( 40 ) NOT NULL, - "email" character varying( 80 ) NOT NULL, - "language" character varying( 2 ) NOT NULL, - "blacklisted" character( 1 ) NOT NULL, + "firstname" character varying( 40 ) DEFAULT NULL, + "lastname" character varying( 40 ) DEFAULT NULL, + "email" character varying( 80 ) DEFAULT NULL, + "language" character varying( 2 ) DEFAULT NULL, + "blacklisted" character( 1 ) DEFAULT NULL, "owner_uid" integer NOT NULL );