From 029ec9cb2770f4403a570691825c19234494b141 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Jul 2015 15:44:47 +0300 Subject: [PATCH 1/4] updated comment strings --- admin/availability.php | 2 +- admin/callrestrict.php | 2 +- admin/questionnairelist.php | 4 ++-- admin/quotarow.php | 4 ++-- admin/shifttemplate.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/admin/availability.php b/admin/availability.php index 09f23a24..db637b6c 100644 --- a/admin/availability.php +++ b/admin/availability.php @@ -46,7 +46,7 @@ include ("../functions/functions.xhtml.php"); $css = array( "../include/bootstrap/css/bootstrap.min.css", -//"../include/bootstrap-3.3.2/css/bootstrap-theme.min.css", +//"../include/bootstrap/css/bootstrap-theme.min.css", "../include/clockpicker/dist/bootstrap-clockpicker.min.css", "../css/custom.css" ); diff --git a/admin/callrestrict.php b/admin/callrestrict.php index 6d3d3b4a..7cd9bd8b 100644 --- a/admin/callrestrict.php +++ b/admin/callrestrict.php @@ -46,7 +46,7 @@ include ("../functions/functions.xhtml.php"); $css = array( "../include/bootstrap/css/bootstrap.min.css", -//"../include/bootstrap-3.3.2/css/bootstrap-theme.min.css", +//"../include/bootstrap/css/bootstrap-theme.min.css", //"../include/font-awesome/css/font-awesome.css", "../include/clockpicker/dist/bootstrap-clockpicker.min.css", "../css/custom.css" diff --git a/admin/questionnairelist.php b/admin/questionnairelist.php index 04629512..64eb0bb5 100644 --- a/admin/questionnairelist.php +++ b/admin/questionnairelist.php @@ -45,7 +45,7 @@ include("../db.inc.php"); include("../functions/functions.xhtml.php"); /** - * Input functions + * Display functions */ include("../functions/functions.display.php"); @@ -55,7 +55,7 @@ include("../functions/functions.display.php"); include("../functions/functions.input.php"); /** - * CKEditor + * Limesurvey functions */ include("../functions/functions.limesurvey.php"); diff --git a/admin/quotarow.php b/admin/quotarow.php index ce222500..bece1287 100755 --- a/admin/quotarow.php +++ b/admin/quotarow.php @@ -326,7 +326,7 @@ if ($questionnaire_id != false) { if (count($data) > 2) { - //one quota record per row + //one quota record per row, placed in order of records sequence $description = $db->quote($data[0]); $completions = intval($data[1]); $autoprioritise = 0; @@ -431,7 +431,7 @@ if ($questionnaire_id != false) if (isset($_GET['sgqa'])) $ssgqa = $db->qstr($_GET['sgqa']); - //select question + //select question + corrected question order as in questionnaire with subquestions $sql = "SELECT CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) as value, CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END, ' -> ' , CASE WHEN lq.parent_qid = 0 THEN lq.question ELSE CONCAT(lq2.question, ' : ', lq.question) END) as description, CASE WHEN $ssgqa LIKE CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END) THEN 'selected=\'selected\'' ELSE '' END AS selected FROM `" . LIME_PREFIX . "questions` AS lq LEFT JOIN `" . LIME_PREFIX . "questions` AS lq2 ON ( lq2.qid = lq.parent_qid ) diff --git a/admin/shifttemplate.php b/admin/shifttemplate.php index 58370145..7aea313a 100644 --- a/admin/shifttemplate.php +++ b/admin/shifttemplate.php @@ -46,7 +46,7 @@ include ("../functions/functions.xhtml.php"); $css = array( "../include/bootstrap/css/bootstrap.min.css", -//"../include/bootstrap-3.3.2/css/bootstrap-theme.min.css", +//"../include/bootstrap/css/bootstrap-theme.min.css", "../include/clockpicker/dist/bootstrap-clockpicker.min.css", "../css/custom.css" ); From 261728628c54c196293b6e9bc200788a6b62a1d1 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 3 Aug 2015 14:16:18 +0300 Subject: [PATCH 2/4] bug fix lp:1480880 - " disable "create new" questionnaire if no active Limesurvey available" --- admin/new.php | 59 +++++++++++++++++++------------------ admin/questionnairelist.php | 13 +++++--- 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/admin/new.php b/admin/new.php index 1d96424e..fd27653b 100644 --- a/admin/new.php +++ b/admin/new.php @@ -144,8 +144,16 @@ $_POST['import_file'] = false; - + ',sl.surveyls_title) AS title + FROM " . LIME_PREFIX . "surveys AS s + LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( s.sid = sl.surveyls_survey_id) + WHERE s.active = 'Y' + GROUP BY s.sid"; +$surveys = $db->GetAll($sql); + +if (!empty($surveys)){?>
@@ -157,25 +165,14 @@ $_POST['import_file'] = false; -GetAll($sql); -?>
- - - -
+
@@ -189,15 +186,9 @@ $surveys = $db->GetAll($sql); GetAll($sql); - - if (!empty($surveys)){ foreach($surveys as $s){ ?> - - + foreach($surveys as $s){ ?> + +
@@ -343,7 +334,7 @@ $ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"), -
+
" style="margin-top: -5px;">

@@ -353,7 +344,7 @@ $ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),
-
+
" style="margin-top: -5px;">

@@ -365,14 +356,26 @@ $ckeditorConfig = array("toolbar" => array(array("tokens","-","Source"),
- +
- +
+ + +
+

+ +

+ +
+ + + +?> \ No newline at end of file diff --git a/admin/questionnairelist.php b/admin/questionnairelist.php index 64eb0bb5..21adb98c 100644 --- a/admin/questionnairelist.php +++ b/admin/questionnairelist.php @@ -321,8 +321,9 @@ if (isset($_GET['modify'])) { $questionnaire_id = intval($_GET['modify']); - $sql = "SELECT * + $sql = "SELECT `questionnaire`.*, sl.surveyls_title as title FROM questionnaire + LEFT JOIN " . LIME_PREFIX . "surveys_languagesettings AS sl ON ( questionnaire.lime_sid = sl.surveyls_survey_id) WHERE questionnaire_id = $questionnaire_id"; $rs = $db->GetRow($sql); @@ -365,9 +366,13 @@ if (isset($_GET['modify'])) "extraPlugins" => "tokens"); ?>
- -
-
 " . T_("Edit instrument in Limesurvey") . " "; ?>
+
+

:

+
+
+

+  " . T_("Edit instrument in Limesurvey") . " "; ?> +
From 684d7afac0df90e81253bd5d4381465540f58336 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 3 Aug 2015 14:18:07 +0300 Subject: [PATCH 3/4] fix wrong characters in russian localization --- .../classes/adodb/lang/adodb-ru1251.inc.php | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/include/limesurvey/classes/adodb/lang/adodb-ru1251.inc.php b/include/limesurvey/classes/adodb/lang/adodb-ru1251.inc.php index 3173845f..0d349480 100644 --- a/include/limesurvey/classes/adodb/lang/adodb-ru1251.inc.php +++ b/include/limesurvey/classes/adodb/lang/adodb-ru1251.inc.php @@ -1,35 +1,35 @@ - 'ru1251', -DB_ERROR => '����������� ������', -DB_ERROR_ALREADY_EXISTS => '��� ����������', -DB_ERROR_CANNOT_CREATE => '���������� �������', -DB_ERROR_CANNOT_DELETE => '���������� �������', -DB_ERROR_CANNOT_DROP => '���������� ������� (drop)', -DB_ERROR_CONSTRAINT => '��������� ������� ��������', -DB_ERROR_DIVZERO => '������� �� 0', -DB_ERROR_INVALID => '�����������', -DB_ERROR_INVALID_DATE => '������������ ���� ��� �����', -DB_ERROR_INVALID_NUMBER => '������������ �����', -DB_ERROR_MISMATCH => '������', -DB_ERROR_NODBSELECTED => '�� �� �������', -DB_ERROR_NOSUCHFIELD => '�� ���������� ����', -DB_ERROR_NOSUCHTABLE => '�� ���������� �������', -DB_ERROR_NOT_CAPABLE => '���� �� � ���������', -DB_ERROR_NOT_FOUND => '�� �������', -DB_ERROR_NOT_LOCKED => '�� �������������', -DB_ERROR_SYNTAX => '�������������� ������', -DB_ERROR_UNSUPPORTED => '�� ��������������', -DB_ERROR_VALUE_COUNT_ON_ROW => '������� �������� � ������', -DB_ERROR_INVALID_DSN => '������������ DSN', -DB_ERROR_CONNECT_FAILED => '���������� ���������', -0 => '��� ������', // DB_OK -DB_ERROR_NEED_MORE_DATA => '������������� ������������ ������', -DB_ERROR_EXTENSION_NOT_FOUND=> '���������� �� �������', -DB_ERROR_NOSUCHDB => '�� ���������� ��', -DB_ERROR_ACCESS_VIOLATION => '������������ ���� �������' -); + 'ru1251', + DB_ERROR => 'неизвестная ошибка', + DB_ERROR_ALREADY_EXISTS => 'уже существует', + DB_ERROR_CANNOT_CREATE => 'невозможно создать', + DB_ERROR_CANNOT_DELETE => 'невозможно удалить', + DB_ERROR_CANNOT_DROP => 'невозможно удалить (drop)', + DB_ERROR_CONSTRAINT => 'нарушение условий проверки', + DB_ERROR_DIVZERO => 'деление на 0', + DB_ERROR_INVALID => 'неправильно', + DB_ERROR_INVALID_DATE => 'некорректная дата или время', + DB_ERROR_INVALID_NUMBER => 'некорректное число', + DB_ERROR_MISMATCH => 'ошибка', + DB_ERROR_NODBSELECTED => 'БД не выбрана', + DB_ERROR_NOSUCHFIELD => 'не существует поле', + DB_ERROR_NOSUCHTABLE => 'не существует таблица', + DB_ERROR_NOT_CAPABLE => 'СУБД не в состоянии', + DB_ERROR_NOT_FOUND => 'не найдено', + DB_ERROR_NOT_LOCKED => 'не заблокировано', + DB_ERROR_SYNTAX => 'синтаксическая ошибка', + DB_ERROR_UNSUPPORTED => 'не поддерживается', + DB_ERROR_VALUE_COUNT_ON_ROW => 'счетчик значений в строке', + DB_ERROR_INVALID_DSN => 'неправильная DSN', + DB_ERROR_CONNECT_FAILED => 'соединение неуспешно', + 0 => 'нет ошибки', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'предоставлено недостаточно данных', + DB_ERROR_EXTENSION_NOT_FOUND=> 'расширение не найдено', + DB_ERROR_NOSUCHDB => 'не существует БД', + DB_ERROR_ACCESS_VIOLATION => 'недостаточно прав доступа' +); ?> \ No newline at end of file From 9af54ab70e54ca99027ab9eab893ce18c46e43dc Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 4 Aug 2015 00:42:35 +0300 Subject: [PATCH 4/4] typo --- admin/quotarow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/quotarow.php b/admin/quotarow.php index bece1287..129f3910 100755 --- a/admin/quotarow.php +++ b/admin/quotarow.php @@ -496,7 +496,7 @@ if ($questionnaire_id != false) print "
"; if (empty($rs)) { - print "

" . T_("Currently NO Restrictions based on sample records") . "

" . T_("This sample will be limited to number of competions set in quota") . "

" . T_("Caling cases for this sample will be stopped when the quota is reached") . "

"; + print "

" . T_("Currently NO Restrictions based on sample records") . "

" . T_("This sample will be limited to number of completions set in quota") . "

" . T_("Caling cases for this sample will be stopped when the quota is reached") . "

"; } else {