diff --git a/.gitignore b/.gitignore index 3f7a4162f..fd57f5154 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Vendor folder -/vendor/ +vendor/ # DEV tools .vscode/ diff --git a/admin/exportclases/class.pdfIzvoz.php b/admin/exportclases/class.pdfIzvoz.php index 262b2e8ae..292a805ea 100644 --- a/admin/exportclases/class.pdfIzvoz.php +++ b/admin/exportclases/class.pdfIzvoz.php @@ -1953,7 +1953,7 @@ class PdfIzvoz { // Prelom strani ce je kateri od naslovov gridov predolg $sqlVsehVrednsti = sisplet_query("SELECT g.naslov, g.variable FROM srv_grid g, srv_grid_multiple m WHERE m.parent='".$spremenljivke['id']."' AND g.spr_id=m.spr_id"); - $sqlMultiple = sisplet_query("SELECT g.*, s.tip, s.enota, s.dostop FROM srv_grid g, srv_grid_multiple m, srv_spremenljivka s WHERE s.id=g.spr_id AND g.spr_id=m.spr_id AND m.spr_id IN (".implode($multiple, ',').") ORDER BY m.vrstni_red, g.vrstni_red"); + $sqlMultiple = sisplet_query("SELECT g.*, s.tip, s.enota, s.dostop FROM srv_grid g, srv_grid_multiple m, srv_spremenljivka s WHERE s.id=g.spr_id AND g.spr_id=m.spr_id AND m.spr_id IN (".implode(',', $multiple).") ORDER BY m.vrstni_red, g.vrstni_red"); $linecount = 0; while ($rowVsehVrednosti = mysqli_fetch_assoc($sqlVsehVrednsti)) { @@ -1984,7 +1984,7 @@ class PdfIzvoz { // izišemo header celice $sqlVsehVrednsti = sisplet_query("SELECT g.naslov,g.variable,m.vrstni_red FROM srv_grid g, srv_grid_multiple m WHERE m.parent='".$spremenljivke['id']."' AND g.spr_id=m.spr_id ORDER BY m.vrstni_red"); - $sqlMultiple = sisplet_query("SELECT g.*, s.tip, s.enota, s.dostop FROM srv_grid g, srv_grid_multiple m, srv_spremenljivka s WHERE s.id=g.spr_id AND g.spr_id=m.spr_id AND m.spr_id IN (".implode($multiple, ',').") ORDER BY m.vrstni_red, g.vrstni_red"); + $sqlMultiple = sisplet_query("SELECT g.*, s.tip, s.enota, s.dostop FROM srv_grid g, srv_grid_multiple m, srv_spremenljivka s WHERE s.id=g.spr_id AND g.spr_id=m.spr_id AND m.spr_id IN (".implode(',', $multiple).") ORDER BY m.vrstni_red, g.vrstni_red"); while ($rowVsehVrednosti = mysqli_fetch_assoc($sqlVsehVrednsti)) { # priredimo naslov če prevajamo anketo diff --git a/admin/survey/Branching.php b/admin/survey/Branching.php index f8c84d9a2..ab16ece70 100644 --- a/admin/survey/Branching.php +++ b/admin/survey/Branching.php @@ -5043,7 +5043,7 @@ class Branching { while ($rowM = mysqli_fetch_array($sqlM)) { $multiple[] = $rowM['spr_id']; } - $sql2 = sisplet_query("SELECT g.*, s.tip, s.enota, s.dostop FROM srv_grid g, srv_grid_multiple m, srv_spremenljivka s WHERE s.id=g.spr_id AND g.spr_id=m.spr_id AND m.spr_id IN (".implode($multiple, ',').") ORDER BY m.vrstni_red, g.vrstni_red"); + $sql2 = sisplet_query("SELECT g.*, s.tip, s.enota, s.dostop FROM srv_grid g, srv_grid_multiple m, srv_spremenljivka s WHERE s.id=g.spr_id AND g.spr_id=m.spr_id AND m.spr_id IN (".implode(',', $multiple).") ORDER BY m.vrstni_red, g.vrstni_red"); $row2 = mysqli_fetch_array($sql2); for ($i = 1; $i <= mysqli_num_rows($sql2); $i++) { diff --git a/admin/survey/Glasovanje.php b/admin/survey/Glasovanje.php index 51bffbed0..6f42b6e93 100644 --- a/admin/survey/Glasovanje.php +++ b/admin/survey/Glasovanje.php @@ -2,7 +2,7 @@ global $site_path; -define('NEW_LINE', "\n", true); +define('NEW_LINE', "\n"); class Glasovanje { diff --git a/admin/survey/R/class.SurveyAnalysisR.php b/admin/survey/R/class.SurveyAnalysisR.php index b42a4c27e..0a21388b3 100644 --- a/admin/survey/R/class.SurveyAnalysisR.php +++ b/admin/survey/R/class.SurveyAnalysisR.php @@ -9,8 +9,8 @@ * */ -define("DATA_FOLDER", "admin/survey/R/TempData", true); -define("SCRIPT_FOLDER", "admin/survey/R/script", true); +define("DATA_FOLDER", "admin/survey/R/TempData"); +define("SCRIPT_FOLDER", "admin/survey/R/script"); class SurveyAnalysisR { diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php index 9cf037a1e..ed364fc79 100644 --- a/admin/survey/SurveyAdmin.php +++ b/admin/survey/SurveyAdmin.php @@ -61,23 +61,23 @@ // STARO -define("A_IZVOZI", "izvozi", true); +define("A_IZVOZI", "izvozi"); -define("M_IZVOZI_EXCEL", "excel", true); -define("M_IZVOZI_SPSS", "spss", true); -define("M_IZVOZI_txt", "txt", true); +define("M_IZVOZI_EXCEL", "excel"); +define("M_IZVOZI_SPSS", "spss"); +define("M_IZVOZI_txt", "txt"); -define("A_REPORT_VPRASALNIK_PDF", "vprasalnik_pdf", true); -define("A_REPORT_VPRASALNIK_RTF", "vprasalnik_rtf", true); +define("A_REPORT_VPRASALNIK_PDF", "vprasalnik_pdf"); +define("A_REPORT_VPRASALNIK_RTF", "vprasalnik_rtf"); -define("M_REPORT_TEXT", "text", true); -define("M_REPORT_GRAPHICAL", "graphical", true); -define("M_REPORT_TOTAL", "total", true); +define("M_REPORT_TEXT", "text"); +define("M_REPORT_GRAPHICAL", "graphical"); +define("M_REPORT_TOTAL", "total"); // ali je enka še v fazi razvoja (za potrebe skrivanja navigacije,zavihkov,ipd...) // skrite elemente prikaže samo administratorju -define("SRV_DEVELOPMENT_VERSION", true, true); +define("SRV_DEVELOPMENT_VERSION", true); // tipi uporabnikov, (za kontrolo prikaza posameznih elementov) za preverjanje kličemo funkcijo user_role_cehck define("U_ROLE_ADMIN", 0); @@ -2689,7 +2689,7 @@ class SurveyAdmin break; // 360 stopinjske analize (1ka) - case M_ANALYSIS_360_1ka : + case M_ANALYSIS_360_1KA : $S360 = new Survey3601ka($this->anketa); $S360->displayReports(); diff --git a/admin/survey/SurveyAdminAjax.php b/admin/survey/SurveyAdminAjax.php index 4891ce366..d60ad9e31 100644 --- a/admin/survey/SurveyAdminAjax.php +++ b/admin/survey/SurveyAdminAjax.php @@ -6,7 +6,7 @@ */ // STARO -define("A_REPORTI", "reporti", true); +define("A_REPORTI", "reporti"); // tipi uporabnikov, (za kontrolo prikaza posameznih elementov) za preverjanje kličemo funkcijo user_role_cehck define("U_ROLE_ADMIN", 0); @@ -14,7 +14,7 @@ define("U_ROLE_MANAGER", 1); define("U_ROLE_CLAN", 2); define("U_ROLE_NAROCNIK", 3); -define("EXPORT_FOLDER", "admin/survey/SurveyData", true); +define("EXPORT_FOLDER", "admin/survey/SurveyData"); global $site_path; diff --git a/admin/survey/SurveyAdminSettings.php b/admin/survey/SurveyAdminSettings.php index 420dd98c0..25b45ccae 100644 --- a/admin/survey/SurveyAdminSettings.php +++ b/admin/survey/SurveyAdminSettings.php @@ -5668,14 +5668,14 @@ class SurveyAdminSettings { } $cache_row = array(); - $sql_c = sisplet_query("SELECT id, recnum, time_insert, UNIX_TIMESTAMP(time_insert) AS time_insert_u FROM srv_user WHERE id IN (".implode($usrs_id, ',').")"); + $sql_c = sisplet_query("SELECT id, recnum, time_insert, UNIX_TIMESTAMP(time_insert) AS time_insert_u FROM srv_user WHERE id IN (".implode(',', $usrs_id).")"); if (!$sql_c) echo mysqli_error($GLOBALS['connect_db']); while ($row_c = mysqli_fetch_array($sql_c)) { $cache_row[ $row_c['id'] ] = $row_c; } $cache_row1 = array(); - $sql1_c = sisplet_query("SELECT usr_id, time_edit, UNIX_TIMESTAMP(time_edit) AS time_edit_u FROM srv_user_grupa".$this->db_table." WHERE usr_id IN (".implode($usrs_id, ',').") AND gru_id = '0'"); + $sql1_c = sisplet_query("SELECT usr_id, time_edit, UNIX_TIMESTAMP(time_edit) AS time_edit_u FROM srv_user_grupa".$this->db_table." WHERE usr_id IN (".implode(',', $usrs_id).") AND gru_id = '0'"); if (!$sql1_c) echo mysqli_error($GLOBALS['connect_db']); while ($row1_c = mysqli_fetch_array($sql1_c)) { $cache_row1[ $row1_c['usr_id'] ] = $row1_c; @@ -8151,16 +8151,16 @@ class SurveyAdminSettings { $chars_length = (strlen($chars) - 1); // Start our string - $string = $chars{mt_rand(0, $chars_length)}; + $string = $chars[mt_rand(0, $chars_length)]; // Generate random string for ($i = 1; $i < $length; $i = strlen($string)) { // Grab a random character from our list - $r = $chars{mt_rand(0, $chars_length)}; + $r = $chars[mt_rand(0, $chars_length)]; // Make sure the same two characters don't appear next to each other - if ($r != $string{$i - 1}) $string .= $r; + if ($r != $string[$i - 1]) $string .= $r; } // Return the string diff --git a/admin/survey/classes/class.GDPR.php b/admin/survey/classes/class.GDPR.php index 783c52c47..4ea3dedbd 100644 --- a/admin/survey/classes/class.GDPR.php +++ b/admin/survey/classes/class.GDPR.php @@ -355,7 +355,7 @@ class GDPR{ // Checkbox ce je zahteva opravljena //echo ''.($request['status'] == '1' ? $lang['srv_gdpr_requests_status_1'] : $lang['srv_gdpr_requests_status_0']).''; - echo ''; + echo ''; // Komentar avtorja echo ''; @@ -411,7 +411,7 @@ class GDPR{ // Checkbox ce je zahteva opravljena //echo ''.($request['status'] == '1' ? $lang['srv_gdpr_requests_status_1'] : $lang['srv_gdpr_requests_status_0']).''; - echo ''; + echo ''; // Komentar avtorja echo ''; diff --git a/admin/survey/classes/class.SurveyAapor.php b/admin/survey/classes/class.SurveyAapor.php index 0386402e9..55dde7004 100644 --- a/admin/survey/classes/class.SurveyAapor.php +++ b/admin/survey/classes/class.SurveyAapor.php @@ -481,7 +481,7 @@ class SurveyAapor { # od direktnega klika odštejemo e-mail vabila if (count($user_id_to_check_link)> 0) { - $qry_stringEmail = "SELECT COUNT(*) as cnt FROM srv_userstatus WHERE usr_id IN (".implode($user_id_to_check_link,',').") AND status IN (".implode($this->emailStatus,',').")"; + $qry_stringEmail = "SELECT COUNT(*) as cnt FROM srv_userstatus WHERE usr_id IN (".implode(',', $user_id_to_check_link).") AND status IN (".implode(',', $this->emailStatus).")"; $qryEmail = sisplet_query($qry_stringEmail); $rwsEmail = mysqli_fetch_assoc($qryEmail); $this->userRedirections["email"] = (int)$rwsEmail['cnt']; diff --git a/admin/survey/classes/class.SurveyAktivnost.php b/admin/survey/classes/class.SurveyAktivnost.php index a765af926..a0b0405e2 100644 --- a/admin/survey/classes/class.SurveyAktivnost.php +++ b/admin/survey/classes/class.SurveyAktivnost.php @@ -15,8 +15,7 @@ class SurveyAktivnost{ * @desc prikaze diagnostiko anket */ public function diagnostics() { - global $lang; - global $global_user_id, $admin_type; + global $lang, $global_user_id, $admin_type, $app_settings; $sum = 0; $sum_survey = 0; @@ -42,7 +41,7 @@ class SurveyAktivnost{ echo '
'; echo ''; - + $testdata = (isset($_GET['testdata']) && $_GET['testdata']=='1') ? 1 : 0; $testdataauto = (isset($_GET['testdataauto']) && $_GET['testdataauto']=='1') ? 1 : 0; $uvoz = (isset($_GET['uvoz']) && $_GET['uvoz']=='1') ? 1 : 0; @@ -53,7 +52,25 @@ class SurveyAktivnost{ $mailsent = (isset($_GET['mailsent']) && $_GET['mailsent']=='1') ? 1 : 0; $language = (isset($_GET['language'])) ? $_GET['language'] : 0; - + + if(isset($app_settings['commercial_packages']) && $app_settings['commercial_packages'] == true){ + + $package_1ka = (isset($_GET['package_1ka']) && $_GET['package_1ka']=='0') ? 0 : 1; + $package_2ka = (isset($_GET['package_2ka']) && $_GET['package_2ka']=='0') ? 0 : 1; + $package_3ka = (isset($_GET['package_3ka']) && $_GET['package_3ka']=='0') ? 0 : 1; + + echo ''.$lang['srv_narocilo_paket'].':'; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo '|'; + } + echo ''; echo ''; echo ''; @@ -163,25 +180,28 @@ class SurveyAktivnost{ $interval ) AS grupe, srv_anketa WHERE grupe.ank_id=srv_anketa.id - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) GROUP BY grupe.ank_id ORDER BY responses DESC "); } elseif ($type == 'users') { - $filter = $this->diagnostics_get_user_settings(); + $filter = $this->diagnostics_get_user_settings(); + $filter_package = $this->diagnostics_get_user_package(); $filter_lang = $this->diagnostics_get_lang_filter(); $sql = sisplet_query(" - SELECT COUNT(srv_user.id) AS responses, users.email, srv_user.ank_id, srv_anketa.naslov - FROM srv_user, srv_anketa, users - WHERE ".$filter." AND ".$filter_lang." srv_user.ank_id > '0' - AND srv_anketa.id=srv_user.ank_id - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval - AND srv_anketa.insert_uid = users.id + SELECT COUNT(srv_user.id) AS responses, users.email, srv_user.ank_id, srv_anketa.naslov, user_access.package_id + FROM srv_user, srv_anketa, users + LEFT JOIN user_access + ON user_access.usr_id=users.id + WHERE ".$filter." AND ".$filter_lang." ".$filter_package." srv_user.ank_id > '0' + AND srv_anketa.id=srv_user.ank_id + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval + AND srv_anketa.insert_uid = users.id GROUP BY ank_id ORDER BY responses DESC "); @@ -191,11 +211,11 @@ class SurveyAktivnost{ SELECT COUNT(srv_tracking_active.ank_id) AS responses, srv_tracking_active.ank_id, srv_anketa.naslov FROM srv_tracking_active, srv_anketa WHERE srv_anketa.id = srv_tracking_active.ank_id - AND (`get` LIKE '%analiza%' OR `get` LIKE '%analysis%' ) - AND NOT (`get` LIKE '%charts%') - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval + AND (`get` LIKE '%analiza%' OR `get` LIKE '%analysis%' ) + AND NOT (`get` LIKE '%charts%') + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval GROUP BY ank_id ORDER BY responses DESC "); @@ -206,11 +226,11 @@ class SurveyAktivnost{ SELECT COUNT(srv_tracking_active.ank_id) AS responses, srv_tracking_active.ank_id, srv_anketa.naslov FROM srv_tracking_active, srv_anketa WHERE srv_anketa.id = srv_tracking_active.ank_id - AND (`get` LIKE '%analiza%' OR `get` LIKE '%analysis%' ) - AND (`get` LIKE '%charts%') - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval + AND (`get` LIKE '%analiza%' OR `get` LIKE '%analysis%' ) + AND (`get` LIKE '%charts%') + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval GROUP BY ank_id ORDER BY responses DESC "); @@ -221,9 +241,9 @@ class SurveyAktivnost{ SELECT COUNT(srv_tracking_active.ank_id) AS responses, srv_tracking_active.ank_id, srv_anketa.naslov FROM srv_tracking_active, srv_anketa WHERE srv_anketa.id = srv_tracking_active.ank_id - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval GROUP BY ank_id ORDER BY responses DESC "); @@ -234,9 +254,9 @@ class SurveyAktivnost{ SELECT COUNT(srv_invitations_recipients.id) AS responses, srv_invitations_recipients.ank_id, srv_anketa.naslov FROM srv_invitations_recipients, srv_anketa WHERE srv_anketa.id = srv_invitations_recipients.ank_id AND srv_invitations_recipients.sent = '1' - AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN - (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) - $interval + AND (srv_anketa.dostop >= '" . $admin_type . "' OR srv_anketa.id IN + (SELECT ank_id FROM srv_dostop WHERE uid='" . $global_user_id . "')) + $interval GROUP BY ank_id ORDER BY responses DESC "); @@ -255,7 +275,7 @@ class SurveyAktivnost{ while ($row = mysqli_fetch_array($sql)) { if ($max == -1) - $max = max($row['responses'], $max)*1.3; + $max = max($row['responses'], $max)*1.3; echo ''; echo '' . $row['naslov'] . ''; @@ -263,9 +283,7 @@ class SurveyAktivnost{ $sum = $sum + $row['responses']; $sum_survey = $sum_survey + 1; echo '
 
 '.$row['responses'].'
'; - echo ' - '; - //$sum_survey = sizeof($row); + echo ''; } echo ''; - //self::sumMultiText($spid,'sums',true, true); self::sumMultiTextHeatMap($spid,'sums',true, true); - //self::sumVerticalCheckbox($spid,'sums'); - //self::sumHorizontal($spid,'sums*'); break; case 5: @@ -1517,9 +1513,7 @@ class SurveyAnalysis { break; case 27: # heatmap - //self::sumMultiText($spid,'sums',true, true); self::sumMultiTextHeatMap($spid,'sums',true, true); - //self::sumHorizontal($spid,'sums*'); break; case 5: # nagovor diff --git a/admin/survey/classes/class.SurveyAnalysisArchive.php b/admin/survey/classes/class.SurveyAnalysisArchive.php index 2cc81022e..eddcb3dea 100644 --- a/admin/survey/classes/class.SurveyAnalysisArchive.php +++ b/admin/survey/classes/class.SurveyAnalysisArchive.php @@ -21,8 +21,8 @@ */ -define("SAA_FOLDER", "AnalysisArchive", true); -define("DEFAULT_DURATION", " +3 month", true); // privzet čas trajanja athiva +define("SAA_FOLDER", "AnalysisArchive"); +define("DEFAULT_DURATION", " +3 month"); // privzet čas trajanja athiva class SurveyAnalysisArchive { diff --git a/admin/survey/classes/class.SurveyBreak.php b/admin/survey/classes/class.SurveyBreak.php index 59b37975c..d863c97cb 100644 --- a/admin/survey/classes/class.SurveyBreak.php +++ b/admin/survey/classes/class.SurveyBreak.php @@ -8,8 +8,8 @@ * */ -define("EXPORT_FOLDER", "admin/survey/SurveyData", true); -define("BREAK_OPTION_LIMIT", 15, true); +define("EXPORT_FOLDER", "admin/survey/SurveyData"); +define("BREAK_OPTION_LIMIT", 15); class SurveyBreak { diff --git a/admin/survey/classes/class.SurveyChart.php b/admin/survey/classes/class.SurveyChart.php index 8f14a1ab9..e6e077ffb 100644 --- a/admin/survey/classes/class.SurveyChart.php +++ b/admin/survey/classes/class.SurveyChart.php @@ -4,7 +4,7 @@ * @date Februar 2011 */ -define("SAA_FOLDER", "AnalysisArchive", true); +define("SAA_FOLDER", "AnalysisArchive"); class SurveyChart { diff --git a/admin/survey/classes/class.SurveyCrosstabs.php b/admin/survey/classes/class.SurveyCrosstabs.php index 7206cd8d2..b0ada1f68 100644 --- a/admin/survey/classes/class.SurveyCrosstabs.php +++ b/admin/survey/classes/class.SurveyCrosstabs.php @@ -5,11 +5,11 @@ * */ -define("EXPORT_FOLDER", "admin/survey/SurveyData", true); +define("EXPORT_FOLDER", "admin/survey/SurveyData"); # mejne vrednosti za barvanje residualov -define("RESIDUAL_COLOR_LIMIT1", 1.00, true); -define("RESIDUAL_COLOR_LIMIT2", 2.00, true); -define("RESIDUAL_COLOR_LIMIT3", 3.00, true); +define("RESIDUAL_COLOR_LIMIT1", 1.00); +define("RESIDUAL_COLOR_LIMIT2", 2.00); +define("RESIDUAL_COLOR_LIMIT3", 3.00); define("AUTO_HIDE_ZERRO_VALUE", 20); # nad koliko kategorij skrivamo ničelne vrednosti @session_start(); diff --git a/admin/survey/classes/class.SurveyDiagnostics.php b/admin/survey/classes/class.SurveyDiagnostics.php index cf0dc88b9..47329191d 100644 --- a/admin/survey/classes/class.SurveyDiagnostics.php +++ b/admin/survey/classes/class.SurveyDiagnostics.php @@ -9,27 +9,27 @@ */ if(session_id() == '') {session_start();} -define("SPR_ON_PAGE_LIMIT", 8, true); # priporočeno število spremenljivk na stran -define("SPR_IN_BLOCK_LIMIT", 15, true); # priporočeno število spremenljivk na blok -define("SUB_Q_IN_GRID_LIMIT", 8, true); # priporočeno število podvprašanj na grid -define("SPR_UNAPROPRIATE_START_LIMIT", 30, true); # koliko % spremenljivk preverjamo na pravilen začetek -define("SPR_REMINDER_ON_MGRID_LIMIT", 10, true); # koliko % spremenljivk preverjamo na pravilen začetek -define("TIME_SOFT_LIMIT", 120, true); # čas izpolnjevanja 2 minuti priporočilo -define("TIME_HARD_LIMIT", 900, true); # čas izpolnjevanja 15 minut opozorilo +define("SPR_ON_PAGE_LIMIT", 8); # priporočeno število spremenljivk na stran +define("SPR_IN_BLOCK_LIMIT", 15); # priporočeno število spremenljivk na blok +define("SUB_Q_IN_GRID_LIMIT", 8); # priporočeno število podvprašanj na grid +define("SPR_UNAPROPRIATE_START_LIMIT", 30); # koliko % spremenljivk preverjamo na pravilen začetek +define("SPR_REMINDER_ON_MGRID_LIMIT", 10); # koliko % spremenljivk preverjamo na pravilen začetek +define("TIME_SOFT_LIMIT", 120); # čas izpolnjevanja 2 minuti priporočilo +define("TIME_HARD_LIMIT", 900); # čas izpolnjevanja 15 minut opozorilo -define("DIAG_SPR_ON_PAGE", "DIAG_SPR_ON_PAGE", true); # Zaznali smo preveč spremenljivk na stran -define("DIAG_SPR_IN_BLOCK", "DIAG_SPR_IN_BLOCK", true); # Zaznali smo preveč spremenljivk na blok -define("DIAG_SUB_Q_IN_GRID", "DIAG_SUB_Q_IN_GRID", true); # Zaznali smo preveč podvprašanj v gridu -define("DIAG_REMINDER_ON_IF", "DIAG_REMINDER_ON_IF", true); # Manjka reminder na spremenljvko na katero se sklicuje if -define("DIAG_REMINDER_ON_MGRID", "DIAG_REMINDER_ON_MGRID", true); # Reminder na spremenljvko z veliko podvprašanji -define("DIAG_UNAPROPRIATE_START", "DIAG_UNAPROPRIATE_START", true); # ali imamo na začetku ankete neprimerna vprašanja -define("DIAG_INVALID_CONDITIONS", "DIAG_INVALID_CONDITIONS", true); # Ali so napake v ifih -define("DIAG_INVALID_VARIABLENAMES", "DIAG_INVALID_VARIABLENAMES", true); # Ali so varable podvojene -define("DIAG_INVALID_VALIDATIONS", "DIAG_INVALID_VALIDATIONS", true); # Ali so napacne validacije na spremenljivkah -define("DIAG_TIME_SOFT_LIMIT", "DIAG_TIME_SOFT_LIMIT", true); # predolga anketa 1 -define("DIAG_TIME_HARD_LIMIT", "DIAG_TIME_HARD_LIMIT", true); # predolga anketa 2 +define("DIAG_SPR_ON_PAGE", "DIAG_SPR_ON_PAGE"); # Zaznali smo preveč spremenljivk na stran +define("DIAG_SPR_IN_BLOCK", "DIAG_SPR_IN_BLOCK"); # Zaznali smo preveč spremenljivk na blok +define("DIAG_SUB_Q_IN_GRID", "DIAG_SUB_Q_IN_GRID"); # Zaznali smo preveč podvprašanj v gridu +define("DIAG_REMINDER_ON_IF", "DIAG_REMINDER_ON_IF"); # Manjka reminder na spremenljvko na katero se sklicuje if +define("DIAG_REMINDER_ON_MGRID", "DIAG_REMINDER_ON_MGRID"); # Reminder na spremenljvko z veliko podvprašanji +define("DIAG_UNAPROPRIATE_START", "DIAG_UNAPROPRIATE_START"); # ali imamo na začetku ankete neprimerna vprašanja +define("DIAG_INVALID_CONDITIONS", "DIAG_INVALID_CONDITIONS"); # Ali so napake v ifih +define("DIAG_INVALID_VARIABLENAMES", "DIAG_INVALID_VARIABLENAMES"); # Ali so varable podvojene +define("DIAG_INVALID_VALIDATIONS", "DIAG_INVALID_VALIDATIONS"); # Ali so napacne validacije na spremenljivkah +define("DIAG_TIME_SOFT_LIMIT", "DIAG_TIME_SOFT_LIMIT"); # predolga anketa 1 +define("DIAG_TIME_HARD_LIMIT", "DIAG_TIME_HARD_LIMIT"); # predolga anketa 2 class SurveyDiagnostics { diff --git a/admin/survey/classes/class.SurveyExport.php b/admin/survey/classes/class.SurveyExport.php index f1f93d8f6..844ad0c59 100644 --- a/admin/survey/classes/class.SurveyExport.php +++ b/admin/survey/classes/class.SurveyExport.php @@ -11,13 +11,12 @@ * */ -DEFINE (NEW_LINE, "\n", true); -DEFINE (TMP_EXT, '.tmp', true); -DEFINE (STR_DLMT, '|', true); -DEFINE (DAT_EXT, '.dat', true); +DEFINE (NEW_LINE, "\n"); +DEFINE (TMP_EXT, '.tmp'); +DEFINE (STR_DLMT, '|'); +DEFINE (DAT_EXT, '.dat'); -#define("EXPORT_FOLDER", "tmp", true); -define("EXPORT_FOLDER", "admin/survey/SurveyData", true); +define("EXPORT_FOLDER", "admin/survey/SurveyData"); class SurveyExport { diff --git a/admin/survey/classes/class.SurveyInpect.php b/admin/survey/classes/class.SurveyInpect.php index e9066c487..2aa62210d 100644 --- a/admin/survey/classes/class.SurveyInpect.php +++ b/admin/survey/classes/class.SurveyInpect.php @@ -5,10 +5,10 @@ * */ -define('SI_DEFAULT_PROFILE', false, true); -define('SI_GOTO_ANALIZE', 0, true); -define('SI_GOTO_VPOGLED', 1, true); -define('SI_GOTO_PODATKI', 2, true); +define('SI_DEFAULT_PROFILE', false); +define('SI_GOTO_ANALIZE', 0); +define('SI_GOTO_VPOGLED', 1); +define('SI_GOTO_PODATKI', 2); class SurveyInspect { diff --git a/admin/survey/classes/class.SurveyInvitationsNew.php b/admin/survey/classes/class.SurveyInvitationsNew.php index ce2f8aa25..f8dd41e7d 100644 --- a/admin/survey/classes/class.SurveyInvitationsNew.php +++ b/admin/survey/classes/class.SurveyInvitationsNew.php @@ -9,10 +9,10 @@ * */ -define('GROUP_PAGINATE', 4, true); # po kolko strani grupira pri paginaciji -define('REC_ON_PAGE', 10, true); # kolko zapisov na stran pri urejanju respondentov -define('REC_ON_SEND_PAGE', 20, true); # kolko zapisov na stran pri pošiljanju -define('NOTIFY_INFO1KA', 5, true); # Nad koliko emaili obveščamo info@1ka.si +define('GROUP_PAGINATE', 4); # po kolko strani grupira pri paginaciji +define('REC_ON_PAGE', 10); # kolko zapisov na stran pri urejanju respondentov +define('REC_ON_SEND_PAGE', 20); # kolko zapisov na stran pri pošiljanju +define('NOTIFY_INFO1KA', 5); # Nad koliko emaili obveščamo info@1ka.si set_time_limit(2400); # 30 minut class SurveyInvitationsNew { diff --git a/admin/survey/classes/class.SurveyList.php b/admin/survey/classes/class.SurveyList.php index 534081e00..8f775d879 100644 --- a/admin/survey/classes/class.SurveyList.php +++ b/admin/survey/classes/class.SurveyList.php @@ -7,14 +7,14 @@ * */ -define('SRV_LIST_ORDER_BY', 16, true); # privzeto: sortiranje po stolpcu 1 -define('SRV_LIST_ORDER_TYPE', 1, true); # privzeto: sortiranje padajoče -define('SRV_LIST_REC_PER_PAGE', 25, true); # privzeto: koliko zapisov na stran prikažemo -define('SRV_LIST_GET_AS_LIST', true, true); # privzeto: ali lovimo kot seznam ali kot drevo folderjev -define('SRV_LIST_GET_SUB_FOLDERS', true, true); # privzeto: ali poizvedujemo po poddirektorijih -define('SRV_LIST_CHECK_DOSTOP', true, true); # ali preverja dostop na nivoju ankete -define('SRV_LIST_GROUP_PAGINATE', 5, true); # po kolko strani grupira pri paginaciji -define('SRV_LIST_UPDATE_TIME_LIMIT', 900, true); # na koliko minut updejtamo: 15min = 60s*15 +define('SRV_LIST_ORDER_BY', 16); # privzeto: sortiranje po stolpcu 1 +define('SRV_LIST_ORDER_TYPE', 1); # privzeto: sortiranje padajoče +define('SRV_LIST_REC_PER_PAGE', 25); # privzeto: koliko zapisov na stran prikažemo +define('SRV_LIST_GET_AS_LIST', true); # privzeto: ali lovimo kot seznam ali kot drevo folderjev +define('SRV_LIST_GET_SUB_FOLDERS', true); # privzeto: ali poizvedujemo po poddirektorijih +define('SRV_LIST_CHECK_DOSTOP', true); # ali preverja dostop na nivoju ankete +define('SRV_LIST_GROUP_PAGINATE', 5); # po kolko strani grupira pri paginaciji +define('SRV_LIST_UPDATE_TIME_LIMIT', 900); # na koliko minut updejtamo: 15min = 60s*15 if(session_id() == '') {session_start();} @@ -3047,7 +3047,7 @@ class SurveyList { $to_update = $meta_surveys_ids; # poiščemmo katere ankete so OK, in jih odstranimo iz seznama anket potrebnih za update - $stringSurveyList = "SELECT id FROM srv_survey_list WHERE id IN (".implode($meta_surveys_ids,',').")" + $stringSurveyList = "SELECT id FROM srv_survey_list WHERE id IN (".implode(',', $meta_surveys_ids).")" #. " AND (updated = '0' OR (updated = '1' AND TIME_TO_SEC(TIMEDIFF(NOW(),last_updated)) < ".SRV_LIST_UPDATE_TIME_LIMIT.")) AND ( last_updated IS NOT NULL)"; . " AND updated = '0' AND last_updated IS NOT NULL"; $sqlSurveyList = sisplet_query($stringSurveyList); @@ -3061,7 +3061,7 @@ class SurveyList { $to_update = $this->surveys_ids; # poiščemmo katere ankete so OK, in jih odstranimo iz seznama anket potrebnih za update - $stringSurveyList = "SELECT id FROM srv_survey_list WHERE id IN (".implode($this->surveys_ids,',').")" + $stringSurveyList = "SELECT id FROM srv_survey_list WHERE id IN (".implode(',', $this->surveys_ids).")" #. " AND (updated = '0' OR (updated = '1' AND TIME_TO_SEC(TIMEDIFF(NOW(),last_updated)) < ".SRV_LIST_UPDATE_TIME_LIMIT.")) AND ( last_updated IS NOT NULL)"; . " AND updated = '0' AND last_updated IS NOT NULL"; $sqlSurveyList = sisplet_query($stringSurveyList); @@ -3091,24 +3091,24 @@ class SurveyList { . ' FROM srv_anketa sa' - . " LEFT OUTER JOIN ( SELECT ank_id, uid, COUNT(*) AS lib_glb FROM srv_library_anketa as sla WHERE sla.uid = '0' AND sla.ank_id IN (".implode($to_update,',').") GROUP BY ank_id ) + . " LEFT OUTER JOIN ( SELECT ank_id, uid, COUNT(*) AS lib_glb FROM srv_library_anketa as sla WHERE sla.uid = '0' AND sla.ank_id IN (".implode(',', $to_update).") GROUP BY ank_id ) AS sla1 ON sla1.ank_id = sa.id" - . " LEFT OUTER JOIN ( SELECT ank_id, uid, COUNT(*) AS lib_usr FROM srv_library_anketa as sla WHERE sla.uid = '".$this->g_uid."' AND sla.ank_id IN (".implode($to_update,',').") GROUP BY ank_id ) + . " LEFT OUTER JOIN ( SELECT ank_id, uid, COUNT(*) AS lib_usr FROM srv_library_anketa as sla WHERE sla.uid = '".$this->g_uid."' AND sla.ank_id IN (".implode(',', $to_update).") GROUP BY ank_id ) AS sla2 ON sla2.ank_id = sa.id" //. ' LEFT OUTER JOIN users AS us1 ON us1.id = sa.edit_uid' //. ' LEFT OUTER JOIN users AS us2 ON us2.id = sa.insert_uid' - . ' LEFT OUTER JOIN ( SELECT us3.ank_id, COUNT(us3.ank_id) as answers, MIN( us3.time_insert ) as vnos_time_first, MAX( us3.time_insert ) as vnos_time_last, preview FROM srv_user as us3 WHERE us3.ank_id IN ('.implode($to_update,',').') AND us3.preview = \'0\' AND us3.deleted=\'0\' GROUP BY us3.ank_id ) + . ' LEFT OUTER JOIN ( SELECT us3.ank_id, COUNT(us3.ank_id) as answers, MIN( us3.time_insert ) as vnos_time_first, MAX( us3.time_insert ) as vnos_time_last, preview FROM srv_user as us3 WHERE us3.ank_id IN ('.implode(',', $to_update).') AND us3.preview = \'0\' AND us3.deleted=\'0\' GROUP BY us3.ank_id ) AS us3 ON us3.ank_id = sa.id' - . ' LEFT OUTER JOIN ( SELECT g.ank_id, COUNT(s.gru_id) as variables FROM srv_grupa g, srv_spremenljivka s WHERE g.id = s.gru_id AND g.ank_id IN ('.implode($to_update,',').') GROUP BY g.ank_id ) + . ' LEFT OUTER JOIN ( SELECT g.ank_id, COUNT(s.gru_id) as variables FROM srv_grupa g, srv_spremenljivka s WHERE g.id = s.gru_id AND g.ank_id IN ('.implode(',', $to_update).') GROUP BY g.ank_id ) AS g ON g.ank_id = sa.id' //spodaj dodaj AND us5.lurker=\'0\' - . ' LEFT OUTER JOIN ( SELECT us5.ank_id, COUNT(us5.ank_id) as approp, preview FROM srv_user as us5 WHERE last_status IN (' . $this->appropriateStatus . ') AND us5.ank_id IN ('.implode($to_update,',').') AND us5.preview =\'0\' AND us5.deleted=\'0\' GROUP BY us5.ank_id ) + . ' LEFT OUTER JOIN ( SELECT us5.ank_id, COUNT(us5.ank_id) as approp, preview FROM srv_user as us5 WHERE last_status IN (' . $this->appropriateStatus . ') AND us5.ank_id IN ('.implode(',', $to_update).') AND us5.preview =\'0\' AND us5.deleted=\'0\' GROUP BY us5.ank_id ) AS us5 ON us5.ank_id = sa.id' - . ' WHERE sa.id IN ('.implode($to_update,',').')'; + . ' WHERE sa.id IN ('.implode(',', $to_update).')'; $sqlUpdateList = sisplet_query($stringUpdateList); if (!$sqlUpdateList) echo mysqli_error($GLOBALS['connect_db']); @@ -3122,7 +3122,7 @@ class SurveyList { FROM srv_anketa sa LEFT OUTER JOIN users AS us1 ON us1.id = sa.edit_uid LEFT OUTER JOIN users AS us2 ON us2.id = sa.insert_uid - WHERE sa.id IN (".implode($to_update,',').")"); + WHERE sa.id IN (".implode(',', $to_update).")"); while($rowUsers = mysqli_fetch_array($sqlUsers)){ $users[$rowUsers['ank_id']] = $rowUsers; } @@ -3147,7 +3147,7 @@ class SurveyList { } $updateString = "INSERT INTO srv_survey_list (id, lib_glb, lib_usr, answers, variables, approp, i_name, i_surname, i_email, e_name, e_surname, e_email, a_first, a_last, updated, last_updated) " - ." VALUES ".implode($values,',')." ON DUPLICATE KEY UPDATE id=VALUES(id), lib_glb=VALUES(lib_glb), lib_usr=VALUES(lib_usr), answers=VALUES(answers), variables=VALUES(variables), approp=VALUES(approp), i_name=VALUES(i_name), i_surname=VALUES(i_surname), i_email=VALUES(i_email), e_name=VALUES(e_name), e_surname=VALUES(e_surname), e_email=VALUES(e_email), a_first=VALUES(a_first), a_last=VALUES(a_last), updated='0', last_updated=NOW()"; + ." VALUES ".implode(',', $values)." ON DUPLICATE KEY UPDATE id=VALUES(id), lib_glb=VALUES(lib_glb), lib_usr=VALUES(lib_usr), answers=VALUES(answers), variables=VALUES(variables), approp=VALUES(approp), i_name=VALUES(i_name), i_surname=VALUES(i_surname), i_email=VALUES(i_email), e_name=VALUES(e_name), e_surname=VALUES(e_surname), e_email=VALUES(e_email), a_first=VALUES(a_first), a_last=VALUES(a_last), updated='0', last_updated=NOW()"; sisplet_query($updateString); diff --git a/admin/survey/classes/class.SurveyMeans.php b/admin/survey/classes/class.SurveyMeans.php index 895c049fb..0775dfdba 100644 --- a/admin/survey/classes/class.SurveyMeans.php +++ b/admin/survey/classes/class.SurveyMeans.php @@ -8,7 +8,7 @@ * */ -define("EXPORT_FOLDER", "admin/survey/SurveyData", true); +define("EXPORT_FOLDER", "admin/survey/SurveyData"); class SurveyMeans{ diff --git a/admin/survey/classes/class.SurveyMultiCrosstabs.php b/admin/survey/classes/class.SurveyMultiCrosstabs.php index 0aca0df8d..758c0f6f1 100644 --- a/admin/survey/classes/class.SurveyMultiCrosstabs.php +++ b/admin/survey/classes/class.SurveyMultiCrosstabs.php @@ -1,8 +1,8 @@ Init($this->anketa); // Preberemo tabelo s podatki za izbrane filtre (ce ze obstaja) - $filterString = implode($this->paraGraph_filter, '_'); + $filterString = implode('_', $this->paraGraph_filter); $paraData = unserialize(SurveySetting::getInstance()->getSurveyMiscSetting('para_graph_data_'.$filterString)); // Pogledamo kdaj je bila kreirana datoteka (ce imamo nove podatke) diff --git a/admin/survey/classes/class.SurveySimpleMailInvitation.php b/admin/survey/classes/class.SurveySimpleMailInvitation.php index d850ca938..b548c1328 100644 --- a/admin/survey/classes/class.SurveySimpleMailInvitation.php +++ b/admin/survey/classes/class.SurveySimpleMailInvitation.php @@ -5,7 +5,8 @@ * */ -define("SIMPLE_MAIL_QUOTA", 20, true); +define("SIMPLE_MAIL_QUOTA", 20); + class SurveySimpleMailInvitation { public $sid; # id ankete diff --git a/admin/survey/classes/class.SurveyStatistic.php b/admin/survey/classes/class.SurveyStatistic.php index e217491c1..ca2b4bf28 100644 --- a/admin/survey/classes/class.SurveyStatistic.php +++ b/admin/survey/classes/class.SurveyStatistic.php @@ -548,12 +548,6 @@ class SurveyStatistic { } } - /*$qry = sisplet_query("SELECT id, last_status, lurker, testdata, inv_res_id, referer, language - FROM srv_user - WHERE ank_id = '".$this->getSurveyId()."' AND preview = '0' AND deleted='0' - AND ( (time_insert BETWEEN '".$this->startDate."' AND '".$this->endDate."' + INTERVAL 1 DAY) OR (last_status IN (".implode($this->emailStatus,',').") ) )" - .$email_filter_string - );*/ // Tukaj ne vem zakaj filtriramo po datumu? Itak rabimo vse $qry = sisplet_query("SELECT id, last_status, lurker, testdata, inv_res_id, referer, language FROM srv_user @@ -647,7 +641,7 @@ class SurveyStatistic { # od direktnega klika odštejemo e-mail vabila if (count($user_id_to_check_link)> 0) { - $qryEmail = sisplet_query("SELECT COUNT(*) as cnt FROM srv_userstatus WHERE usr_id IN (".implode($user_id_to_check_link,',').") AND status IN (".implode($this->emailStatus,',').")"); + $qryEmail = sisplet_query("SELECT COUNT(*) as cnt FROM srv_userstatus WHERE usr_id IN (".implode(',', $user_id_to_check_link).") AND status IN (".implode(',', $this->emailStatus).")"); $rwsEmail = mysqli_fetch_assoc($qryEmail); $this->userRedirections["email"] = (int)$rwsEmail['cnt']; diff --git a/admin/survey/classes/class.SurveyStatusProfiles.php b/admin/survey/classes/class.SurveyStatusProfiles.php index 383258571..947ce80ea 100644 --- a/admin/survey/classes/class.SurveyStatusProfiles.php +++ b/admin/survey/classes/class.SurveyStatusProfiles.php @@ -6,7 +6,7 @@ */ session_start(); -DEFINE (STR_DLMT, "|", true); +DEFINE (STR_DLMT, "|"); class SurveyStatusProfiles { diff --git a/admin/survey/classes/class.SurveyTTest.php b/admin/survey/classes/class.SurveyTTest.php index 26efd2204..c49657371 100644 --- a/admin/survey/classes/class.SurveyTTest.php +++ b/admin/survey/classes/class.SurveyTTest.php @@ -8,9 +8,9 @@ * */ -define("EXPORT_FOLDER", "admin/survey/SurveyData", true); -define("BC_PRECISION", 20, true); -define("R_FOLDER", "admin/survey/R", true); +define("EXPORT_FOLDER", "admin/survey/SurveyData"); +define("BC_PRECISION", 20); +define("R_FOLDER", "admin/survey/R"); class SurveyTTest { diff --git a/admin/survey/classes/class.SurveyTableChart.php b/admin/survey/classes/class.SurveyTableChart.php index c0d21ba86..3fc576d18 100644 --- a/admin/survey/classes/class.SurveyTableChart.php +++ b/admin/survey/classes/class.SurveyTableChart.php @@ -4,7 +4,7 @@ * @date April 2012 */ -define("SAA_FOLDER", "AnalysisArchive", true); +define("SAA_FOLDER", "AnalysisArchive"); class SurveyTableChart { diff --git a/admin/survey/classes/class.SurveyTelephone.php b/admin/survey/classes/class.SurveyTelephone.php index 1d66b1597..825e5e054 100644 --- a/admin/survey/classes/class.SurveyTelephone.php +++ b/admin/survey/classes/class.SurveyTelephone.php @@ -5,9 +5,9 @@ * * @author Gorazd_Veselic */ -define('GROUP_PAGINATE', 4, true); # po kolko strani grupira pri paginaciji -define('REC_ON_PAGE', 50, true); # kolko zapisov na stran pri urejanju respondentov -define('REC_ON_SEND_PAGE', 20, true); # kolko zapisov na stran pri pošiljanju +define('GROUP_PAGINATE', 4); # po kolko strani grupira pri paginaciji +define('REC_ON_PAGE', 50); # kolko zapisov na stran pri urejanju respondentov +define('REC_ON_SEND_PAGE', 20); # kolko zapisov na stran pri pošiljanju set_time_limit(2400); # 30 minut diff --git a/admin/survey/classes/class.SurveyVariablesProfiles.php b/admin/survey/classes/class.SurveyVariablesProfiles.php index 332405c97..15ad1103c 100644 --- a/admin/survey/classes/class.SurveyVariablesProfiles.php +++ b/admin/survey/classes/class.SurveyVariablesProfiles.php @@ -11,7 +11,7 @@ * */ DEFINE ('SVP_DEFAULT_PROFILE', 0); -DEFINE (NEW_LINE, "\n", true); +DEFINE (NEW_LINE, "\n"); class SurveyVariablesProfiles { diff --git a/admin/survey/classes/class.SurveyZankaProfiles.php b/admin/survey/classes/class.SurveyZankaProfiles.php index fecaba8ff..cac04d57d 100644 --- a/admin/survey/classes/class.SurveyZankaProfiles.php +++ b/admin/survey/classes/class.SurveyZankaProfiles.php @@ -19,7 +19,7 @@ */ session_start(); -define('SZP_DEFAULT_PROFILE', 0, true); +define('SZP_DEFAULT_PROFILE', 0); class SurveyZankaProfiles { diff --git a/admin/survey/classes/surveyData/class.SurveyDataDisplay.php b/admin/survey/classes/surveyData/class.SurveyDataDisplay.php index f25d710a0..c56e7458a 100644 --- a/admin/survey/classes/surveyData/class.SurveyDataDisplay.php +++ b/admin/survey/classes/surveyData/class.SurveyDataDisplay.php @@ -12,28 +12,28 @@ #KONSTANTE // spremenljivke, ki se podajajo preko GETa -define('VAR_REC_ON_PAGE', 'rec_on_page', true); -define('VAR_SPR_LIMIT', 'spr_limit', true); -define('VAR_CUR_REC_PAGE', 'cur_rec_page', true); -define('VAR_SPR_PAGE', 'spr_page', true); -define('VAR_ORDER', 'order', true); -define('VAR_EDIT', 'edit', true); -define('VAR_PRINT', 'print', true); -define('VAR_MONITORING', 'monitoring', true); -define('VAR_CODING', 'coding', true); -define('VAR_DATA', 'view_data', true); -define('VAR_META', 'view_meta', true); -define('VAR_CIRCLES', 'view_circles', true); -define('VAR_METAFULL', 'view_fullmeta', true); -define('VAR_SHOW_SYSTEM', 'view_system', true); -define('VAR_SORT_SEQ', 'sort_seq', true); -define('VAR_SORT_TYPE', 'sort_type', true); -define('VAR_PDF_TYPE', 'type', true); -define('VAR_RELEVANCE', 'view_relevance', true); +define('VAR_REC_ON_PAGE', 'rec_on_page'); +define('VAR_SPR_LIMIT', 'spr_limit'); +define('VAR_CUR_REC_PAGE', 'cur_rec_page'); +define('VAR_SPR_PAGE', 'spr_page'); +define('VAR_ORDER', 'order'); +define('VAR_EDIT', 'edit'); +define('VAR_PRINT', 'print'); +define('VAR_MONITORING', 'monitoring'); +define('VAR_CODING', 'coding'); +define('VAR_DATA', 'view_data'); +define('VAR_META', 'view_meta'); +define('VAR_CIRCLES', 'view_circles'); +define('VAR_METAFULL', 'view_fullmeta'); +define('VAR_SHOW_SYSTEM', 'view_system'); +define('VAR_SORT_SEQ', 'sort_seq'); +define('VAR_SORT_TYPE', 'sort_type'); +define('VAR_PDF_TYPE', 'type'); +define('VAR_RELEVANCE', 'view_relevance'); define('VAR_SHOW_DATE', 'view_date', false); define('VAR_SHOW_NO', 'view_no', false); -define('VAR_EMAIL', 'email', true); -define('SRV_LIST_GROUP_PAGINATE', 4, true); # po kolko strani grupira pri paginaciji +define('VAR_EMAIL', 'email'); +define('SRV_LIST_GROUP_PAGINATE', 4); # po kolko strani grupira pri paginaciji global $site_path; diff --git a/admin/survey/definition.php b/admin/survey/definition.php index 5b4e2d74d..964668707 100644 --- a/admin/survey/definition.php +++ b/admin/survey/definition.php @@ -4,245 +4,245 @@ define('IS_LINUX', (DIRECTORY_SEPARATOR === '\\') ? FALSE : TRUE); # NASTAVITVE ANKETE - define('ANKETA_NASLOV_MAXLENGTH', '40', true); # KOLIKO ZNAKOV LAHKO VSEBUJE INTERNO IME ANKETE - define('ANKETA_AKRONIM_MAXLENGTH', '100', true); # KOLIKO ZNAKOV LAHKO VSEBUJE AKRONIM ANKETE - define('ANKETA_NOTE_MAXLENGTH', '250', true); # KOLIKO ZNAKOV LAHKO VSEBUJE OPIS ANKETE + define('ANKETA_NASLOV_MAXLENGTH', '40'); # KOLIKO ZNAKOV LAHKO VSEBUJE INTERNO IME ANKETE + define('ANKETA_AKRONIM_MAXLENGTH', '100'); # KOLIKO ZNAKOV LAHKO VSEBUJE AKRONIM ANKETE + define('ANKETA_NOTE_MAXLENGTH', '250'); # KOLIKO ZNAKOV LAHKO VSEBUJE OPIS ANKETE # za url-je za navigacijo - define('NEW_LINE', "\n", true); + define('NEW_LINE', "\n"); ##### NAVIGACIJA #### - define("NAVI_STATUS", "NAVI_STATUS", true); - define("NAVI_STATUS_OSNOVNI", "NAVI_STATUS_OSNOVNI", true); - define("NAVI_STATUS_TRAJANJE", "NAVI_STATUS_TRAJANJE", true); - define("NAVI_AAPOR","AAPOR",true); - define("NAVI_UREJANJE", "NAVI_UREJANJE", true); - define("NAVI_TESTIRANJE", "NAVI_TESTIRANJE", true); - define("NAVI_TESTIRANJE_KOMENTARJI", "NAVI_TESTIRANJE_KOMENTARJI", true); - define("NAVI_TESTIRANJE_PREDVIDENI", "NAVI_TESTIRANJE_PREDVIDENI", true); - define("NAVI_TESTIRANJE_CAS", "NAVI_TESTIRANJE_CAS", true); - define("NAVI_TESTIRANJE_VNOSI", "NAVI_TESTIRANJE_VNOSI", true); - define("NAVI_TESTIRANJE_LANGUAGE_TECHNOLOGY", "NAVI_TESTIRANJE_LANGUAGE_TECHNOLOGY", true); - define("NAVI_TESTIRANJE_LANGUAGE_TECHNOLOGY_OLD", "NAVI_TESTIRANJE_LANGUAGE_TECHNOLOGY_OLD", true); - define("NAVI_UREJANJE_BRANCHING", "NAVI_UREJANJE_BRANCHING", true); - define("NAVI_UREJANJE_ANKETA", "NAVI_UREJANJE_ANKETA", true); - define("NAVI_UREJANJE_TEMA", "NAVI_UREJANJE_TEMA", true); - define("NAVI_UREJANJE_ALERT", "NAVI_UREJANJE_ALERT", true); - define("NAVI_UREJANJE_TESTIRANJE", "NAVI_UREJANJE_TESTIRANJE", true); - define("NAVI_TESTIRANJE_KOMENTARJI_ANKETA", "NAVI_TESTIRANJE_KOMENTARJI_ANKETA", true); - define("NAVI_UREJANJE_PREVAJANJE", "NAVI_UREJANJE_PREVAJANJE", true); - define("NAVI_OBJAVA", "NAVI_OBJAVA", true); - define("NAVI_ANALYSIS", "NAVI_ANALYSIS", true); - define("NAVI_RESULTS", "NAVI_RESULTS", true); - define("NAVI_ADVANCED", "NAVI_ADVANCED", true); - define("NAVI_UPORABNOST", "NAVI_UPORABNOST", true); - define("NAVI_HIERARHIJA_SUPERADMIN", "NAVI_HIERARHIJA_SUPERADMIN", true); - define("NAVI_HIERARHIJA", "NAVI_HIERARHIJA", true); - define("NAVI_KVIZ", "NAVI_KVIZ", true); - define("NAVI_VNOS", "NAVI_VNOS", true); - define("NAVI_PHONE", "NAVI_PHONE", true); - define("NAVI_360", "NAVI_360", true); - define("NAVI_SOCIAL_NETWORK", "NAVI_SOCIAL_NETWORK", true); - define("NAVI_SLIDESHOW", "NAVI_SLIDESHOW", true); - define("NAVI_STATISTIC_ANALYSIS", "NAVI_STATISTIC_ANALYSIS", true); - define("NAVI_ANALYSIS_LINKS", "NAVI_ANALYSIS_LINKS", true); - define("NAVI_ANALYSIS_TIMES", "NAVI_ANALYSIS_TIMES", true); - define("NAVI_DATA", "NAVI_DATA", true); - define("NAVI_DATA_EXPORT", "NAVI_DATA_EXPORT", true); + define("NAVI_STATUS", "NAVI_STATUS"); + define("NAVI_STATUS_OSNOVNI", "NAVI_STATUS_OSNOVNI"); + define("NAVI_STATUS_TRAJANJE", "NAVI_STATUS_TRAJANJE"); + define("NAVI_AAPOR", "AAPOR"); + define("NAVI_UREJANJE", "NAVI_UREJANJE"); + define("NAVI_TESTIRANJE", "NAVI_TESTIRANJE"); + define("NAVI_TESTIRANJE_KOMENTARJI", "NAVI_TESTIRANJE_KOMENTARJI"); + define("NAVI_TESTIRANJE_PREDVIDENI", "NAVI_TESTIRANJE_PREDVIDENI"); + define("NAVI_TESTIRANJE_CAS", "NAVI_TESTIRANJE_CAS"); + define("NAVI_TESTIRANJE_VNOSI", "NAVI_TESTIRANJE_VNOSI"); + define("NAVI_TESTIRANJE_LANGUAGE_TECHNOLOGY", "NAVI_TESTIRANJE_LANGUAGE_TECHNOLOGY"); + define("NAVI_TESTIRANJE_LANGUAGE_TECHNOLOGY_OLD", "NAVI_TESTIRANJE_LANGUAGE_TECHNOLOGY_OLD"); + define("NAVI_UREJANJE_BRANCHING", "NAVI_UREJANJE_BRANCHING"); + define("NAVI_UREJANJE_ANKETA", "NAVI_UREJANJE_ANKETA"); + define("NAVI_UREJANJE_TEMA", "NAVI_UREJANJE_TEMA"); + define("NAVI_UREJANJE_ALERT", "NAVI_UREJANJE_ALERT"); + define("NAVI_UREJANJE_TESTIRANJE", "NAVI_UREJANJE_TESTIRANJE"); + define("NAVI_TESTIRANJE_KOMENTARJI_ANKETA", "NAVI_TESTIRANJE_KOMENTARJI_ANKETA"); + define("NAVI_UREJANJE_PREVAJANJE", "NAVI_UREJANJE_PREVAJANJE"); + define("NAVI_OBJAVA", "NAVI_OBJAVA"); + define("NAVI_ANALYSIS", "NAVI_ANALYSIS"); + define("NAVI_RESULTS", "NAVI_RESULTS"); + define("NAVI_ADVANCED", "NAVI_ADVANCED"); + define("NAVI_UPORABNOST", "NAVI_UPORABNOST"); + define("NAVI_HIERARHIJA_SUPERADMIN", "NAVI_HIERARHIJA_SUPERADMIN"); + define("NAVI_HIERARHIJA", "NAVI_HIERARHIJA"); + define("NAVI_KVIZ", "NAVI_KVIZ"); + define("NAVI_VNOS", "NAVI_VNOS"); + define("NAVI_PHONE", "NAVI_PHONE"); + define("NAVI_360", "NAVI_360"); + define("NAVI_SOCIAL_NETWORK", "NAVI_SOCIAL_NETWORK"); + define("NAVI_SLIDESHOW", "NAVI_SLIDESHOW"); + define("NAVI_STATISTIC_ANALYSIS", "NAVI_STATISTIC_ANALYSIS"); + define("NAVI_ANALYSIS_LINKS", "NAVI_ANALYSIS_LINKS"); + define("NAVI_ANALYSIS_TIMES", "NAVI_ANALYSIS_TIMES"); + define("NAVI_DATA", "NAVI_DATA"); + define("NAVI_DATA_EXPORT", "NAVI_DATA_EXPORT"); # Dashboard - status - report - define("A_REPORTI", "reporti", true); - define("A_NONRESPONSE_GRAPH", "nonresponse_graph", true); - define("A_PARA_GRAPH", "para_graph", true); - define("A_USABLE_RESP", "usable_resp", true); - define("A_SPEEDER_INDEX", "speeder_index", true); - define("A_TEXT_ANALYSIS", "text_analysis", true); - define("A_GEOIP_LOCATION", "geoip_location", true); - define("A_EDITS_ANALYSIS", "edits_analysis", true); - define("A_UL_EVALVATION", "ul_evalvation", true); - define("A_REMINDER_TRACKING", "reminder_tracking", true); - define("A_REMINDER_TRACKING_RECNUM", "recnum", true); - define("A_REMINDER_TRACKING_VAR", "vars", true); + define("A_REPORTI", "reporti"); + define("A_NONRESPONSE_GRAPH", "nonresponse_graph"); + define("A_PARA_GRAPH", "para_graph"); + define("A_USABLE_RESP", "usable_resp"); + define("A_SPEEDER_INDEX", "speeder_index"); + define("A_TEXT_ANALYSIS", "text_analysis"); + define("A_GEOIP_LOCATION", "geoip_location"); + define("A_EDITS_ANALYSIS", "edits_analysis"); + define("A_UL_EVALVATION", "ul_evalvation"); + define("A_REMINDER_TRACKING", "reminder_tracking"); + define("A_REMINDER_TRACKING_RECNUM", "recnum"); + define("A_REMINDER_TRACKING_VAR", "vars"); #urejanje - define("A_BRANCHING", "branching", true); - define("A_SETTINGS", "nastavitve", true); - define("A_NAGOVORI", "nagovori", true); - define("A_ALERT", "alert", true); - define("A_TESTIRANJE", "testiranje", true); - define("A_ARHIVI", "arhivi", true); - define("A_TRACKING", "tracking", true); - define("A_TRACKING_HIERARHIJA", "tracking-hierarhija", true); - define("A_GLASOVANJE", "glasovanja", true); + define("A_BRANCHING", "branching"); + define("A_SETTINGS", "nastavitve"); + define("A_NAGOVORI", "nagovori"); + define("A_ALERT", "alert"); + define("A_TESTIRANJE", "testiranje"); + define("A_ARHIVI", "arhivi"); + define("A_TRACKING", "tracking"); + define("A_TRACKING_HIERARHIJA", "tracking-hierarhija"); + define("A_GLASOVANJE", "glasovanja"); # TESTIRANJE - define('M_TESTIRANJE_REVIEW', 'pregled', true); - define('M_TESTIRANJE_DIAGNOSTIKA', 'diagnostika', true); - define('M_TESTIRANJE_KOMENTARJI', 'komentarji', true); - define('M_TESTIRANJE_KOMENTARJI_ANKETA', 'komentarji_anketa', true); - define('M_TESTIRANJE_VNOSI', 'testnipodatki', true); - define('M_TESTIRANJE_TRAJANJE', 'trajanje', true); - define('M_TESTIRANJE_PREDVIDENI', 'predvidenicas', true); - define("M_TESTIRANJE_CAS", "cas", true); + define('M_TESTIRANJE_REVIEW', 'pregled'); + define('M_TESTIRANJE_DIAGNOSTIKA', 'diagnostika'); + define('M_TESTIRANJE_KOMENTARJI', 'komentarji'); + define('M_TESTIRANJE_KOMENTARJI_ANKETA', 'komentarji_anketa'); + define('M_TESTIRANJE_VNOSI', 'testnipodatki'); + define('M_TESTIRANJE_TRAJANJE', 'trajanje'); + define('M_TESTIRANJE_PREDVIDENI', 'predvidenicas'); + define("M_TESTIRANJE_CAS", "cas"); # objava - define('A_VABILA', 'vabila', true); - define('A_EMAIL', 'email', true); - define('A_INVITATIONS', 'invitations', true); - define('M_INVITATIONS_STATUS', 'inv_status', true); - define('M_INVITATIONS_SETTINGS', 'inv_settings', true); - define('M_INVITATIONS', 'vabila', true); + define('A_VABILA', 'vabila'); + define('A_EMAIL', 'email'); + define('A_INVITATIONS', 'invitations'); + define('M_INVITATIONS_STATUS', 'inv_status'); + define('M_INVITATIONS_SETTINGS', 'inv_settings'); + define('M_INVITATIONS', 'vabila'); # TELEFON - define('A_TELEPHONE', 'telephone', true); + define('A_TELEPHONE', 'telephone'); # CHAT - define('A_CHAT', 'chat', true); + define('A_CHAT', 'chat'); # PANEL - define('A_PANEL', 'panel', true); + define('A_PANEL', 'panel'); # FIELDWORK (tablice, notebooki) - define('A_FIELDWORK', 'fieldwork', true); + define('A_FIELDWORK', 'fieldwork'); # Mobilna aplikacija za anketirance - define('A_MAZA', 'maza', true); + define('A_MAZA', 'maza'); # Web push notifications - define('A_WPN', 'wpn', true); + define('A_WPN', 'wpn'); # 360 STOPINJ - define('A_360', '360_stopinj', true); - define('A_360_1KA', '360_stopinj_1ka', true); + define('A_360', '360_stopinj'); + define('A_360_1KA', '360_stopinj_1ka'); # SA- HIERARHIJA - define('A_HIERARHIJA', 'hierarhija', true); #izgradnja hierarhije - define('M_ADMIN_UREDI_SIFRANTE', 'uredi-sifrante', true); #hierarhija - uredi šifrante za kasnejšo izgradno - define('M_ADMIN_UVOZ_SIFRANTOV', 'uvoz-sifrantov', true); #hierarhija - uvoz sifrantov - define('M_ADMIN_UPLOAD_LOGO', 'upload-logo', true); #hierarhija - upload logo - define('M_ADMIN_IZVOZ_SIFRANTOV', 'izvoz-sifrantov', true); #hierarhija - izvoz sifrantov - define('M_UREDI_UPORABNIKE', 'uredi-uporabnike', true); #hierarhija - uredi uporabnike - define('M_ADMIN_AKTIVACIJA', 'aktivacija-strukture-ankete', true); #aktivacija hierarhije - define('M_ADMIN_KOPIRANJE', 'kopiranje-strukture-in-uporabnikov', true); #kopiranje hierarhije - define('M_ANALIZE', 'analize', true); #hierarhija analize - define('M_HIERARHIJA_STATUS', 'status', true); #hierarhija - statusi + define('A_HIERARHIJA', 'hierarhija'); #izgradnja hierarhije + define('M_ADMIN_UREDI_SIFRANTE', 'uredi-sifrante'); #hierarhija - uredi šifrante za kasnejšo izgradno + define('M_ADMIN_UVOZ_SIFRANTOV', 'uvoz-sifrantov'); #hierarhija - uvoz sifrantov + define('M_ADMIN_UPLOAD_LOGO', 'upload-logo'); #hierarhija - upload logo + define('M_ADMIN_IZVOZ_SIFRANTOV', 'izvoz-sifrantov'); #hierarhija - izvoz sifrantov + define('M_UREDI_UPORABNIKE', 'uredi-uporabnike'); #hierarhija - uredi uporabnike + define('M_ADMIN_AKTIVACIJA', 'aktivacija-strukture-ankete'); #aktivacija hierarhije + define('M_ADMIN_KOPIRANJE', 'kopiranje-strukture-in-uporabnikov'); #kopiranje hierarhije + define('M_ANALIZE', 'analize'); #hierarhija analize + define('M_HIERARHIJA_STATUS', 'status'); #hierarhija - statusi # REZULTATI #analize - define('A_ANALYSIS', 'analysis', true); - define('M_ANALYSIS_DESCRIPTOR', 'descriptor', true); - define('M_ANALYSIS_FREQUENCY', 'frequency', true); - define('M_ANALYSIS_SUMMARY', 'sumarnik', true); - define('M_ANALYSIS_SUMMARY_NEW', 'sums_new', true); - define('M_ANALYSIS_CROSSTAB', 'crosstabs', true); - define("M_ANALYSIS_MULTICROSSTABS", "multicrosstabs", true); - define('M_ANALYSIS_MEANS', 'means', true); - define('M_ANALYSIS_MEANS_HIERARHY', 'hierarhy-means', true); - define('M_ANALYSIS_TTEST', 'ttest', true); - define('M_ANALYSIS_BREAK', 'break', true); - define('M_ANALYSIS_STATISTICS', 'statistics', true); - define('M_ANALYSIS_ARCHIVE', 'anal_arch', true); - define("M_ANALYSIS_LINKS", "analysis_links", true); - define("M_ANALYSIS_CREPORT", "analysis_creport", true); - define("M_ANALYSIS_CHARTS", "charts", true); - define("M_ANALYSIS_PARA", "para", true); - define("M_ANALYSIS_NONRESPONSES", "nonresponses", true); - define("M_ANALYSIS_VIZUALIZACIJA", "vizualizacija", true); - define("M_ANALYSIS_360", "360_stopinj", true); - define("M_ANALYSIS_360_1KA", "360_stopinj_1ka", true); - define('M_ANALYSIS_HEATMAP', 'heatmap', true); + define('A_ANALYSIS', 'analysis'); + define('M_ANALYSIS_DESCRIPTOR', 'descriptor'); + define('M_ANALYSIS_FREQUENCY', 'frequency'); + define('M_ANALYSIS_SUMMARY', 'sumarnik'); + define('M_ANALYSIS_SUMMARY_NEW', 'sums_new'); + define('M_ANALYSIS_CROSSTAB', 'crosstabs'); + define("M_ANALYSIS_MULTICROSSTABS", "multicrosstabs"); + define('M_ANALYSIS_MEANS', 'means'); + define('M_ANALYSIS_MEANS_HIERARHY', 'hierarhy-means'); + define('M_ANALYSIS_TTEST', 'ttest'); + define('M_ANALYSIS_BREAK', 'break'); + define('M_ANALYSIS_STATISTICS', 'statistics'); + define('M_ANALYSIS_ARCHIVE', 'anal_arch'); + define("M_ANALYSIS_LINKS", "analysis_links"); + define("M_ANALYSIS_CREPORT", "analysis_creport"); + define("M_ANALYSIS_CHARTS", "charts"); + define("M_ANALYSIS_PARA", "para"); + define("M_ANALYSIS_NONRESPONSES", "nonresponses"); + define("M_ANALYSIS_VIZUALIZACIJA", "vizualizacija"); + define("M_ANALYSIS_360", "360_stopinj"); + define("M_ANALYSIS_360_1KA", "360_stopinj_1ka"); + define('M_ANALYSIS_HEATMAP', 'heatmap'); # vnosi - zbiranje podatkov - define('A_COLLECT_DATA', 'data', true); - define('M_COLLECT_DATA_VIEW', 'view', true); - define('M_COLLECT_DATA_VARIABLE_VIEW', 'variables', true); - define('M_COLLECT_DATA_EDIT', 'edit', true); - define('M_COLLECT_DATA_QUICKEDIT', 'quick_edit', true); - define('M_COLLECT_DATA_MONITORING', 'monitoring', true); - define('M_COLLECT_DATA_PRINT', 'print', true); - define('M_COLLECT_DATA_CALCULATION', 'calculation', true); - define('M_COLLECT_DATA_CODING', 'coding', true); - define('M_COLLECT_DATA_RECODING', 'recoding', true); - define('M_COLLECT_DATA_RECODING_DASHBOARD', 'recoding_dashboard', true); - define('A_COLLECT_DATA_EXPORT', 'export', true); - define('A_COLLECT_DATA_EXPORT_ALL', 'export_PDF', true); - define('M_EXPORT_EXCEL', 'excel', true); - define('M_EXPORT_EXCEL_XLS', 'excel_xls', true); - define('M_EXPORT_SPSS', 'spss', true); - define('M_EXPORT_SAV', 'sav', true); - define('M_EXPORT_TXT', 'txt', true); + define('A_COLLECT_DATA', 'data'); + define('M_COLLECT_DATA_VIEW', 'view'); + define('M_COLLECT_DATA_VARIABLE_VIEW', 'variables'); + define('M_COLLECT_DATA_EDIT', 'edit'); + define('M_COLLECT_DATA_QUICKEDIT', 'quick_edit'); + define('M_COLLECT_DATA_MONITORING', 'monitoring'); + define('M_COLLECT_DATA_PRINT', 'print'); + define('M_COLLECT_DATA_CALCULATION', 'calculation'); + define('M_COLLECT_DATA_CODING', 'coding'); + define('M_COLLECT_DATA_RECODING', 'recoding'); + define('M_COLLECT_DATA_RECODING_DASHBOARD', 'recoding_dashboard'); + define('A_COLLECT_DATA_EXPORT', 'export'); + define('A_COLLECT_DATA_EXPORT_ALL', 'export_PDF'); + define('M_EXPORT_EXCEL', 'excel'); + define('M_EXPORT_EXCEL_XLS', 'excel_xls'); + define('M_EXPORT_SPSS', 'spss'); + define('M_EXPORT_SAV', 'sav'); + define('M_EXPORT_TXT', 'txt'); # dodatne nastavitve - define('A_ADVANCED', 'advanced', true); - define('A_UPORABNOST', 'uporabnost', true); - define('A_HIERARHIJA_SUPERADMIN', 'hierarhija_superadmin', true); - define('A_KVIZ', 'kviz', true); - define('A_VNOS', 'vnos', true); - define('A_PHONE', 'telefon', true); # Telefon - define('T_PHONE', 'telefon', true); # Telefon - define('A_SOCIAL_NETWORK', 'social_network', true); - define('A_SLIDESHOW', 'slideshow', true); - define('A_ADVANCED_PARADATA', 'advanced_paradata', true); - define('A_JSON_SURVEY_EXPORT', 'json_survey_export', true); + define('A_ADVANCED', 'advanced'); + define('A_UPORABNOST', 'uporabnost'); + define('A_HIERARHIJA_SUPERADMIN', 'hierarhija_superadmin'); + define('A_KVIZ', 'kviz'); + define('A_VNOS', 'vnos'); + define('A_PHONE', 'telefon'); # Telefon + define('T_PHONE', 'telefon'); # Telefon + define('A_SOCIAL_NETWORK', 'social_network'); + define('A_SLIDESHOW', 'slideshow'); + define('A_ADVANCED_PARADATA', 'advanced_paradata'); + define('A_JSON_SURVEY_EXPORT', 'json_survey_export'); # primerno redirektamo klik na link anketo (dashboard .vs. urejanje) - define("A_REDIRECTLINK", "redirectLink", true); + define("A_REDIRECTLINK", "redirectLink"); - define("A_QUICK_SETTINGS", "quicksettings", true); + define("A_QUICK_SETTINGS", "quicksettings"); # za tretji nivo navigacije - define("A_OSNOVNI_PODATKI", "osn_pod", true); # urejanje ankete - osnovni podatki - define('A_MISSING', 'missing', true); # urejanje ankete - manjkajoče vrednosti - define('A_TEMA', 'tema', true); # urejanje ankete - manjkajoče vrednosti - define('A_COOKIE', 'piskot', true); # urejanje ankete - manjkajoče vrednosti - define("A_KOMENTARJI", "komentarji", true); # urejanje ankete - komentarjivrednosti - define("A_KOMENTARJI_ANKETA", "komentarji_anketa", true); # urejanje ankete - komentarjivrednosti - define("A_TRAJANJE", "trajanje", true); # urejanje ankete - komentarjivrednosti - define("A_TRAJANJE_PREDVIDENI", "predvidenicas", true); # urejanje ankete - komentarjivrednosti - define("A_TRAJANJE_CAS", "cas", true); # urejanje ankete - komentarjivrednosti - define('A_UREJANJE', 'urejanje', true); # urejanje ankete - komentarjivrednosti - define('A_DOSTOP', 'dostop', true); # urejanje ankete - manjkajoče vrednosti - define('A_JEZIK', 'jezik', true); # urejanje ankete - manjkajoče vrednosti - define('A_PREVAJANJE', 'prevajanje', true); # urejanje ankete - manjkajoče vrednosti - define('A_FORMA', 'forma', true); # urejanje ankete - manjkajoče vrednosti - define('A_METADATA', 'metadata', true); # urejanje ankete - prikaz metapodatkov - define('A_MOBILESETTINGS', 'mobile_settings', true); # urejanje ankete - nastavitve prikaza pri mobitelih - define('A_PRIKAZ', 'prikaz', true); # prikaz podatkov in analiz - define('A_MAILING', 'advanced_email', true); # nastavitve email strežnika - define('A_SKUPINE', 'skupine', true); # skupine - define('A_EXPORTSETTINGS', 'export_settings', true); # nastavitve pdf/rtf izvozov - define('A_GDPR', 'gdpr_settings', true); # GDPR nastavitve posamezne ankete - define('A_LANGUAGE_TECHNOLOGY', 'language_technology', true); # skupine - define('A_LANGUAGE_TECHNOLOGY_OLD', 'language_technology_old', true); # skupine + define("A_OSNOVNI_PODATKI", "osn_pod"); # urejanje ankete - osnovni podatki + define('A_MISSING', 'missing'); # urejanje ankete - manjkajoče vrednosti + define('A_TEMA', 'tema'); # urejanje ankete - manjkajoče vrednosti + define('A_COOKIE', 'piskot'); # urejanje ankete - manjkajoče vrednosti + define("A_KOMENTARJI", "komentarji"); # urejanje ankete - komentarjivrednosti + define("A_KOMENTARJI_ANKETA", "komentarji_anketa"); # urejanje ankete - komentarjivrednosti + define("A_TRAJANJE", "trajanje"); # urejanje ankete - komentarjivrednosti + define("A_TRAJANJE_PREDVIDENI", "predvidenicas"); # urejanje ankete - komentarjivrednosti + define("A_TRAJANJE_CAS", "cas"); # urejanje ankete - komentarjivrednosti + define('A_UREJANJE', 'urejanje'); # urejanje ankete - komentarjivrednosti + define('A_DOSTOP', 'dostop'); # urejanje ankete - manjkajoče vrednosti + define('A_JEZIK', 'jezik'); # urejanje ankete - manjkajoče vrednosti + define('A_PREVAJANJE', 'prevajanje'); # urejanje ankete - manjkajoče vrednosti + define('A_FORMA', 'forma'); # urejanje ankete - manjkajoče vrednosti + define('A_METADATA', 'metadata'); # urejanje ankete - prikaz metapodatkov + define('A_MOBILESETTINGS', 'mobile_settings'); # urejanje ankete - nastavitve prikaza pri mobitelih + define('A_PRIKAZ', 'prikaz'); # prikaz podatkov in analiz + define('A_MAILING', 'advanced_email'); # nastavitve email strežnika + define('A_SKUPINE', 'skupine'); # skupine + define('A_EXPORTSETTINGS', 'export_settings'); # nastavitve pdf/rtf izvozov + define('A_GDPR', 'gdpr_settings'); # GDPR nastavitve posamezne ankete + define('A_LANGUAGE_TECHNOLOGY', 'language_technology'); # skupine + define('A_LANGUAGE_TECHNOLOGY_OLD', 'language_technology_old'); # skupine ##### NAVIGACIJA #### # profili mankjajočih vrednosti - define('MISSING_TYPE_SUMMARY', '0', true); - define('MISSING_TYPE_DESCRIPTOR', '1', true); - define('MISSING_TYPE_FREQUENCY', '2', true); - define('MISSING_TYPE_CROSSTAB', '3', true); + define('MISSING_TYPE_SUMMARY', '0'); + define('MISSING_TYPE_DESCRIPTOR', '1'); + define('MISSING_TYPE_FREQUENCY', '2'); + define('MISSING_TYPE_CROSSTAB', '3'); # za vnose ali analize in kreacijo datotek - define('EXPORT_FOLDER', 'admin/survey/SurveyData', true); - define('VALID_USER_LIMIT_STRING', ' AND u.last_status IN (5,6) ', true); - define('ALLOW_CREATE_LIMIT', 80, true); # prvih 100 userjev vedno spustimo skozi - define('AUTO_CREATE_LIMIT', 150, true); # Koliko je meja, ko ne prikazujemo progresbara, in avtomatsko skreiramo datoteko ON THE FLY - define('AUTO_CREATE_TIME_LIMIT', 10, true); # Na koliko sekund pustimo da se generira inkrementalno s progressbarom - define('AUTO_CREATE_PREVENT_LIMIT', 1000, true); # Koliko je meja, ko avtomatsko sploh ne generiramo datoteke s podatki - define('ONLY_VALID_LIMIT', 3000, true); # nad koliko respondentov lovimo samo ustrezne - define('MAX_USER_PER_LOOP', 250, true); - define('FILE_STATUS_OK', '1', true); # datoteka je ažurna - define('FILE_STATUS_OLD', '0', true); # datoteka je stara - define('FILE_STATUS_NO_FILE', '-1', true); # datoteka ne obstaja - define('FILE_STATUS_NO_DATA', '-2', true); # v bazi nipodatkov - define('FILE_STATUS_SRV_DELETED', '-3', true); # Anketa je bila izbrisana + define('EXPORT_FOLDER', 'admin/survey/SurveyData'); + define('VALID_USER_LIMIT_STRING', ' AND u.last_status IN (5,6) '); + define('ALLOW_CREATE_LIMIT', 80); # prvih 100 userjev vedno spustimo skozi + define('AUTO_CREATE_LIMIT', 150); # Koliko je meja, ko ne prikazujemo progresbara, in avtomatsko skreiramo datoteko ON THE FLY + define('AUTO_CREATE_TIME_LIMIT', 10); # Na koliko sekund pustimo da se generira inkrementalno s progressbarom + define('AUTO_CREATE_PREVENT_LIMIT', 1000); # Koliko je meja, ko avtomatsko sploh ne generiramo datoteke s podatki + define('ONLY_VALID_LIMIT', 3000); # nad koliko respondentov lovimo samo ustrezne + define('MAX_USER_PER_LOOP', 250); + define('FILE_STATUS_OK', '1'); # datoteka je ažurna + define('FILE_STATUS_OLD', '0'); # datoteka je stara + define('FILE_STATUS_NO_FILE', '-1'); # datoteka ne obstaja + define('FILE_STATUS_NO_DATA', '-2'); # v bazi nipodatkov + define('FILE_STATUS_SRV_DELETED', '-3'); # Anketa je bila izbrisana - define('INCREMENTAL_LOCK_TIMEOUT', 10, true); # po kolikem času tajmoutamo možnost ponovnega generiranja (10min) + define('INCREMENTAL_LOCK_TIMEOUT', 10); # po kolikem času tajmoutamo možnost ponovnega generiranja (10min) - define("SYSTEM_VARIABLES", serialize (array('geslo','email','telefon','ime','priimek','naziv','drugo','odnos')), true); + define("SYSTEM_VARIABLES", serialize (array('geslo','email','telefon','ime','priimek','naziv','drugo','odnos'))); # fiksna polja v tabeli s podatki (prvo je 0) # polja po vrsti : @@ -254,34 +254,34 @@ # - lurker (6) # - time insered (unix) (7) # - record_number (8) - define('USER_ID_FIELD', '$1', true); - define('RELEVANCE_FIELD', '$2', true); - define('EMAIL_FIELD', '$3', true); - define('STATUS_FIELD', '$4', true); - define('LURKER_FIELD', '$5', true); - define('TIME_FIELD', '$6', true); - define('MOD_REC_FIELD', '$7', true); - define('ITIME_FIELD', '$8', true); + define('USER_ID_FIELD', '$1'); + define('RELEVANCE_FIELD', '$2'); + define('EMAIL_FIELD', '$3'); + define('STATUS_FIELD', '$4'); + define('LURKER_FIELD', '$5'); + define('TIME_FIELD', '$6'); + define('MOD_REC_FIELD', '$7'); + define('ITIME_FIELD', '$8'); - define('SCP_DEFAULT_PROFILE', 1, true); - define('SSP_DEFAULT_PROFILE', 2, true); #ustrezni + define('SCP_DEFAULT_PROFILE', 1); + define('SSP_DEFAULT_PROFILE', 2); #ustrezni - define('PERMANENT_DATE', '2099-01-01', true); # Kateri datum velja kot datum trajne ankete + define('PERMANENT_DATE', '2099-01-01'); # Kateri datum velja kot datum trajne ankete # privzete nastavitve analiz - define('NUM_DIGIT_PERCENT', 0, true); # stevilo digitalnih mest za odstotek - define('NUM_DIGIT_AVERAGE', 1, true); # stevilo digitalnih mest za povprecje - define('NUM_DIGIT_DEVIATION', 2, true); # stevilo digitalnih mest za odklon - define('NUM_DIGIT_RESIDUAL', 3, true); # stevilo digitalnih mest za residuale - define('NUM_DIGIT_PERCENT_MAX', 6, true); # max stevilo digitalnih mest za odstotek - define('NUM_DIGIT_AVERAGE_MAX', 6, true); # max stevilo digitalnih mest za povprecje - define('NUM_DIGIT_DEVIATION_MAX', 6, true); # max stevilo digitalnih mest za odklon - define('NUM_DIGIT_RESIDUAL_MAX', 6, true); # max stevilo digitalnih mest za residual + define('NUM_DIGIT_PERCENT', 0); # stevilo digitalnih mest za odstotek + define('NUM_DIGIT_AVERAGE', 1); # stevilo digitalnih mest za povprecje + define('NUM_DIGIT_DEVIATION', 2); # stevilo digitalnih mest za odklon + define('NUM_DIGIT_RESIDUAL', 3); # stevilo digitalnih mest za residuale + define('NUM_DIGIT_PERCENT_MAX', 6); # max stevilo digitalnih mest za odstotek + define('NUM_DIGIT_AVERAGE_MAX', 6); # max stevilo digitalnih mest za povprecje + define('NUM_DIGIT_DEVIATION_MAX', 6); # max stevilo digitalnih mest za odklon + define('NUM_DIGIT_RESIDUAL_MAX', 6); # max stevilo digitalnih mest za residual - define('TEXT_ANSWER_LIMIT', 100, true); # max stevilo text odgovorov pri izvozih + define('TEXT_ANSWER_LIMIT', 100); # max stevilo text odgovorov pri izvozih - define('SURVEY_LIST_DATE_FORMAT', '%d.%m.%y', true); # max stevilo digitalnih mest za residual + define('SURVEY_LIST_DATE_FORMAT', '%d.%m.%y'); # max stevilo digitalnih mest za residual define('STP_DATE_FORMAT', 'd.m.Y'); # format v katerem operiramo v tem klasu define('STP_OUTPUT_DATE_FORMAT', 'Y-m-d'); # format v katerem vrne @@ -291,14 +291,14 @@ define('SDS_DEFAULT_PROFILE', 0); - define ('STR_OTHER_TEXT', '_text', true); - define ('STR_DLMT', "|", true); - define ('DAT_EXT', '.dat', true); - define ('TMP_EXT', '.tmp', true); + define ('STR_OTHER_TEXT', '_text'); + define ('STR_DLMT', "|"); + define ('DAT_EXT', '.dat'); + define ('TMP_EXT', '.tmp'); define ('PIPE_CHAR', "\x7C",true); - define ('STR_LESS_THEN', '\x3C', true); - define ('STR_GREATER_THEN', '\x3E', true); - define ('STR_EQUALS', '\x3D', true); + define ('STR_LESS_THEN', '\x3C'); + define ('STR_GREATER_THEN', '\x3E'); + define ('STR_EQUALS', '\x3D'); ?> \ No newline at end of file diff --git a/admin/survey/export/export_definitions.php b/admin/survey/export/export_definitions.php index 2c629e15c..cd1fbba95 100644 --- a/admin/survey/export/export_definitions.php +++ b/admin/survey/export/export_definitions.php @@ -5,15 +5,15 @@ define('IS_WINDOWS', (DIRECTORY_SEPARATOR === '\\') ? TRUE : FALSE); define('IS_LINUX', (DIRECTORY_SEPARATOR === '\\') ? FALSE : TRUE); -define("M_ANALIZA_DESCRIPTOR", "descriptor", true); -define("M_ANALIZA_FREQUENCY", "frequency", true); -define("M_ANALIZA_CROSSTAB", "crosstabs", true); -define("M_ANALIZA_STATISTICS", "statistics", true); -define("M_ANALIZA_SUMS", "sums", true); +define("M_ANALIZA_DESCRIPTOR", "descriptor"); +define("M_ANALIZA_FREQUENCY", "frequency"); +define("M_ANALIZA_CROSSTAB", "crosstabs"); +define("M_ANALIZA_STATISTICS", "statistics"); +define("M_ANALIZA_SUMS", "sums"); /*PDF*/ -define("A_REPORT_VPRASALNIK_PDF", "vprasalnik_pdf", true); +define("A_REPORT_VPRASALNIK_PDF", "vprasalnik_pdf"); define("A_REPORT_PDF_RESULTS","pdf_results",true); define("A_REPORT_PDF_COMMENT","pdf_comment",true); @@ -36,62 +36,62 @@ define("M_REPORT_PDF_TEAMMETER","pdf_teammeter",true); define("M_REPORT_PDF_MFDPS","pdf_mfpds",true); define("M_REPORT_PDF_HEATMAP_IMAGE","heatmap_image_pdf",true); -define("M_REPORT_HIERARHIJA_PDF_IZPIS", "hierarhija_pdf_izpis", true); +define("M_REPORT_HIERARHIJA_PDF_IZPIS", "hierarhija_pdf_izpis"); -define("A_GDPR_PDF_INDIVIDUAL", "pdf_gdpr_individual", true); -define("A_GDPR_PDF_ACTIVITY", "pdf_gdpr_activity", true); +define("A_GDPR_PDF_INDIVIDUAL", "pdf_gdpr_individual"); +define("A_GDPR_PDF_ACTIVITY", "pdf_gdpr_activity"); /*RTF*/ -define("A_REPORT_VPRASALNIK_RTF", "vprasalnik_rtf", true); -define("A_REPORT_RTF_RESULTS", "rtf_results", true); -define("A_REPORT_RTF_COMMENT","rtf_comment",true); +define("A_REPORT_VPRASALNIK_RTF", "vprasalnik_rtf"); +define("A_REPORT_RTF_RESULTS", "rtf_results"); +define("A_REPORT_RTF_COMMENT", "rtf_comment"); -define("M_REPORT_ANALIZA_RTF_FREKVENCA", "frequency_rtf", true); -define("M_REPORT_ANALIZA_RTF_CROSSTAB_IZPIS", "crosstabs_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_MULTICROSSTAB_IZPIS", "multicrosstabs_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_MEAN_IZPIS", "mean_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_TTEST_IZPIS", "ttest_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_BREAK_IZPIS", "break_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_STAT", "statistics_rtf", true); -define("M_REPORT_ANALIZA_RTF_SUMS", "sums_rtf", true); -define("M_REPORT_ANALIZA_RTF_CHARTS", "charts_rtf", true); -define("M_REPORT_ANALIZA_RTF_CREPORT", "creport_rtf", true); +define("M_REPORT_ANALIZA_RTF_FREKVENCA", "frequency_rtf"); +define("M_REPORT_ANALIZA_RTF_CROSSTAB_IZPIS", "crosstabs_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_MULTICROSSTAB_IZPIS", "multicrosstabs_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_MEAN_IZPIS", "mean_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_TTEST_IZPIS", "ttest_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_BREAK_IZPIS", "break_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_STAT", "statistics_rtf"); +define("M_REPORT_ANALIZA_RTF_SUMS", "sums_rtf"); +define("M_REPORT_ANALIZA_RTF_CHARTS", "charts_rtf"); +define("M_REPORT_ANALIZA_RTF_CREPORT", "creport_rtf"); -define("A_REPORT_RTF_LIST", "list_rtf", true); +define("A_REPORT_RTF_LIST", "list_rtf"); define("M_REPORT_ANALIZA_RTF_HEATMAP_IMAGE","heatmap_image_rtf",true); -define("A_GDPR_RTF_INDIVIDUAL", "rtf_gdpr_individual", true); -define("A_GDPR_RTF_ACTIVITY", "rtf_gdpr_activity", true); +define("A_GDPR_RTF_INDIVIDUAL", "rtf_gdpr_individual"); +define("A_GDPR_RTF_ACTIVITY", "rtf_gdpr_activity"); /*XLS*/ -define("M_REPORT_ANALIZA_XLS_STAT", "statistics_xls", true); -define("M_REPORT_ANALIZA_XLS_FREKVENCA", "frequency_xls", true); -define("M_REPORT_ANALIZA_XLS_CROSSTAB_IZPIS", "crosstabs_izpis_xls", true); -define("M_REPORT_ANALIZA_XLS_MULTICROSSTAB_IZPIS", "multicrosstabs_izpis_xls", true); -define("M_REPORT_ANALIZA_XLS_SUMS", "sums_xls", true); -define("M_REPORT_ANALIZA_XLS_MEAN_IZPIS", "mean_izpis_xls", true); -define("M_REPORT_ANALIZA_XLS_TTEST_IZPIS", "ttest_izpis_xls", true); -define("M_REPORT_ANALIZA_XLS_BREAK_IZPIS", "break_izpis_xls", true); +define("M_REPORT_ANALIZA_XLS_STAT", "statistics_xls"); +define("M_REPORT_ANALIZA_XLS_FREKVENCA", "frequency_xls"); +define("M_REPORT_ANALIZA_XLS_CROSSTAB_IZPIS", "crosstabs_izpis_xls"); +define("M_REPORT_ANALIZA_XLS_MULTICROSSTAB_IZPIS", "multicrosstabs_izpis_xls"); +define("M_REPORT_ANALIZA_XLS_SUMS", "sums_xls"); +define("M_REPORT_ANALIZA_XLS_MEAN_IZPIS", "mean_izpis_xls"); +define("M_REPORT_ANALIZA_XLS_TTEST_IZPIS", "ttest_izpis_xls"); +define("M_REPORT_ANALIZA_XLS_BREAK_IZPIS", "break_izpis_xls"); -define("A_REPORT_XLS_LIST", "list_xls", true); -define("A_REPORT_XLS_USABLE", "usable_xls", true); -define("A_REPORT_XLS_SPEEDER", "speeder_xls", true); -define("A_REPORT_XLS_TEXT_ANALYSIS", "text_analysis_xls", true); -define("A_REPORT_CSV_TEXT_ANALYSIS", "text_analysis_csv", true); -define("A_LANGUAGE_TECHNOLOGY_XLS", "lt_excel", true); +define("A_REPORT_XLS_LIST", "list_xls"); +define("A_REPORT_XLS_USABLE", "usable_xls"); +define("A_REPORT_XLS_SPEEDER", "speeder_xls"); +define("A_REPORT_XLS_TEXT_ANALYSIS", "text_analysis_xls"); +define("A_REPORT_CSV_TEXT_ANALYSIS", "text_analysis_csv"); +define("A_LANGUAGE_TECHNOLOGY_XLS", "lt_excel"); /*PPT*/ -define("M_REPORT_ANALIZA_PPT_CHARTS", "charts_ppt", true); -define("M_REPORT_ANALIZA_PPT_HEATMAP_IMAGE","heatmap_image_ppt",true); +define("M_REPORT_ANALIZA_PPT_CHARTS", "charts_ppt"); +define("M_REPORT_ANALIZA_PPT_HEATMAP_IMAGE", "heatmap_image_ppt"); /*IMAGE*/ -define("M_REPORT_ANALIZA_HEATMAP_IMAGE", "heatmap_image", true); +define("M_REPORT_ANALIZA_HEATMAP_IMAGE", "heatmap_image"); /*XML*/ -define("A_REPORT_VPRASALNIK_XML", "vprasalnik_xml", true); +define("A_REPORT_VPRASALNIK_XML", "vprasalnik_xml"); ?> \ No newline at end of file diff --git a/admin/survey/export/latexclasses/Analize/AnalizaBreak.php b/admin/survey/export/latexclasses/Analize/AnalizaBreak.php index 6b8bcbbea..b8c23b480 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaBreak.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaBreak.php @@ -4,33 +4,32 @@ include_once('../../function.php'); include_once('../survey/definition.php'); -/* include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php'); - require_once('../exportclases/class.enka.pdf.php'); */ + define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); diff --git a/admin/survey/export/latexclasses/Analize/AnalizaCReport.php b/admin/survey/export/latexclasses/Analize/AnalizaCReport.php index 47da9e740..6e0ca2310 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaCReport.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaCReport.php @@ -10,27 +10,27 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); @@ -1105,14 +1105,6 @@ class AnalizaCReport extends LatexAnalysisElement{ //TODO: Potrebno je v LATEX določiti ali je stran obrnjena landscape $width = $this->landscapeTest() ? 270 : 165; - //$this->pdf->ln(15); - - //$this->pdf->setFont('','b','7'); - //$this->pdf->MultiCell($width, 1, $this->encodeText($title . $subtitle), 0, 'C', 0, 1, 0 ,0, true); - /*$this->pdf->setFont('','','7'); - $this->pdf->MultiCell($width, 1, $subtitle, 0, 'C', 0, 1, 0 ,0, true);*/ - - //$this->pdf->ln(5); $boldedTitle = $this->returnBold($this->encodeText($this->encodeText($title . $subtitle))); $texTitle .= $this->returnCentered($boldedTitle); diff --git a/admin/survey/export/latexclasses/Analize/AnalizaCharts.php b/admin/survey/export/latexclasses/Analize/AnalizaCharts.php index 62c436992..0a6e41e77 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaCharts.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaCharts.php @@ -12,27 +12,27 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); diff --git a/admin/survey/export/latexclasses/Analize/AnalizaCrosstab.php b/admin/survey/export/latexclasses/Analize/AnalizaCrosstab.php index 78140a712..01e1932e0 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaCrosstab.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaCrosstab.php @@ -11,27 +11,27 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); @@ -179,86 +179,7 @@ class AnalizaCrosstab extends LatexAnalysisElement{ //set image scale factor $this->pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); return true; - } - - -/* function createPdf() - { - global $site_path; - global $lang; - global $global_user_id; - - // izpisemo prvo stran - //$this->createFrontPage(); - - $this->pdf->AddPage(); - - $this->pdf->setFont('','B','11'); - $this->pdf->MultiCell(150, 5, $lang['export_analisys_sums'], 0, 'L', 0, 1, 0 ,0, true); - $this->pdf->ln(5); - - $this->pdf->SetDrawColor(128, 128, 128); - $this->pdf->setFont('','','6'); - - # preberemo header - if ($this->dataFileStatus == FILE_STATUS_NO_DATA || $this->dataFileStatus == FILE_STATUS_NO_FILE || $this->dataFileStatus == FILE_STATUS_SRV_DELETED) { - - $this->pdf->MultiCell(150, 5, 'NAPAKA!!! Manjkajo datoteke s podatki.', 0, 'L', 0, 1, 0 ,0, true); - - } else { - - //polovimo podatke o nastavitvah trenutnega profila (missingi..) - SurveyAnalysis::$missingProfileData = SurveyMissingProfiles::getProfile(SurveyAnalysis::$currentMissingProfile); - - - // Preverimo ce imamo zanke (po skupinah) - SurveyAnalysis::$_LOOPS = SurveyZankaProfiles::getFiltersForLoops(); - - # če nimamo zank - if(count(SurveyAnalysis::$_LOOPS) == 0){ - - $this->displayTables(); - } - else{ - // izrisemo samo eno tabelo iz enega loopa - if($this->current_loop > 0){ - - $loop = SurveyAnalysis::$_LOOPS[(int)$this->current_loop-1]; - $loop['cnt'] = $this->current_loop; - SurveyAnalysis::$_CURRENT_LOOP = $loop; - - // Izpisemo naslov zanke za skupino - $this->pdf->setFont('','B','10'); - $this->pdf->ln(5); - $this->pdf->MultiCell(200, 5, $this->encodeText($lang['srv_zanka_note'].$loop['text']), 0, 'L', 0, 1, 0 ,0, true); - $this->pdf->setFont('','','6'); - - $this->displayTables(); - } - // Izrisemo vse tabele spremenljivka (iz vseh loopov) - else{ - $loop_cnt = 0; - # če mamo zanke - foreach(SurveyAnalysis::$_LOOPS AS $loop) { - $loop_cnt++; - $loop['cnt'] = $loop_cnt; - SurveyAnalysis::$_CURRENT_LOOP = $loop; - - // Izpisemo naslov zanke za skupino - $this->pdf->setFont('','B','10'); - $this->pdf->ln(5); - $this->pdf->MultiCell(200, 5, $this->encodeText($lang['srv_zanka_note'].$loop['text']), 0, 'L', 0, 1, 0 ,0, true); - $this->pdf->setFont('','','6'); - - $this->displayTables(); - } - } - } - - } // end if else ($_headFileName == null) - - } */ - + } public function showCrosstabsTable($crosstabClass=null, $export_format='', $creport=false) { global $lang; diff --git a/admin/survey/export/latexclasses/Analize/AnalizaDesc.php b/admin/survey/export/latexclasses/Analize/AnalizaDesc.php index 2548fba14..a2252e108 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaDesc.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaDesc.php @@ -11,27 +11,27 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); diff --git a/admin/survey/export/latexclasses/Analize/AnalizaFreq.php b/admin/survey/export/latexclasses/Analize/AnalizaFreq.php index 3a333ed59..24b1f8324 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaFreq.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaFreq.php @@ -11,27 +11,27 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); diff --git a/admin/survey/export/latexclasses/Analize/AnalizaMean.php b/admin/survey/export/latexclasses/Analize/AnalizaMean.php index 0e896739e..3dc136e25 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaMean.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaMean.php @@ -10,27 +10,27 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); diff --git a/admin/survey/export/latexclasses/Analize/AnalizaMultiCrosstab.php b/admin/survey/export/latexclasses/Analize/AnalizaMultiCrosstab.php index ec614f514..156a3c2c0 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaMultiCrosstab.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaMultiCrosstab.php @@ -10,27 +10,27 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); @@ -130,74 +130,6 @@ class AnalizaMultiCrosstab extends LatexAnalysisElement { $this->pdf->Output($fileName, 'I'); } - -/* function init(){ - global $lang; - - // array used to define the language and charset of the pdf file to be generated - $language_meta = Array(); - $language_meta['a_meta_charset'] = 'UTF-8'; - $language_meta['a_meta_dir'] = 'ltr'; - $language_meta['a_meta_language'] = 'sl'; - $language_meta['w_page'] = $lang['page']; - - //set some language-dependent strings - $this->pdf->setLanguageArray($language_meta); - - //set margins - $this->pdf->setPrintHeaderFirstPage(true); - $this->pdf->setPrintFooterFirstPage(true); - $this->pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); - $this->pdf->SetHeaderMargin(PDF_MARGIN_HEADER); - $this->pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - - // set header and footer fonts - $this->pdf->setHeaderFont(Array(FNT_HEADER_TEXT, "I", FNT_HEADER_SIZE)); - $this->pdf->setFooterFont(Array(FNT_HEADER_TEXT, 'I', FNT_HEADER_SIZE)); - - - // set document information - $this->pdf->SetAuthor('An Order Form'); - $this->pdf->SetTitle('An Order'); - $this->pdf->SetSubject('An Order'); - - // set default header data - $this->pdf->SetHeaderData(null, null, "www.1ka.si", $this->encodeText(SurveyInfo::getInstance()->getSurveyAkronim())); - - //set auto page breaks - $this->pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); - - $this->pdf->SetFont(FNT_MAIN_TEXT, '', FNT_MAIN_SIZE); - //set image scale factor - $this->pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); - - return true; - } */ - - -/* function createPdf(){ - global $site_path; - global $lang; - - $this->pdf->AddPage(); - - $this->pdf->setFont('','B','11'); - $this->pdf->MultiCell(150, 5, $lang['srv_multicrosstabs'], 0, 'L', 0, 1, 0 ,0, true); - $this->pdf->ln(5); - - $this->pdf->setDrawColor(128, 128, 128); - $this->pdf->setFont('','','6'); - - // Napolnimo variable s katerimi lahko operiramo - $this->multiCrosstabClass->getVariableList(); - - // Izris tabele - $this->displayTable(); - - // Izris legende - $this->displayLegend(); - } */ - public function displayTable($multiCrosstabClass=null, $export_format=''){ global $site_path; global $lang; diff --git a/admin/survey/export/latexclasses/Analize/AnalizaSums.php b/admin/survey/export/latexclasses/Analize/AnalizaSums.php index f81860375..2a6225f59 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaSums.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaSums.php @@ -11,27 +11,27 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); @@ -557,40 +557,25 @@ class AnalizaSums extends LatexAnalysisElement{ //zacetek latex tabele z obrobo za prvo tabelo - konec //prva vrstica - //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{8}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine; - //$tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{8}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine; $dolzinaVprasanja = strlen($this->encodeText($spremenljivka['naslov'])); - //echo $dolzinaVprasanja."
"; - if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli + + if($dolzinaVprasanja > MEJA_DOLZINA_VPRASANJA){ //ce je dolzina vprasanja daljsa od ene vrstice v tabeli $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{8}{X|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine; - }else{ + } + else{ $tex .= $this->encodeText($spremenljivka['variable'])." & \multicolumn{8}{l|}{".$this->encodeText($spremenljivka['naslov'])."} ".$this->texNewLine; } - - //$variableTex = $this->encodeText($spremenljivka['variable']); - //$naslovTex = $this->encodeText($spremenljivka['naslov']); - //$tex .= $variableTex.' & \multicolumn{8}{>{\hsize=\dimexpr 9\hsize + 9\tabcolsep + \arrayrulewidth}X|}{'.$naslovTex.'} '.$this->texNewLine; + if($export_format != 'xls'){ $tex .= $this->horizontalLineTex; /*obroba*/ } - - -/* $this->pdf->setFont('','b','6'); - $this->pdf->ln(5); - $this->pdf->MultiCell(18, 5, $this->encodeText($spremenljivka['variable']), 1, 'C', 0, 0, 0 ,0, true); - $this->pdf->MultiCell(162, 5, $this->encodeText($spremenljivka['naslov']), 1, 'L', 0, 1, 0 ,0, true); */ - + //druga vrstica $tex .= " & ".$this->encodeText($lang['srv_analiza_opisne_subquestion1'])." & \multicolumn{5}{c|}{".$this->encodeText($lang['srv_analiza_opisne_units'])."} & \multicolumn{2}{c|}{".$this->encodeText($lang['srv_analiza_opisne_arguments'])."} ".$this->texNewLine; if($export_format != 'xls'){ $tex .= $this->horizontalLineTex; /*obroba*/ } -/* $this->pdf->MultiCell(18, 5, $this->encodeText(''), 1, 'L', 0, 0, 0 ,0, true); - $this->pdf->MultiCell(50, 5, $this->encodeText($lang['srv_analiza_opisne_subquestion']), 1, 'C', 0, 0, 0 ,0, true); - $this->pdf->MultiCell(80, 5, $this->encodeText($lang['srv_analiza_opisne_units']), 1, 'C', 0, 0, 0 ,0, true); - $this->pdf->MultiCell(32, 5, $this->encodeText($lang['srv_analiza_opisne_arguments']), 1, 'C', 0, 1, 0 ,0, true); */ - //tretja vrstica $text = array(); $text[] = ''; diff --git a/admin/survey/export/latexclasses/Analize/AnalizaTTest.php b/admin/survey/export/latexclasses/Analize/AnalizaTTest.php index 539fd225d..ff17dc420 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaTTest.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaTTest.php @@ -4,33 +4,32 @@ include_once('../../function.php'); include_once('../survey/definition.php'); -/* include_once('../exportclases/class.pdfIzvozAnalizaFunctions.php'); - require_once('../exportclases/class.enka.pdf.php'); */ + define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); diff --git a/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php b/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php index 5c2a9e9fb..1443e99cc 100644 --- a/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/BesediloLatex.php @@ -10,8 +10,8 @@ *****************************************/ -define("PIC_SIZE", "\includegraphics[width=10cm]", true); //slika sirine 50mm -define("ICON_SIZE", "\includegraphics[width=0.5cm]", true); //za ikone @ slikovni tip +define("PIC_SIZE", "\includegraphics[width=10cm]"); //slika sirine 50mm +define("ICON_SIZE", "\includegraphics[width=0.5cm]"); //za ikone @ slikovni tip class BesediloLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/GridMultipleLatex.php b/admin/survey/export/latexclasses/Vprasanja/GridMultipleLatex.php index 0b60d28e1..d1f2f144f 100644 --- a/admin/survey/export/latexclasses/Vprasanja/GridMultipleLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/GridMultipleLatex.php @@ -10,9 +10,9 @@ *****************************************/ -define("PIC_SIZE", "\includegraphics[width=10cm]", true); //slika sirine 50mm -define("ICON_SIZE", "\includegraphics[width=0.5cm]", true); //za ikone @ slikovni tip -define("RADIO_BTN_SIZE", 0.13, true); +define("PIC_SIZE", "\includegraphics[width=10cm]"); //slika sirine 50mm +define("ICON_SIZE", "\includegraphics[width=0.5cm]"); //za ikone @ slikovni tip +define("RADIO_BTN_SIZE", 0.13); class GridMultipleLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/HeatmapLatex.php b/admin/survey/export/latexclasses/Vprasanja/HeatmapLatex.php index 8bd7f1ea1..97870f19e 100644 --- a/admin/survey/export/latexclasses/Vprasanja/HeatmapLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/HeatmapLatex.php @@ -9,9 +9,9 @@ * Datum: 09/2017 *****************************************/ //use enkaParameters; -define("PIC_SIZE", "\includegraphics[width=10cm]", true); //slika sirine 50mm -define("ICON_SIZE", "\includegraphics[width=0.5cm]", true); //za ikone @ slikovni tip -define("RADIO_BTN_SIZE", 0.13, true); +define("PIC_SIZE", "\includegraphics[width=10cm]"); //slika sirine 50mm +define("ICON_SIZE", "\includegraphics[width=0.5cm]"); //za ikone @ slikovni tip +define("RADIO_BTN_SIZE", 0.13); class HeatmapLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/KalkulacijaLatex.php b/admin/survey/export/latexclasses/Vprasanja/KalkulacijaLatex.php index 77acc2d3f..a5368d848 100644 --- a/admin/survey/export/latexclasses/Vprasanja/KalkulacijaLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/KalkulacijaLatex.php @@ -9,7 +9,7 @@ * Datum: 05/2018 *****************************************/ - define("NAGOVOR_LINE_WIDTH", 0.5, true); + define("NAGOVOR_LINE_WIDTH", 0.5); class KalkulacijaLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/KvotaLatex.php b/admin/survey/export/latexclasses/Vprasanja/KvotaLatex.php index 34e28e40b..5ef456e12 100644 --- a/admin/survey/export/latexclasses/Vprasanja/KvotaLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/KvotaLatex.php @@ -9,7 +9,7 @@ * Datum: 05/2018 *****************************************/ - define("NAGOVOR_LINE_WIDTH", 0.5, true); + define("NAGOVOR_LINE_WIDTH", 0.5); class KvotaLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/MultiGridLatex.php b/admin/survey/export/latexclasses/Vprasanja/MultiGridLatex.php index 63f38140c..5e19269b0 100644 --- a/admin/survey/export/latexclasses/Vprasanja/MultiGridLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/MultiGridLatex.php @@ -10,18 +10,15 @@ *****************************************/ -define("PIC_SIZE", "\includegraphics[width=10cm]", true); //slika sirine 50mm -define("ICON_SIZE", "\includegraphics[width=0.5cm]", true); //za ikone @ slikovni tip -define("RADIO_BTN_SIZE", 0.13, true); -//define("U_SHAPE_WIDTH", 4, true); -define("U_SHAPE_WIDTH_U", 4, true); -define("U_SHAPE_WIDTH_OKVIR", 3.62, true); -//define("U_SHAPE_WIDTH_TEXT_U", 2.1, true); -define("U_SHAPE_WIDTH_TEXT_U", 2.2, true); -define("U_SHAPE_WIDTH_TEXT_OKVIR", 1.81, true); -//define("U_SHAPE_WIDTH_TEXT_OKVIR", 2.1, true); -define("MAXSTEVILOSTOLPCEV", 21, true); //max Stevilo Stolpcev za prvo vrstico pod Drsnikom, zaradi tezav z izrisom, ce je teh vec kot toliko -define("VAS_SIZE", 0.04, true); //VAS_SIZE +define("PIC_SIZE", "\includegraphics[width=10cm]"); //slika sirine 50mm +define("ICON_SIZE", "\includegraphics[width=0.5cm]"); //za ikone @ slikovni tip +define("RADIO_BTN_SIZE", 0.13); +define("U_SHAPE_WIDTH_U", 4); +define("U_SHAPE_WIDTH_OKVIR", 3.62); +define("U_SHAPE_WIDTH_TEXT_U", 2.2); +define("U_SHAPE_WIDTH_TEXT_OKVIR", 1.81); +define("MAXSTEVILOSTOLPCEV", 21); //max Stevilo Stolpcev za prvo vrstico pod Drsnikom, zaradi tezav z izrisom, ce je teh vec kot toliko +define("VAS_SIZE", 0.04); //VAS_SIZE class MultiGridLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/NagovorLatex.php b/admin/survey/export/latexclasses/Vprasanja/NagovorLatex.php index a2b86f49b..779487829 100644 --- a/admin/survey/export/latexclasses/Vprasanja/NagovorLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/NagovorLatex.php @@ -9,7 +9,7 @@ * Datum: 09/2017 *****************************************/ - define("NAGOVOR_LINE_WIDTH", 0.5, true); + define("NAGOVOR_LINE_WIDTH", 0.5); class NagovorLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/RadioCheckboxSelectLatex.php b/admin/survey/export/latexclasses/Vprasanja/RadioCheckboxSelectLatex.php index 3dbe1f965..025a7f008 100644 --- a/admin/survey/export/latexclasses/Vprasanja/RadioCheckboxSelectLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/RadioCheckboxSelectLatex.php @@ -11,8 +11,8 @@ //namespace Export\Latexclasses\Vprasanja; -define("PIC_SIZE", "\includegraphics[width=10cm]", true); //slika sirine 50mm -define("ICON_SIZE", "\includegraphics[width=0.5cm]", true); //za ikone @ slikovni tip +define("PIC_SIZE", "\includegraphics[width=10cm]"); //slika sirine 50mm +define("ICON_SIZE", "\includegraphics[width=0.5cm]"); //za ikone @ slikovni tip class RadioCheckboxSelectLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/RazvrscanjeLatex.php b/admin/survey/export/latexclasses/Vprasanja/RazvrscanjeLatex.php index 7a7443493..9ef7df20c 100644 --- a/admin/survey/export/latexclasses/Vprasanja/RazvrscanjeLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/RazvrscanjeLatex.php @@ -10,9 +10,9 @@ *****************************************/ -define("PIC_SIZE", "\includegraphics[width=10cm]", true); //slika sirine 50mm -define("ICON_SIZE", "\includegraphics[width=0.5cm]", true); //za ikone @ slikovni tip -define("RADIO_BTN_SIZE", 0.13, true); +define("PIC_SIZE", "\includegraphics[width=10cm]"); //slika sirine 50mm +define("ICON_SIZE", "\includegraphics[width=0.5cm]"); //za ikone @ slikovni tip +define("RADIO_BTN_SIZE", 0.13); class RazvrscanjeLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/SNImena.php b/admin/survey/export/latexclasses/Vprasanja/SNImena.php index 97b36f1f9..5ff63d990 100644 --- a/admin/survey/export/latexclasses/Vprasanja/SNImena.php +++ b/admin/survey/export/latexclasses/Vprasanja/SNImena.php @@ -9,7 +9,7 @@ * Datum: 05/2018 *****************************************/ - define("NAGOVOR_LINE_WIDTH", 0.5, true); + define("NAGOVOR_LINE_WIDTH", 0.5); class SNImenaLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/SteviloLatex.php b/admin/survey/export/latexclasses/Vprasanja/SteviloLatex.php index afbd84e92..ade06a602 100644 --- a/admin/survey/export/latexclasses/Vprasanja/SteviloLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/SteviloLatex.php @@ -10,9 +10,9 @@ *****************************************/ -define("PIC_SIZE", "\includegraphics[width=10cm]", true); //slika sirine 50mm -define("ICON_SIZE", "\includegraphics[width=0.5cm]", true); //za ikone @ slikovni tip -define("MAXSTEVILOSTOLPCEV", 21, true); //max Stevilo Stolpcev za prvo vrstico pod Drsnikom, zaradi tezav z izrisom, ce je teh vec kot toliko +define("PIC_SIZE", "\includegraphics[width=10cm]"); //slika sirine 50mm +define("ICON_SIZE", "\includegraphics[width=0.5cm]"); //za ikone @ slikovni tip +define("MAXSTEVILOSTOLPCEV", 21); //max Stevilo Stolpcev za prvo vrstico pod Drsnikom, zaradi tezav z izrisom, ce je teh vec kot toliko class SteviloLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/Vprasanja/VsotaLatex.php b/admin/survey/export/latexclasses/Vprasanja/VsotaLatex.php index 857981a85..726d8fd4b 100644 --- a/admin/survey/export/latexclasses/Vprasanja/VsotaLatex.php +++ b/admin/survey/export/latexclasses/Vprasanja/VsotaLatex.php @@ -10,9 +10,9 @@ *****************************************/ -define("PIC_SIZE", "\includegraphics[width=10cm]", true); //slika sirine 50mm -define("ICON_SIZE", "\includegraphics[width=0.5cm]", true); //za ikone @ slikovni tip -define("RADIO_BTN_SIZE", 0.13, true); +define("PIC_SIZE", "\includegraphics[width=10cm]"); //slika sirine 50mm +define("ICON_SIZE", "\includegraphics[width=0.5cm]"); //za ikone @ slikovni tip +define("RADIO_BTN_SIZE", 0.13); class VsotaLatex extends LatexSurveyElement { diff --git a/admin/survey/export/latexclasses/class.LatexAnalysisElement.php b/admin/survey/export/latexclasses/class.LatexAnalysisElement.php index c71f6778e..408a87cc2 100644 --- a/admin/survey/export/latexclasses/class.LatexAnalysisElement.php +++ b/admin/survey/export/latexclasses/class.LatexAnalysisElement.php @@ -8,9 +8,8 @@ */ -//include('../../function.php'); include('../../vendor/autoload.php'); -define("MAX_STRING_LENGTH", 20, true); +define("MAX_STRING_LENGTH", 20); class LatexAnalysisElement{ diff --git a/admin/survey/export/latexclasses/class.LatexDocument.php b/admin/survey/export/latexclasses/class.LatexDocument.php index ffce72475..d278f5cdd 100644 --- a/admin/survey/export/latexclasses/class.LatexDocument.php +++ b/admin/survey/export/latexclasses/class.LatexDocument.php @@ -97,10 +97,10 @@ omenjeno kodo je potrebno deliti z 255, da dobimo stevilke, ki ustrezajo Latex = //namespace Export\Latexclasses; //include('../../function.php'); include('../../vendor/autoload.php'); -define("ENKA_LOGO_SIZE", 'width=3.51cm,height=2cm,keepaspectratio', true); -define("ENKA_LOGO_SIZE_HEADER", 'width=1.75cm,height=1cm,keepaspectratio', true); -define("SINGLE_TABLE_WIDTH", 3000, true); -define("PAGE_TEXT_WIDTH", 10200, true); //17 cm, 170 mm, je 10200 twips, 1 mm je 60 twips +define("ENKA_LOGO_SIZE", 'width=3.51cm,height=2cm,keepaspectratio'); +define("ENKA_LOGO_SIZE_HEADER", 'width=1.75cm,height=1cm,keepaspectratio'); +define("SINGLE_TABLE_WIDTH", 3000); +define("PAGE_TEXT_WIDTH", 10200); //17 cm, 170 mm, je 10200 twips, 1 mm je 60 twips #definicija za izris drsnika s kroglico define ("circleSlider", '\def\circleSLIDER#1#2{% 1: length, 2: position of the mark (0 to 1) diff --git a/admin/survey/export/latexclasses/class.LatexEditsAnalysis.php b/admin/survey/export/latexclasses/class.LatexEditsAnalysis.php index de67c7d72..0b2dd4a45 100644 --- a/admin/survey/export/latexclasses/class.LatexEditsAnalysis.php +++ b/admin/survey/export/latexclasses/class.LatexEditsAnalysis.php @@ -9,15 +9,15 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('FRAME_TEXT_WIDTH', 0.3); define ('FRAME_WIDTH', 480); diff --git a/admin/survey/export/latexclasses/class.LatexStatus.php b/admin/survey/export/latexclasses/class.LatexStatus.php index ae3a5467e..a4434a7de 100644 --- a/admin/survey/export/latexclasses/class.LatexStatus.php +++ b/admin/survey/export/latexclasses/class.LatexStatus.php @@ -9,27 +9,27 @@ define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge - define("NUM_DIGIT_AVERAGE", 2, true); // stevilo digitalnih mest za povprecje - define("NUM_DIGIT_DEVIATION", 2, true); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje + define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje - define("M_ANALIZA_DESCRIPTOR", "descriptor", true); - define("M_ANALIZA_FREQUENCY", "frequency", true); + define("M_ANALIZA_DESCRIPTOR", "descriptor"); + define("M_ANALIZA_FREQUENCY", "frequency"); - define("FNT_FREESERIF", "freeserif", true); - define("FNT_FREESANS", "freesans", true); - define("FNT_HELVETICA", "helvetica", true); + define("FNT_FREESERIF", "freeserif"); + define("FNT_FREESANS", "freesans"); + define("FNT_HELVETICA", "helvetica"); - define("FNT_MAIN_TEXT", FNT_FREESANS, true); - define("FNT_QUESTION_TEXT", FNT_FREESANS, true); - define("FNT_HEADER_TEXT", FNT_FREESANS, true); + define("FNT_MAIN_TEXT", FNT_FREESANS); + define("FNT_QUESTION_TEXT", FNT_FREESANS); + define("FNT_HEADER_TEXT", FNT_FREESANS); - define("FNT_MAIN_SIZE", 10, true); - define("FNT_QUESTION_SIZE", 9, true); - define("FNT_HEADER_SIZE", 10, true); + define("FNT_MAIN_SIZE", 10); + define("FNT_QUESTION_SIZE", 9); + define("FNT_HEADER_SIZE", 10); - define("RADIO_BTN_SIZE", 3, true); - define("CHCK_BTN_SIZE", 3, true); - define("LINE_BREAK", 6, true); + define("RADIO_BTN_SIZE", 3); + define("CHCK_BTN_SIZE", 3); + define("LINE_BREAK", 6); define ('PDF_MARGIN_HEADER', 8); define ('PDF_MARGIN_FOOTER', 12); diff --git a/admin/survey/export/latexclasses/class.LatexSurvey.php b/admin/survey/export/latexclasses/class.LatexSurvey.php index 52b7d89eb..2ac2312b1 100644 --- a/admin/survey/export/latexclasses/class.LatexSurvey.php +++ b/admin/survey/export/latexclasses/class.LatexSurvey.php @@ -8,9 +8,9 @@ */ //namespace Export\Latexclasses; -//include('../../function.php'); include('../../vendor/autoload.php'); -define("RADIO_BTN_SIZE", 0.13, true); + +define("RADIO_BTN_SIZE", 0.13); class LatexSurvey{ diff --git a/admin/survey/export/latexclasses/class.LatexSurveyElement.php b/admin/survey/export/latexclasses/class.LatexSurveyElement.php index e82284bb9..ae46dbd7e 100644 --- a/admin/survey/export/latexclasses/class.LatexSurveyElement.php +++ b/admin/survey/export/latexclasses/class.LatexSurveyElement.php @@ -8,16 +8,15 @@ */ -//include('../../function.php'); include('../../vendor/autoload.php'); -define("MAX_STRING_LENGTH", 90, true); -define("LINE_BREAK_AT", '7 cm', true); -define("RADIO_BTN_SIZE", 0.13, true); -define("CHCK_BTN_SIZE", 0.13, true); -define("PIC_SIZE_ANS", "\includegraphics[width=3cm]", true); //slika dolocene sirine -define("DROPDOWN_SIZE", 0.8, true); -define("VAS_SIZE", 0.04, true); //VAS_SIZE +define("MAX_STRING_LENGTH", 90); +define("LINE_BREAK_AT", '7 cm'); +define("RADIO_BTN_SIZE", 0.13); +define("CHCK_BTN_SIZE", 0.13); +define("PIC_SIZE_ANS", "\includegraphics[width=3cm]"); //slika dolocene sirine +define("DROPDOWN_SIZE", 0.8); +define("VAS_SIZE", 0.04); //VAS_SIZE class LatexSurveyElement{ diff --git a/admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php b/admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php index f19b92cff..70b0322a5 100644 --- a/admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php +++ b/admin/survey/export/xmlClasses/Vprasanja/BesediloXml.php @@ -7,7 +7,7 @@ * Datum: 10/2018 *****************************************/ -define("VARFORMAT_ELEMENT_TYPE_BESEDILO", "character", true); +define("VARFORMAT_ELEMENT_TYPE_BESEDILO", "character"); class BesediloXml extends XmlSurveyElement { diff --git a/admin/survey/export/xmlClasses/Vprasanja/CheckboxXml.php b/admin/survey/export/xmlClasses/Vprasanja/CheckboxXml.php index 1f6ceba28..312912484 100644 --- a/admin/survey/export/xmlClasses/Vprasanja/CheckboxXml.php +++ b/admin/survey/export/xmlClasses/Vprasanja/CheckboxXml.php @@ -7,8 +7,8 @@ * Datum: 10/2018 *****************************************/ -define("VARGRP_ELEMENT_TYPE", "multipleResp", true); -define("VARFORMAT_ELEMENT_TYPE", "numeric", true); +define("VARGRP_ELEMENT_TYPE", "multipleResp"); +define("VARFORMAT_ELEMENT_TYPE", "numeric"); class CheckboxXml extends XmlSurveyElement { diff --git a/admin/survey/export/xmlClasses/Vprasanja/MultiGridXml.php b/admin/survey/export/xmlClasses/Vprasanja/MultiGridXml.php index b25683b3c..35e9298cb 100644 --- a/admin/survey/export/xmlClasses/Vprasanja/MultiGridXml.php +++ b/admin/survey/export/xmlClasses/Vprasanja/MultiGridXml.php @@ -7,9 +7,9 @@ * Datum: 10/2018 *****************************************/ -define("VARGRP_ELEMENT_TYPE_GRID", "Grid", true); -define("VARGRP_ELEMENT_TYPE_MULTIRESP", "multipleResp", true); -define("VARFORMAT_ELEMENT_TYPE_GRID", "numeric", true); +define("VARGRP_ELEMENT_TYPE_GRID", "Grid"); +define("VARGRP_ELEMENT_TYPE_MULTIRESP", "multipleResp"); +define("VARFORMAT_ELEMENT_TYPE_GRID", "numeric"); class MultiGridXml extends XmlSurveyElement { diff --git a/admin/survey/export/xmlClasses/Vprasanja/RadioXml.php b/admin/survey/export/xmlClasses/Vprasanja/RadioXml.php index e49600894..615cc4749 100644 --- a/admin/survey/export/xmlClasses/Vprasanja/RadioXml.php +++ b/admin/survey/export/xmlClasses/Vprasanja/RadioXml.php @@ -7,7 +7,7 @@ * Datum: 10/2018 *****************************************/ -define("VARFORMAT_ELEMENT_TYPE", "numeric", true); +define("VARFORMAT_ELEMENT_TYPE", "numeric"); class RadioXml extends XmlSurveyElement { diff --git a/admin/survey/export/xmlClasses/Vprasanja/SteviloXml.php b/admin/survey/export/xmlClasses/Vprasanja/SteviloXml.php index 6d5e752d4..cfe32fa66 100644 --- a/admin/survey/export/xmlClasses/Vprasanja/SteviloXml.php +++ b/admin/survey/export/xmlClasses/Vprasanja/SteviloXml.php @@ -7,7 +7,7 @@ * Datum: 10/2018 *****************************************/ -define("VARFORMAT_ELEMENT_TYPE_STEVILO", "numeric", true); +define("VARFORMAT_ELEMENT_TYPE_STEVILO", "numeric"); class SteviloXml extends XmlSurveyElement { diff --git a/admin/survey/export/xmlClasses/class.XmlDocument.php b/admin/survey/export/xmlClasses/class.XmlDocument.php index 931243e0f..3c6f1ba7e 100644 --- a/admin/survey/export/xmlClasses/class.XmlDocument.php +++ b/admin/survey/export/xmlClasses/class.XmlDocument.php @@ -12,7 +12,7 @@ ####################################konec include('../../vendor/autoload.php'); -define("CODEBOOK_VERSION", 2.1, true); +define("CODEBOOK_VERSION", 2.1); class XmlDocument{ diff --git a/admin/survey/export/xmlClasses/class.XmlSurveyElement.php b/admin/survey/export/xmlClasses/class.XmlSurveyElement.php index f903d7dc4..6b830becb 100644 --- a/admin/survey/export/xmlClasses/class.XmlSurveyElement.php +++ b/admin/survey/export/xmlClasses/class.XmlSurveyElement.php @@ -9,12 +9,12 @@ include('../../vendor/autoload.php'); -define("MAX_STRING_LENGTH", 60, true); -define("LINE_BREAK_AT", '7 cm', true); -define("RADIO_BTN_SIZE", 0.13, true); -define("CHCK_BTN_SIZE", 0.13, true); -define("PIC_SIZE_ANS", "\includegraphics[width=3cm]", true); //slika dolocene sirine -define("DROPDOWN_SIZE", 0.8, true); +define("MAX_STRING_LENGTH", 60); +define("LINE_BREAK_AT", '7 cm'); +define("RADIO_BTN_SIZE", 0.13); +define("CHCK_BTN_SIZE", 0.13); +define("PIC_SIZE_ANS", "\includegraphics[width=3cm]"); //slika dolocene sirine +define("DROPDOWN_SIZE", 0.8); class XmlSurveyElement{ diff --git a/admin/survey/index.php b/admin/survey/index.php index ef63d341f..2a581d5a2 100644 --- a/admin/survey/index.php +++ b/admin/survey/index.php @@ -98,7 +98,7 @@ echo ''; // END CKEDITOR diff --git a/admin/survey/izvoz.php b/admin/survey/izvoz.php index b7c537827..225ebd3c4 100644 --- a/admin/survey/izvoz.php +++ b/admin/survey/izvoz.php @@ -22,14 +22,14 @@ else{ /****** DEFINITIONS ******/ -define("M_ANALIZA_DESCRIPTOR", "descriptor", true); -define("M_ANALIZA_FREQUENCY", "frequency", true); -define("M_ANALIZA_CROSSTAB", "crosstabs", true); -define("M_ANALIZA_STATISTICS", "statistics", true); -define("M_ANALIZA_SUMS", "sums", true); +define("M_ANALIZA_DESCRIPTOR", "descriptor"); +define("M_ANALIZA_FREQUENCY", "frequency"); +define("M_ANALIZA_CROSSTAB", "crosstabs"); +define("M_ANALIZA_STATISTICS", "statistics"); +define("M_ANALIZA_SUMS", "sums"); /*PDF*/ -define("A_REPORT_VPRASALNIK_PDF", "vprasalnik_pdf", true); +define("A_REPORT_VPRASALNIK_PDF", "vprasalnik_pdf"); define("A_REPORT_PDF_RESULTS","pdf_results",true); define("A_REPORT_PDF_COMMENT","pdf_comment",true); define("M_REPORT_ANALIZA_PDF_FREKVENCA","frequency",true); @@ -53,53 +53,53 @@ define("M_REPORT_PDF_MJU","pdf_mju",true); define("M_REPORT_PDF_MJU2","pdf_mju2",true); define("M_REPORT_BORZA","borza_chart",true); define("M_REPORT_PDF_HEATMAP_IMAGE","heatmap_image_pdf",true); -define("M_REPORT_HIERARHIJA_PDF_IZPIS", "hierarhija_pdf_izpis", true); +define("M_REPORT_HIERARHIJA_PDF_IZPIS", "hierarhija_pdf_izpis"); /*RTF*/ -define("A_REPORT_VPRASALNIK_RTF", "vprasalnik_rtf", true); -define("A_REPORT_RTF_RESULTS", "rtf_results", true); +define("A_REPORT_VPRASALNIK_RTF", "vprasalnik_rtf"); +define("A_REPORT_RTF_RESULTS", "rtf_results"); define("A_REPORT_RTF_COMMENT","rtf_comment",true); -define("M_REPORT_ANALIZA_RTF_FREKVENCA", "frequency_rtf", true); -define("M_REPORT_ANALIZA_RTF_CROSSTAB_IZPIS", "crosstabs_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_MULTICROSSTAB_IZPIS", "multicrosstabs_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_MEAN_IZPIS", "mean_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_TTEST_IZPIS", "ttest_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_BREAK_IZPIS", "break_izpis_rtf", true); -define("M_REPORT_ANALIZA_RTF_STAT", "statistics_rtf", true); -define("M_REPORT_ANALIZA_RTF_SUMS", "sums_rtf", true); -define("M_REPORT_ANALIZA_RTF_CHARTS", "charts_rtf", true); -define("M_REPORT_ANALIZA_RTF_CREPORT", "creport_rtf", true); -define("A_REPORT_RTF_LIST", "list_rtf", true); +define("M_REPORT_ANALIZA_RTF_FREKVENCA", "frequency_rtf"); +define("M_REPORT_ANALIZA_RTF_CROSSTAB_IZPIS", "crosstabs_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_MULTICROSSTAB_IZPIS", "multicrosstabs_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_MEAN_IZPIS", "mean_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_TTEST_IZPIS", "ttest_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_BREAK_IZPIS", "break_izpis_rtf"); +define("M_REPORT_ANALIZA_RTF_STAT", "statistics_rtf"); +define("M_REPORT_ANALIZA_RTF_SUMS", "sums_rtf"); +define("M_REPORT_ANALIZA_RTF_CHARTS", "charts_rtf"); +define("M_REPORT_ANALIZA_RTF_CREPORT", "creport_rtf"); +define("A_REPORT_RTF_LIST", "list_rtf"); define("M_REPORT_ANALIZA_RTF_HEATMAP_IMAGE","heatmap_image_rtf",true); /*XLS*/ -define("M_REPORT_ANALIZA_XLS_STAT", "statistics_xls", true); -define("M_REPORT_ANALIZA_XLS_FREKVENCA", "frequency_xls", true); -define("M_REPORT_ANALIZA_XLS_CROSSTAB_IZPIS", "crosstabs_izpis_xls", true); -define("M_REPORT_ANALIZA_XLS_MULTICROSSTAB_IZPIS", "multicrosstabs_izpis_xls", true); -define("M_REPORT_ANALIZA_XLS_SUMS", "sums_xls", true); -define("M_REPORT_ANALIZA_XLS_MEAN_IZPIS", "mean_izpis_xls", true); -define("M_REPORT_ANALIZA_XLS_TTEST_IZPIS", "ttest_izpis_xls", true); -define("M_REPORT_ANALIZA_XLS_BREAK_IZPIS", "break_izpis_xls", true); -define("A_REPORT_XLS_LIST", "list_xls", true); -define("A_REPORT_XLS_USABLE", "usable_xls", true); -define("A_REPORT_XLS_SPEEDER", "speeder_xls", true); -define("A_REPORT_XLS_TEXT_ANALYSIS", "text_analysis_xls", true); -define("A_REPORT_CSV_TEXT_ANALYSIS", "text_analysis_csv", true); -define("M_REPORT_CSV_MAZA_USERS", "maza_csv", true); -define("M_REPORT_CSV_ADVANCED_PARADATA", "advanced_paradata_csv", true); +define("M_REPORT_ANALIZA_XLS_STAT", "statistics_xls"); +define("M_REPORT_ANALIZA_XLS_FREKVENCA", "frequency_xls"); +define("M_REPORT_ANALIZA_XLS_CROSSTAB_IZPIS", "crosstabs_izpis_xls"); +define("M_REPORT_ANALIZA_XLS_MULTICROSSTAB_IZPIS", "multicrosstabs_izpis_xls"); +define("M_REPORT_ANALIZA_XLS_SUMS", "sums_xls"); +define("M_REPORT_ANALIZA_XLS_MEAN_IZPIS", "mean_izpis_xls"); +define("M_REPORT_ANALIZA_XLS_TTEST_IZPIS", "ttest_izpis_xls"); +define("M_REPORT_ANALIZA_XLS_BREAK_IZPIS", "break_izpis_xls"); +define("A_REPORT_XLS_LIST", "list_xls"); +define("A_REPORT_XLS_USABLE", "usable_xls"); +define("A_REPORT_XLS_SPEEDER", "speeder_xls"); +define("A_REPORT_XLS_TEXT_ANALYSIS", "text_analysis_xls"); +define("A_REPORT_CSV_TEXT_ANALYSIS", "text_analysis_csv"); +define("M_REPORT_CSV_MAZA_USERS", "maza_csv"); +define("M_REPORT_CSV_ADVANCED_PARADATA", "advanced_paradata_csv"); /*JSON*/ -define("M_REPORT_JSON_SURVEY_EXPORT", "json_survey", true); +define("M_REPORT_JSON_SURVEY_EXPORT", "json_survey"); -define("A_LANGUAGE_TECHNOLOGY_XLS", "lt_excel", true); +define("A_LANGUAGE_TECHNOLOGY_XLS", "lt_excel"); /*PPT*/ -define("M_REPORT_ANALIZA_PPT_CHARTS", "charts_ppt", true); +define("M_REPORT_ANALIZA_PPT_CHARTS", "charts_ppt"); define("M_REPORT_ANALIZA_PPT_HEATMAP_IMAGE","heatmap_image_ppt",true); /*IMAGE*/ -define("M_REPORT_ANALIZA_HEATMAP_IMAGE", "heatmap_image", true); +define("M_REPORT_ANALIZA_HEATMAP_IMAGE", "heatmap_image"); diff --git a/admin/survey/modules/Evalvacija/class.Evalvacija.php b/admin/survey/modules/Evalvacija/class.Evalvacija.php index 282a11888..1a54ad2b1 100644 --- a/admin/survey/modules/Evalvacija/class.Evalvacija.php +++ b/admin/survey/modules/Evalvacija/class.Evalvacija.php @@ -8,10 +8,10 @@ ini_set('max_execution_time', 3600); // 1800 seconds = 30 minutes * */ -define("TEMP_FOLDER", "admin/survey/modules/Evalvacija/temp", true); -define("SCRIPT_FOLDER", "admin/survey/modules/Evalvacija/R", true); -define("RESULTS_FOLDER", "admin/survey/modules/Evalvacija/results", true); -define("PDF_FOLDER", "admin/survey/modules/Evalvacija/pdf", true); +define("TEMP_FOLDER", "admin/survey/modules/Evalvacija/temp"); +define("SCRIPT_FOLDER", "admin/survey/modules/Evalvacija/R"); +define("RESULTS_FOLDER", "admin/survey/modules/Evalvacija/results"); +define("PDF_FOLDER", "admin/survey/modules/Evalvacija/pdf"); class Evalvacija{ diff --git a/admin/survey/modules/Evalvacija/class.GC.php b/admin/survey/modules/Evalvacija/class.GC.php index 2f3b189da..c598a1e67 100644 --- a/admin/survey/modules/Evalvacija/class.GC.php +++ b/admin/survey/modules/Evalvacija/class.GC.php @@ -30,18 +30,18 @@ set_time_limit(7200); # 120 minut ini_set('default_socket_timeout', 1000); -define('CERT_FOLDER', "modules/Evalvacija/GC_cert", true); +define('CERT_FOLDER', "modules/Evalvacija/GC_cert"); // Produkcijski streznik -define('GC_URL', "https://gcwserac.uni-lj.si/IntegrationUL/Services/GcService.asmx", true); -//define(WSDL_URL, "https://gcwserac.uni-lj.si/IntegrationUL/Services/GcService.asmx?WSDL", true); +define('GC_URL', "https://gcwserac.uni-lj.si/IntegrationUL/Services/GcService.asmx"); +//define(WSDL_URL, "https://gcwserac.uni-lj.si/IntegrationUL/Services/GcService.asmx?WSDL"); // Direktno produkcijski strežnik za testiranje -//define(GC_URL, "https://193.2.64.32", true); +//define(GC_URL, "https://193.2.64.32"); // Testni streznik -//define(GC_URL, "https://gcwserac-test.uni-lj.si/IntegrationUL/Services/GcService.asmx", true); -//define(WSDL_URL, "https://gcwserac-test.uni-lj.si/IntegrationUL/Services/GcService.asmx?WSDL", true); +//define(GC_URL, "https://gcwserac-test.uni-lj.si/IntegrationUL/Services/GcService.asmx"); +//define(WSDL_URL, "https://gcwserac-test.uni-lj.si/IntegrationUL/Services/GcService.asmx?WSDL"); class GC{ @@ -183,9 +183,9 @@ class GC{ '4_1' => 'predmeti' ); - $reports_id = '11112020'; + $reports_id = '08122020'; $report_type = '2_2'; - $fak_id = '3000027'; + $fak_id = '3000018'; $zip_name = ''; // Nastavimo pot do pdf-jev diff --git a/admin/survey/modules/mod_360/class.Survey360.php b/admin/survey/modules/mod_360/class.Survey360.php index e7ba93c04..6d8485606 100644 --- a/admin/survey/modules/mod_360/class.Survey360.php +++ b/admin/survey/modules/mod_360/class.Survey360.php @@ -1,8 +1,8 @@ % subset(skupina == ID) %>% - subset(oddelek_ime != -1) %>% + #subset(oddelek_ime != -1) %>% subset(status == 6) # Odstranimo vrstice, ki vsebujejo vrednosti neveljavnih odgovorov (od -1 do -5) diff --git a/admin/survey/modules/mod_EVOLI/R/Evoli_org_employ_meter_slo.R b/admin/survey/modules/mod_EVOLI/R/Evoli_org_employ_meter_slo.R index c6a47b254..ff1dc46bb 100644 --- a/admin/survey/modules/mod_EVOLI/R/Evoli_org_employ_meter_slo.R +++ b/admin/survey/modules/mod_EVOLI/R/Evoli_org_employ_meter_slo.R @@ -82,7 +82,7 @@ if (data[1, 1] == ("Ustreznost") | # Izberemo dokon?ane ankete skupine 1 in odstranimo podatke brez oddelka data <- data %>% subset(skupina == ID) %>% - subset(oddelek_ime != -1) %>% + #subset(oddelek_ime != -1) %>% subset(status == 6) # Odstranimo vrstice, ki vsebujejo vrednosti neveljavnih odgovorov (od -1 do -5) diff --git a/admin/survey/modules/mod_EVOLI/R/Evoli_quality_clime_ang.R b/admin/survey/modules/mod_EVOLI/R/Evoli_quality_clime_ang.R index 19b24f15b..3e47bde0f 100644 --- a/admin/survey/modules/mod_EVOLI/R/Evoli_quality_clime_ang.R +++ b/admin/survey/modules/mod_EVOLI/R/Evoli_quality_clime_ang.R @@ -72,7 +72,7 @@ if (data[1, 1] == ("Ustreznost") | data <- subset(data, skupina == ID) # Če oddelek nima podatka oziroma je manjkajoča vrednost, # ga odstranimo v izogib errorju pri izdelavi frekvenčne tabele -data <- subset(data, oddelek_ime != -1) +#data <- subset(data, oddelek_ime != -1) # Izberemo samo koncane ankete data <- subset(data, status == 6) #--------------------------- //IMPORT DATA// --------------------------# @@ -462,7 +462,7 @@ p <- ggplot(df, aes(x = factor(name))) + # Rest of theme coord_flip() + scale_y_continuous( - position = "top", + position = "right", # položaj osi je na vrgu grafa expand = c(0, 0), breaks = seq(min(0), max(0, 102), by = 10), @@ -496,7 +496,7 @@ p1 <- p + theme(axis.text.x = element_text(colour="black",size=11,face="plain"), plot.title = element_text(hjust = 0.4,size = 15, face = "bold")) #+ #ggtitle("Employeeship for all teams") -p1 + theme(axis.ticks=element_blank()) +print(p1 + theme(axis.ticks=element_blank())) dev.off() # END: Save ggplot to pdf # Shranimo sliko in vklju\u010Dimo v pdf: LATEX @@ -847,7 +847,7 @@ if (nrow(oddelek_length) > 0) { # Rest of theme coord_flip() + - scale_y_continuous(position = "top", # položaj osi je na vrgu grafa + scale_y_continuous(position = "right", # položaj osi je na vrgu grafa expand = c(0, 0), breaks = seq(min(0), max(0,102), by = 10), limits = c(0,102), @@ -1000,8 +1000,7 @@ tex.izbor <- c( drugi_del_tex, "\\end{document}" ) - - +# Compile PDF setwd(paste(Rdirektorij, "modules/mod_EVOLI/results", sep="/")) # File folder cat(unlist(tex.izbor), file=paste0("Quality-climate.tex"), sep="\n") # Name of tex file tools::texi2pdf(file=paste0("Quality-climate.tex"), quiet=TRUE, clean=TRUE) # Pdf file diff --git a/admin/survey/modules/mod_EVOLI/R/Evoli_quality_clime_slo.R b/admin/survey/modules/mod_EVOLI/R/Evoli_quality_clime_slo.R index 152aeac41..9a024b955 100644 --- a/admin/survey/modules/mod_EVOLI/R/Evoli_quality_clime_slo.R +++ b/admin/survey/modules/mod_EVOLI/R/Evoli_quality_clime_slo.R @@ -80,9 +80,10 @@ if (data[1, 1] == ("Ustreznost") | data <- data[2:nrow(data),] } data <- subset(data, skupina == ID) + # Če oddelek nima podatka oziroma je manjkajoča vrednost, # ga odstranimo v izogib errorju pri izdelavi frekvenčne tabele -data <- subset(data, oddelek_ime != -1) +#data <- subset(data, oddelek_ime != -1) # Izberemo samo koncane ankete data <- subset(data, status == 6) #--------------------------- //IMPORT DATA// --------------------------# @@ -474,7 +475,7 @@ p <- ggplot(df, aes(x = factor(name))) + # Rest of theme coord_flip() + scale_y_continuous( - position = "top", + position = "right", # položaj osi je na vrgu grafa expand = c(0, 0), breaks = seq(min(0), max(0, 102), by = 10), @@ -508,7 +509,7 @@ p1 <- p + theme(axis.text.x = element_text(colour="black",size=11,face="plain"), plot.title = element_text(hjust = 0.4,size = 15, face = "bold")) #+ #ggtitle("Employeeship for all teams") -p1 + theme(axis.ticks=element_blank()) +print(p1 + theme(axis.ticks=element_blank())) dev.off() # END: Save ggplot to pdf # Shranimo sliko in vklju\u010Dimo v pdf: LATEX @@ -859,7 +860,7 @@ if (nrow(oddelek_length) > 0) { # Rest of theme coord_flip() + - scale_y_continuous(position = "top", # položaj osi je na vrgu grafa + scale_y_continuous(position = "right", # položaj osi je na vrgu grafa expand = c(0, 0), breaks = seq(min(0), max(0,102), by = 10), limits = c(0,102), @@ -944,7 +945,7 @@ customer <- tex.glava <- scan("modules/mod_EVOLI/latexkosi/glava-evoli_klima_slo.tex", character(0), sep="\n", quiet=TRUE,encoding='UTF-8') # Define document (first page, ...) tex.17.znakov <- scan("modules/mod_EVOLI/latexkosi/klima_17_znakov.tex", character(0), sep="\n", quiet=TRUE,encoding='UTF-8') tex.glava <- gsub(pattern='!organisation!', replacement=Hmisc::latexTranslate(organisation), x=tex.glava) # Organisation name -tex.glava <- gsub(pattern='!date!', replacement=Hmisc::latexTranslate(date), x=tex.glava) # Organisation name +tex.glava <- gsub(pattern='!date!', replacement=Hmisc::latexTranslate(date[1]), x=tex.glava) # Organisation name tex.glava <- gsub(pattern='COMPANY NAME', replacement=Hmisc::latexTranslate(organisation), x=tex.glava, fixed = TRUE) # Organisation name tex.glava <- gsub(pattern='!name!', replacement=Hmisc::latexTranslate(customer), x=tex.glava, fixed = TRUE) # Customer name tex.noga <- scan("modules/mod_EVOLI/latexkosi/z-noga.tex", character(0), sep="\n", quiet=TRUE) # End latex document @@ -964,12 +965,8 @@ tex.izbor <- c( tex.17.znakov, tex.noga ) - - +# Compile PDF setwd(paste(Rdirektorij, "modules/mod_EVOLI/results", sep="/")) # File folder cat(unlist(tex.izbor), file=paste0("Klima-kakovosti.tex"), sep="\n") # Name of tex file tools::texi2pdf(file=paste0("Klima-kakovosti.tex"), quiet=TRUE, clean=TRUE) # Pdf file setwd(Rdirektorij) - - - diff --git a/admin/survey/modules/mod_EVOLI/R/Evoli_teamship_meter_ang.R b/admin/survey/modules/mod_EVOLI/R/Evoli_teamship_meter_ang.R index 41a775c48..329e1cb42 100644 --- a/admin/survey/modules/mod_EVOLI/R/Evoli_teamship_meter_ang.R +++ b/admin/survey/modules/mod_EVOLI/R/Evoli_teamship_meter_ang.R @@ -77,7 +77,7 @@ data <- subset(data, skupina == ID) # ?e oddelek nima podatka oziroma je manjkajo?a vrednost, # ga odstranimo v izogib errorju pri izdelavi frekven?ne tabele -data <- subset(data, oddelek_ime != -1) +#data <- subset(data, oddelek_ime != -1) # Izberemo samo koncane ankete data <- subset(data, status == 6) diff --git a/admin/survey/modules/mod_EVOLI/R/Evoli_teamship_meter_slo.R b/admin/survey/modules/mod_EVOLI/R/Evoli_teamship_meter_slo.R index 92c280dea..ecb90d6b0 100644 --- a/admin/survey/modules/mod_EVOLI/R/Evoli_teamship_meter_slo.R +++ b/admin/survey/modules/mod_EVOLI/R/Evoli_teamship_meter_slo.R @@ -83,7 +83,7 @@ if (data[1, 1] == ("Ustreznost") | # Izberemo dokon?ane ankete skupine 1 in odstranimo podatke brez oddelka data <- data %>% subset(skupina == ID) %>% - subset(oddelek_ime != -1) %>% + # subset(oddelek_ime != -1) %>% subset(status == 6) # Odstranimo vrstice, ki vsebujejo vrednosti neveljavnih odgovorov (od -1 do -5) diff --git a/admin/survey/modules/mod_EVOLI/class.SurveyEmployMeter.php b/admin/survey/modules/mod_EVOLI/class.SurveyEmployMeter.php index 597d703c4..5b181885d 100644 --- a/admin/survey/modules/mod_EVOLI/class.SurveyEmployMeter.php +++ b/admin/survey/modules/mod_EVOLI/class.SurveyEmployMeter.php @@ -2,9 +2,9 @@ include_once 'definition.php'; -define("TEMP_FOLDER", "admin/survey/modules/mod_EVOLI/temp", true); -define("SCRIPT_FOLDER", "admin/survey/modules/mod_EVOLI/R", true); -define("RESULTS_FOLDER", "admin/survey/modules/mod_EVOLI/results", true); +define("TEMP_FOLDER", "admin/survey/modules/mod_EVOLI/temp"); +define("SCRIPT_FOLDER", "admin/survey/modules/mod_EVOLI/R"); +define("RESULTS_FOLDER", "admin/survey/modules/mod_EVOLI/results"); class SurveyEmployMeter{ diff --git a/admin/survey/modules/mod_EVOLI/class.SurveyEvoli.php b/admin/survey/modules/mod_EVOLI/class.SurveyEvoli.php index 904442d14..49b8f3f0e 100644 --- a/admin/survey/modules/mod_EVOLI/class.SurveyEvoli.php +++ b/admin/survey/modules/mod_EVOLI/class.SurveyEvoli.php @@ -2,9 +2,9 @@ include_once 'definition.php'; -define("TEMP_FOLDER", "admin/survey/modules/mod_EVOLI/temp", true); -define("SCRIPT_FOLDER", "admin/survey/modules/mod_EVOLI/R", true); -define("RESULTS_FOLDER", "admin/survey/modules/mod_EVOLI/results", true); +define("TEMP_FOLDER", "admin/survey/modules/mod_EVOLI/temp"); +define("SCRIPT_FOLDER", "admin/survey/modules/mod_EVOLI/R"); +define("RESULTS_FOLDER", "admin/survey/modules/mod_EVOLI/results"); class SurveyEvoli{ diff --git a/admin/survey/modules/mod_EVOLI/class.SurveyTeamMeter.php b/admin/survey/modules/mod_EVOLI/class.SurveyTeamMeter.php index 87bbb5035..c31186f7d 100644 --- a/admin/survey/modules/mod_EVOLI/class.SurveyTeamMeter.php +++ b/admin/survey/modules/mod_EVOLI/class.SurveyTeamMeter.php @@ -2,11 +2,11 @@ include_once 'definition.php'; -define("TEMP_FOLDER", "admin/survey/modules/mod_EVOLI/temp", true); -define("SCRIPT_FOLDER", "admin/survey/modules/mod_EVOLI/R", true); -define("RESULTS_FOLDER", "admin/survey/modules/mod_EVOLI/results", true); +define("TEMP_FOLDER", "admin/survey/modules/mod_EVOLI/temp"); +define("SCRIPT_FOLDER", "admin/survey/modules/mod_EVOLI/R"); +define("RESULTS_FOLDER", "admin/survey/modules/mod_EVOLI/results"); -define("EXPORT_FOLDER", "admin/survey/SurveyData", true); +define("EXPORT_FOLDER", "admin/survey/SurveyData"); class SurveyTeamMeter{ @@ -477,8 +477,8 @@ class SurveyTeamMeter{ } // Zaenkrat dopuscamo samo status 6 in brez lurkerjev - define('STATUS_FIELD', '$4', true); - define('LURKER_FIELD', '$5', true); + define('STATUS_FIELD', '$4'); + define('LURKER_FIELD', '$5'); $status_filter = '('.STATUS_FIELD.' ~ /6|5/)&&('.LURKER_FIELD.'==0)'; //$status_filter = '($4 ~ /6|5/)&&($5==0)'; //$status_filter = '('.STATUS_FIELD.'==6)&&('.LURKER_FIELD.'==0)'; diff --git a/admin/survey/modules/mod_EVOLI/latexkosi/drugi_del-quality_clime_ang.tex b/admin/survey/modules/mod_EVOLI/latexkosi/drugi_del-quality_clime_ang.tex index df2c06b5e..9f92221b8 100644 --- a/admin/survey/modules/mod_EVOLI/latexkosi/drugi_del-quality_clime_ang.tex +++ b/admin/survey/modules/mod_EVOLI/latexkosi/drugi_del-quality_clime_ang.tex @@ -398,7 +398,7 @@ of organisational systems and policies. and online diagnostic tools to companies and organisations worldwide to enable them \\ to achieve long-lasting results at the personal, team and organisational levels. } \end{center} -\\ \\ +\ \\ \\ \begin{center} {\small Claus M{\o}ller Consulting helps organisations to measure, improve and manage \\ productivity, relationships, quality, and leadership}. diff --git a/admin/survey/modules/mod_EVOLI/latexkosi/glava-evoli_klima_slo.tex b/admin/survey/modules/mod_EVOLI/latexkosi/glava-evoli_klima_slo.tex index 29cb47448..be8dd763c 100644 --- a/admin/survey/modules/mod_EVOLI/latexkosi/glava-evoli_klima_slo.tex +++ b/admin/survey/modules/mod_EVOLI/latexkosi/glava-evoli_klima_slo.tex @@ -734,7 +734,7 @@ samodisciplino". \begin{center} {\large \textbf{Kako uporabite orodje za posameznika}} \end{center} -\\ +\ \\ \renewcommand\labelitemi{\large$\bullet$} \begin{itemize} \item Vsak član tima mora pazljivo pregledati svoje lastne odgovore \\ diff --git a/admin/survey/modules/mod_EVOLI/latexkosi/glava-quality_clime_ang.tex b/admin/survey/modules/mod_EVOLI/latexkosi/glava-quality_clime_ang.tex index 1cee1c018..618b2faaa 100644 --- a/admin/survey/modules/mod_EVOLI/latexkosi/glava-quality_clime_ang.tex +++ b/admin/survey/modules/mod_EVOLI/latexkosi/glava-quality_clime_ang.tex @@ -674,7 +674,7 @@ strengthen your self-discipline''. \begin{center} {\large \textbf{How the individual can use the tool}} \end{center} -\\ +\ \\ \renewcommand\labelitemi{\large$\bullet$} \begin{itemize} \item Every employee should carefully study the \textit{Quality Climate} \\ diff --git a/admin/survey/modules/mod_MFDPS/class.SurveyMFDPS.php b/admin/survey/modules/mod_MFDPS/class.SurveyMFDPS.php index 354f5ef82..b3d320fb3 100644 --- a/admin/survey/modules/mod_MFDPS/class.SurveyMFDPS.php +++ b/admin/survey/modules/mod_MFDPS/class.SurveyMFDPS.php @@ -1,8 +1,8 @@ =5.5.0" }, "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", - "friendsofphp/php-cs-fixer": "^2.2", - "phpunit/phpunit": "^4.8 || ^5.7" + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.5.6", + "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { "ext-mbstring": "Needed to send email in multibyte encoding charset", @@ -815,7 +817,7 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2020-10-09 14:55:58" + "time": "2020-11-25 15:24:57" }, { "name": "psr/http-message", @@ -1017,16 +1019,16 @@ }, { "name": "stripe/stripe-php", - "version": "v7.61.0", + "version": "v7.66.1", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "51c6cd18cb51740101c940a3fefc876ef7cd8cae" + "reference": "a2ebaa272a8797b21e81afaf8d5ba0953ff15e13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/51c6cd18cb51740101c940a3fefc876ef7cd8cae", - "reference": "51c6cd18cb51740101c940a3fefc876ef7cd8cae", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/a2ebaa272a8797b21e81afaf8d5ba0953ff15e13", + "reference": "a2ebaa272a8797b21e81afaf8d5ba0953ff15e13", "shasum": "" }, "require": { @@ -1036,7 +1038,7 @@ "php": ">=5.6.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "2.16.1", + "friendsofphp/php-cs-fixer": "2.16.5", "php-coveralls/php-coveralls": "^2.1", "phpunit/phpunit": "^5.7", "squizlabs/php_codesniffer": "^3.3", @@ -1070,7 +1072,7 @@ "payment processing", "stripe" ], - "time": "2020-10-20 20:01:45" + "time": "2020-12-01 18:44:12" }, { "name": "symfony/polyfill-intl-idn", @@ -2257,16 +2259,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.16", + "version": "v4.4.17", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "3718e18b68d955348ad860e505991802c09f5f73" + "reference": "65c6f1e848cda840ef7278686c8e30a7cc353c93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3718e18b68d955348ad860e505991802c09f5f73", - "reference": "3718e18b68d955348ad860e505991802c09f5f73", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/65c6f1e848cda840ef7278686c8e30a7cc353c93", + "reference": "65c6f1e848cda840ef7278686c8e30a7cc353c93", "shasum": "" }, "require": { @@ -2325,7 +2327,7 @@ "debug", "dump" ], - "time": "2020-10-26 20:47:51" + "time": "2020-11-24 09:55:37" } ], "aliases": [], diff --git a/frontend/api/api_test.php b/frontend/api/api_test.php index 748205387..c86bab347 100644 --- a/frontend/api/api_test.php +++ b/frontend/api/api_test.php @@ -20,7 +20,7 @@ $action = 'logout'; // Izvedemo klic (GET ali POST) //$result = executeGET(); -$result = executePOST(); +//$result = executePOST(); diff --git a/frontend/drupal/CHANGELOG.txt b/frontend/drupal/CHANGELOG.txt index 7f5f570a5..2c3b93c64 100644 --- a/frontend/drupal/CHANGELOG.txt +++ b/frontend/drupal/CHANGELOG.txt @@ -1,3 +1,23 @@ +Drupal 7.77, 2020-12-03 +----------------------- +- Hotfix for schema.prefixed tables + +Drupal 7.76, 2020-12-02 +----------------------- +- Support for MySQL 8 +- Core tests pass in SQLite +- Better user flood control logging + +Drupal 7.75, 2020-11-26 +----------------------- +- Fixed security issues: + - SA-CORE-2020-013 + +Drupal 7.74, 2020-11-17 +----------------------- +- Fixed security issues: + - SA-CORE-2020-012 + Drupal 7.73, 2020-09-16 ----------------------- - Fixed security issues: diff --git a/frontend/drupal/MAINTAINERS.txt b/frontend/drupal/MAINTAINERS.txt index 4ea5572a7..cbc9f51a8 100644 --- a/frontend/drupal/MAINTAINERS.txt +++ b/frontend/drupal/MAINTAINERS.txt @@ -12,7 +12,7 @@ The branch maintainers for Drupal 7 are: - Dries Buytaert 'dries' https://www.drupal.org/u/dries - Fabian Franz 'Fabianx' https://www.drupal.org/u/fabianx -- (provisional) Drew Webber 'mcdruid' https://www.drupal.org/u/mcdruid +- Drew Webber 'mcdruid' https://www.drupal.org/u/mcdruid Component maintainers diff --git a/frontend/drupal/includes/bootstrap.inc b/frontend/drupal/includes/bootstrap.inc index 099c348d7..87c1fdca2 100644 --- a/frontend/drupal/includes/bootstrap.inc +++ b/frontend/drupal/includes/bootstrap.inc @@ -8,7 +8,7 @@ /** * The current system version. */ -define('VERSION', '7.73'); +define('VERSION', '7.77'); /** * Core API compatibility. @@ -1189,19 +1189,21 @@ function variable_initialize($conf = array()) { $variables = $cached->data; } else { - // Cache miss. Avoid a stampede. + // Cache miss. Avoid a stampede by acquiring a lock. If the lock fails to + // acquire, optionally just continue with uncached processing. $name = 'variable_init'; - if (!lock_acquire($name, 1)) { - // Another request is building the variable cache. - // Wait, then re-run this function. + $lock_acquired = lock_acquire($name, 1); + if (!$lock_acquired && variable_get('variable_initialize_wait_for_lock', FALSE)) { lock_wait($name); return variable_initialize($conf); } else { - // Proceed with variable rebuild. + // Load the variables from the table. $variables = array_map('unserialize', db_query('SELECT name, value FROM {variable}')->fetchAllKeyed()); - cache_set('variables', $variables, 'cache_bootstrap'); - lock_release($name); + if ($lock_acquired) { + cache_set('variables', $variables, 'cache_bootstrap'); + lock_release($name); + } } } diff --git a/frontend/drupal/includes/common.inc b/frontend/drupal/includes/common.inc index 07373ac47..7b7955855 100644 --- a/frontend/drupal/includes/common.inc +++ b/frontend/drupal/includes/common.inc @@ -6653,30 +6653,41 @@ function element_children(&$elements, $sort = FALSE) { $sort = isset($elements['#sorted']) ? !$elements['#sorted'] : $sort; // Filter out properties from the element, leaving only children. - $children = array(); + $count = count($elements); + $child_weights = array(); + $i = 0; $sortable = FALSE; foreach ($elements as $key => $value) { if (is_int($key) || $key === '' || $key[0] !== '#') { - $children[$key] = $value; if (is_array($value) && isset($value['#weight'])) { + $weight = $value['#weight']; $sortable = TRUE; } + else { + $weight = 0; + } + // Support weights with up to three digit precision and conserve the + // insertion order. + $child_weights[$key] = floor($weight * 1000) + $i / $count; } + $i++; } + // Sort the children if necessary. if ($sort && $sortable) { - uasort($children, 'element_sort'); + asort($child_weights); // Put the sorted children back into $elements in the correct order, to // preserve sorting if the same element is passed through // element_children() twice. - foreach ($children as $key => $child) { + foreach ($child_weights as $key => $weight) { + $value = $elements[$key]; unset($elements[$key]); - $elements[$key] = $child; + $elements[$key] = $value; } $elements['#sorted'] = TRUE; } - return array_keys($children); + return array_keys($child_weights); } /** diff --git a/frontend/drupal/includes/database/database.inc b/frontend/drupal/includes/database/database.inc index 6879f6991..d4d2d8f02 100644 --- a/frontend/drupal/includes/database/database.inc +++ b/frontend/drupal/includes/database/database.inc @@ -310,6 +310,13 @@ abstract class DatabaseConnection extends PDO { */ protected $escapedAliases = array(); + /** + * List of un-prefixed table names, keyed by prefixed table names. + * + * @var array + */ + protected $unprefixedTablesMap = array(); + function __construct($dsn, $username, $password, $driver_options = array()) { // Initialize and prepare the connection prefix. $this->setPrefix(isset($this->connectionOptions['prefix']) ? $this->connectionOptions['prefix'] : ''); @@ -338,7 +345,9 @@ abstract class DatabaseConnection extends PDO { // Destroy all references to this connection by setting them to NULL. // The Statement class attribute only accepts a new value that presents a // proper callable, so we reset it to PDOStatement. - $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array())); + if (!empty($this->statementClass)) { + $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array())); + } $this->schema = NULL; } @@ -442,6 +451,13 @@ abstract class DatabaseConnection extends PDO { $this->prefixReplace[] = $this->prefixes['default']; $this->prefixSearch[] = '}'; $this->prefixReplace[] = ''; + + // Set up a map of prefixed => un-prefixed tables. + foreach ($this->prefixes as $table_name => $prefix) { + if ($table_name !== 'default') { + $this->unprefixedTablesMap[$prefix . $table_name] = $table_name; + } + } } /** @@ -477,6 +493,17 @@ abstract class DatabaseConnection extends PDO { } } + /** + * Gets a list of individually prefixed table names. + * + * @return array + * An array of un-prefixed table names, keyed by their fully qualified table + * names (i.e. prefix + table_name). + */ + public function getUnprefixedTablesMap() { + return $this->unprefixedTablesMap; + } + /** * Prepares a query string and returns the prepared statement. * @@ -2840,7 +2867,6 @@ function db_field_exists($table, $field) { * * @param $table_expression * An SQL expression, for example "simpletest%" (without the quotes). - * BEWARE: this is not prefixed, the caller should take care of that. * * @return * Array, both the keys and the values are the matching tables. @@ -2849,6 +2875,23 @@ function db_find_tables($table_expression) { return Database::getConnection()->schema()->findTables($table_expression); } +/** + * Finds all tables that are like the specified base table name. This is a + * backport of the change made to db_find_tables in Drupal 8 to work with + * virtual, un-prefixed table names. The original function is retained for + * Backwards Compatibility. + * @see https://www.drupal.org/node/2552435 + * + * @param $table_expression + * An SQL expression, for example "simpletest%" (without the quotes). + * + * @return + * Array, both the keys and the values are the matching tables. + */ +function db_find_tables_d8($table_expression) { + return Database::getConnection()->schema()->findTablesD8($table_expression); +} + function _db_create_keys_sql($spec) { return Database::getConnection()->schema()->createKeysSql($spec); } diff --git a/frontend/drupal/includes/database/mysql/database.inc b/frontend/drupal/includes/database/mysql/database.inc index 356e039f7..00df3c13e 100644 --- a/frontend/drupal/includes/database/mysql/database.inc +++ b/frontend/drupal/includes/database/mysql/database.inc @@ -5,6 +5,11 @@ * Database interface code for MySQL database servers. */ +/** + * The default character for quoting identifiers in MySQL. + */ +define('MYSQL_IDENTIFIER_QUOTE_CHARACTER_DEFAULT', '`'); + /** * @addtogroup database * @{ @@ -19,6 +24,277 @@ class DatabaseConnection_mysql extends DatabaseConnection { */ protected $needsCleanup = FALSE; + /** + * The list of MySQL reserved key words. + * + * @link https://dev.mysql.com/doc/refman/8.0/en/keywords.html + */ + private $reservedKeyWords = array( + 'accessible', + 'add', + 'admin', + 'all', + 'alter', + 'analyze', + 'and', + 'as', + 'asc', + 'asensitive', + 'before', + 'between', + 'bigint', + 'binary', + 'blob', + 'both', + 'by', + 'call', + 'cascade', + 'case', + 'change', + 'char', + 'character', + 'check', + 'collate', + 'column', + 'condition', + 'constraint', + 'continue', + 'convert', + 'create', + 'cross', + 'cube', + 'cume_dist', + 'current_date', + 'current_time', + 'current_timestamp', + 'current_user', + 'cursor', + 'database', + 'databases', + 'day_hour', + 'day_microsecond', + 'day_minute', + 'day_second', + 'dec', + 'decimal', + 'declare', + 'default', + 'delayed', + 'delete', + 'dense_rank', + 'desc', + 'describe', + 'deterministic', + 'distinct', + 'distinctrow', + 'div', + 'double', + 'drop', + 'dual', + 'each', + 'else', + 'elseif', + 'empty', + 'enclosed', + 'escaped', + 'except', + 'exists', + 'exit', + 'explain', + 'false', + 'fetch', + 'first_value', + 'float', + 'float4', + 'float8', + 'for', + 'force', + 'foreign', + 'from', + 'fulltext', + 'function', + 'generated', + 'get', + 'grant', + 'group', + 'grouping', + 'groups', + 'having', + 'high_priority', + 'hour_microsecond', + 'hour_minute', + 'hour_second', + 'if', + 'ignore', + 'in', + 'index', + 'infile', + 'inner', + 'inout', + 'insensitive', + 'insert', + 'int', + 'int1', + 'int2', + 'int3', + 'int4', + 'int8', + 'integer', + 'interval', + 'into', + 'io_after_gtids', + 'io_before_gtids', + 'is', + 'iterate', + 'join', + 'json_table', + 'key', + 'keys', + 'kill', + 'lag', + 'last_value', + 'lead', + 'leading', + 'leave', + 'left', + 'like', + 'limit', + 'linear', + 'lines', + 'load', + 'localtime', + 'localtimestamp', + 'lock', + 'long', + 'longblob', + 'longtext', + 'loop', + 'low_priority', + 'master_bind', + 'master_ssl_verify_server_cert', + 'match', + 'maxvalue', + 'mediumblob', + 'mediumint', + 'mediumtext', + 'middleint', + 'minute_microsecond', + 'minute_second', + 'mod', + 'modifies', + 'natural', + 'not', + 'no_write_to_binlog', + 'nth_value', + 'ntile', + 'null', + 'numeric', + 'of', + 'on', + 'optimize', + 'optimizer_costs', + 'option', + 'optionally', + 'or', + 'order', + 'out', + 'outer', + 'outfile', + 'over', + 'partition', + 'percent_rank', + 'persist', + 'persist_only', + 'precision', + 'primary', + 'procedure', + 'purge', + 'range', + 'rank', + 'read', + 'reads', + 'read_write', + 'real', + 'recursive', + 'references', + 'regexp', + 'release', + 'rename', + 'repeat', + 'replace', + 'require', + 'resignal', + 'restrict', + 'return', + 'revoke', + 'right', + 'rlike', + 'row', + 'rows', + 'row_number', + 'schema', + 'schemas', + 'second_microsecond', + 'select', + 'sensitive', + 'separator', + 'set', + 'show', + 'signal', + 'smallint', + 'spatial', + 'specific', + 'sql', + 'sqlexception', + 'sqlstate', + 'sqlwarning', + 'sql_big_result', + 'sql_calc_found_rows', + 'sql_small_result', + 'ssl', + 'starting', + 'stored', + 'straight_join', + 'system', + 'table', + 'terminated', + 'then', + 'tinyblob', + 'tinyint', + 'tinytext', + 'to', + 'trailing', + 'trigger', + 'true', + 'undo', + 'union', + 'unique', + 'unlock', + 'unsigned', + 'update', + 'usage', + 'use', + 'using', + 'utc_date', + 'utc_time', + 'utc_timestamp', + 'values', + 'varbinary', + 'varchar', + 'varcharacter', + 'varying', + 'virtual', + 'when', + 'where', + 'while', + 'window', + 'with', + 'write', + 'xor', + 'year_month', + 'zerofill', + ); + public function __construct(array $connection_options = array()) { // This driver defaults to transaction support, except if explicitly passed FALSE. $this->transactionSupport = !isset($connection_options['transactions']) || ($connection_options['transactions'] !== FALSE); @@ -86,15 +362,95 @@ class DatabaseConnection_mysql extends DatabaseConnection { $connection_options += array( 'init_commands' => array(), ); + + $sql_mode = 'REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO'; + // NO_AUTO_CREATE_USER was removed in MySQL 8.0.11 + // https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-11.html#mysqld-8-0-11-deprecation-removal + if (version_compare($this->getAttribute(PDO::ATTR_SERVER_VERSION), '8.0.11', '<')) { + $sql_mode .= ',NO_AUTO_CREATE_USER'; + } $connection_options['init_commands'] += array( - 'sql_mode' => "SET sql_mode = 'REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER'", + 'sql_mode' => "SET sql_mode = '$sql_mode'", ); + // Execute initial commands. foreach ($connection_options['init_commands'] as $sql) { $this->exec($sql); } } + /** + * {@inheritdoc}} + */ + protected function setPrefix($prefix) { + parent::setPrefix($prefix); + // Successive versions of MySQL have become increasingly strict about the + // use of reserved keywords as table names. Drupal 7 uses at least one such + // table (system). Therefore we surround all table names with quotes. + $quote_char = variable_get('mysql_identifier_quote_character', MYSQL_IDENTIFIER_QUOTE_CHARACTER_DEFAULT); + foreach ($this->prefixSearch as $i => $prefixSearch) { + if (substr($prefixSearch, 0, 1) === '{') { + // If the prefix already contains one or more quotes remove them. + // This can happen when - for example - DrupalUnitTestCase sets up a + // "temporary prefixed database". Also if there's a dot in the prefix, + // wrap it in quotes to cater for schema names in prefixes. + $search = array($quote_char, '.'); + $replace = array('', $quote_char . '.' . $quote_char); + $this->prefixReplace[$i] = $quote_char . str_replace($search, $replace, $this->prefixReplace[$i]); + } + if (substr($prefixSearch, -1) === '}') { + $this->prefixReplace[$i] .= $quote_char; + } + } + } + + /** + * {@inheritdoc} + */ + public function escapeField($field) { + $field = parent::escapeField($field); + return $this->quoteIdentifier($field); + } + + public function escapeFields(array $fields) { + foreach ($fields as &$field) { + $field = $this->escapeField($field); + } + return $fields; + } + + /** + * {@inheritdoc} + */ + public function escapeAlias($field) { + $field = parent::escapeAlias($field); + return $this->quoteIdentifier($field); + } + + /** + * Quotes an identifier if it matches a MySQL reserved keyword. + * + * @param string $identifier + * The field to check. + * + * @return string + * The identifier, quoted if it matches a MySQL reserved keyword. + */ + private function quoteIdentifier($identifier) { + // Quote identifiers so that MySQL reserved words like 'function' can be + // used as column names. Sometimes the 'table.column_name' format is passed + // in. For example, menu_load_links() adds a condition on "ml.menu_name". + if (strpos($identifier, '.') !== FALSE) { + list($table, $identifier) = explode('.', $identifier, 2); + } + if (in_array(strtolower($identifier), $this->reservedKeyWords, TRUE)) { + // Quote the string for MySQL reserved keywords. + $quote_char = variable_get('mysql_identifier_quote_character', MYSQL_IDENTIFIER_QUOTE_CHARACTER_DEFAULT); + $identifier = $quote_char . $identifier . $quote_char; + } + return isset($table) ? $table . '.' . $identifier : $identifier; + } + public function __destruct() { if ($this->needsCleanup) { $this->nextIdDelete(); diff --git a/frontend/drupal/includes/database/mysql/query.inc b/frontend/drupal/includes/database/mysql/query.inc index d3d2d9eec..3f0bcb796 100644 --- a/frontend/drupal/includes/database/mysql/query.inc +++ b/frontend/drupal/includes/database/mysql/query.inc @@ -48,6 +48,10 @@ class InsertQuery_mysql extends InsertQuery { // Default fields are always placed first for consistency. $insert_fields = array_merge($this->defaultFields, $this->insertFields); + if (method_exists($this->connection, 'escapeFields')) { + $insert_fields = $this->connection->escapeFields($insert_fields); + } + // If we're selecting from a SelectQuery, finish building the query and // pass it back, as any remaining options are irrelevant. if (!empty($this->fromQuery)) { @@ -89,6 +93,20 @@ class InsertQuery_mysql extends InsertQuery { class TruncateQuery_mysql extends TruncateQuery { } +class UpdateQuery_mysql extends UpdateQuery { + public function __toString() { + if (method_exists($this->connection, 'escapeField')) { + $escapedFields = array(); + foreach ($this->fields as $field => $data) { + $field = $this->connection->escapeField($field); + $escapedFields[$field] = $data; + } + $this->fields = $escapedFields; + } + return parent::__toString(); + } +} + /** * @} End of "addtogroup database". */ diff --git a/frontend/drupal/includes/database/mysql/schema.inc b/frontend/drupal/includes/database/mysql/schema.inc index 9ba1c7339..7d6e33395 100644 --- a/frontend/drupal/includes/database/mysql/schema.inc +++ b/frontend/drupal/includes/database/mysql/schema.inc @@ -57,6 +57,11 @@ class DatabaseSchema_mysql extends DatabaseSchema { protected function buildTableNameCondition($table_name, $operator = '=', $add_prefix = TRUE) { $info = $this->connection->getConnectionOptions(); + // Ensure the table name is not surrounded with quotes as that is not + // appropriate for schema queries. + $quote_char = variable_get('mysql_identifier_quote_character', MYSQL_IDENTIFIER_QUOTE_CHARACTER_DEFAULT); + $table_name = str_replace($quote_char, '', $table_name); + $table_info = $this->getPrefixInfo($table_name, $add_prefix); $condition = new DatabaseCondition('AND'); @@ -494,11 +499,11 @@ class DatabaseSchema_mysql extends DatabaseSchema { $condition->condition('column_name', $column); $condition->compile($this->connection, $this); // Don't use {} around information_schema.columns table. - return $this->connection->query("SELECT column_comment FROM information_schema.columns WHERE " . (string) $condition, $condition->arguments())->fetchField(); + return $this->connection->query("SELECT column_comment AS column_comment FROM information_schema.columns WHERE " . (string) $condition, $condition->arguments())->fetchField(); } $condition->compile($this->connection, $this); // Don't use {} around information_schema.tables table. - $comment = $this->connection->query("SELECT table_comment FROM information_schema.tables WHERE " . (string) $condition, $condition->arguments())->fetchField(); + $comment = $this->connection->query("SELECT table_comment AS table_comment FROM information_schema.tables WHERE " . (string) $condition, $condition->arguments())->fetchField(); // Work-around for MySQL 5.0 bug http://bugs.mysql.com/bug.php?id=11379 return preg_replace('/; InnoDB free:.*$/', '', $comment); } diff --git a/frontend/drupal/includes/database/schema.inc b/frontend/drupal/includes/database/schema.inc index 31862db39..faa521623 100644 --- a/frontend/drupal/includes/database/schema.inc +++ b/frontend/drupal/includes/database/schema.inc @@ -169,6 +169,11 @@ require_once dirname(__FILE__) . '/query.inc'; */ abstract class DatabaseSchema implements QueryPlaceholderInterface { + /** + * The database connection. + * + * @var DatabaseConnection + */ protected $connection; /** @@ -343,7 +348,70 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { // couldn't use db_select() here because it would prefix // information_schema.tables and the query would fail. // Don't use {} around information_schema.tables table. - return $this->connection->query("SELECT table_name FROM information_schema.tables WHERE " . (string) $condition, $condition->arguments())->fetchAllKeyed(0, 0); + return $this->connection->query("SELECT table_name AS table_name FROM information_schema.tables WHERE " . (string) $condition, $condition->arguments())->fetchAllKeyed(0, 0); + } + + /** + * Finds all tables that are like the specified base table name. This is a + * backport of the change made to findTables in Drupal 8 to work with virtual, + * un-prefixed table names. The original function is retained for Backwards + * Compatibility. + * @see https://www.drupal.org/node/2552435 + * + * @param string $table_expression + * An SQL expression, for example "cache_%" (without the quotes). + * + * @return array + * Both the keys and the values are the matching tables. + */ + public function findTablesD8($table_expression) { + // Load all the tables up front in order to take into account per-table + // prefixes. The actual matching is done at the bottom of the method. + $condition = $this->buildTableNameCondition('%', 'LIKE'); + $condition->compile($this->connection, $this); + + $individually_prefixed_tables = $this->connection->getUnprefixedTablesMap(); + $default_prefix = $this->connection->tablePrefix(); + $default_prefix_length = strlen($default_prefix); + $tables = array(); + // Normally, we would heartily discourage the use of string + // concatenation for conditionals like this however, we + // couldn't use db_select() here because it would prefix + // information_schema.tables and the query would fail. + // Don't use {} around information_schema.tables table. + $results = $this->connection->query("SELECT table_name AS table_name FROM information_schema.tables WHERE " . (string) $condition, $condition->arguments()); + foreach ($results as $table) { + // Take into account tables that have an individual prefix. + if (isset($individually_prefixed_tables[$table->table_name])) { + $prefix_length = strlen($this->connection->tablePrefix($individually_prefixed_tables[$table->table_name])); + } + elseif ($default_prefix && substr($table->table_name, 0, $default_prefix_length) !== $default_prefix) { + // This table name does not start the default prefix, which means that + // it is not managed by Drupal so it should be excluded from the result. + continue; + } + else { + $prefix_length = $default_prefix_length; + } + + // Remove the prefix from the returned tables. + $unprefixed_table_name = substr($table->table_name, $prefix_length); + + // The pattern can match a table which is the same as the prefix. That + // will become an empty string when we remove the prefix, which will + // probably surprise the caller, besides not being a prefixed table. So + // remove it. + if (!empty($unprefixed_table_name)) { + $tables[$unprefixed_table_name] = $unprefixed_table_name; + } + } + + // Convert the table expression from its SQL LIKE syntax to a regular + // expression and escape the delimiter that will be used for matching. + $table_expression = str_replace(array('%', '_'), array('.*?', '.'), preg_quote($table_expression, '/')); + $tables = preg_grep('/^' . $table_expression . '$/i', $tables); + + return $tables; } /** diff --git a/frontend/drupal/includes/database/select.inc b/frontend/drupal/includes/database/select.inc index 8d84460e8..84098bdf7 100644 --- a/frontend/drupal/includes/database/select.inc +++ b/frontend/drupal/includes/database/select.inc @@ -1520,13 +1520,16 @@ class SelectQuery extends Query implements SelectQueryInterface { $fields = array(); foreach ($this->tables as $alias => $table) { if (!empty($table['all_fields'])) { - $fields[] = $this->connection->escapeTable($alias) . '.*'; + $fields[] = $this->connection->escapeAlias($alias) . '.*'; } } foreach ($this->fields as $alias => $field) { + // Note that $field['table'] holds the table alias. + // @see \SelectQuery::addField + $table = isset($field['table']) ? $this->connection->escapeAlias($field['table']) . '.' : ''; // Always use the AS keyword for field aliases, as some // databases require it (e.g., PostgreSQL). - $fields[] = (isset($field['table']) ? $this->connection->escapeTable($field['table']) . '.' : '') . $this->connection->escapeField($field['field']) . ' AS ' . $this->connection->escapeAlias($field['alias']); + $fields[] = $table . $this->connection->escapeField($field['field']) . ' AS ' . $this->connection->escapeAlias($field['alias']); } foreach ($this->expressions as $alias => $expression) { $fields[] = $expression['expression'] . ' AS ' . $this->connection->escapeAlias($expression['alias']); @@ -1555,7 +1558,7 @@ class SelectQuery extends Query implements SelectQueryInterface { // Don't use the AS keyword for table aliases, as some // databases don't support it (e.g., Oracle). - $query .= $table_string . ' ' . $this->connection->escapeTable($table['alias']); + $query .= $table_string . ' ' . $this->connection->escapeAlias($table['alias']); if (!empty($table['condition'])) { $query .= ' ON ' . $table['condition']; diff --git a/frontend/drupal/includes/database/sqlite/database.inc b/frontend/drupal/includes/database/sqlite/database.inc index 589a17287..c50f08ec5 100644 --- a/frontend/drupal/includes/database/sqlite/database.inc +++ b/frontend/drupal/includes/database/sqlite/database.inc @@ -107,6 +107,18 @@ class DatabaseConnection_sqlite extends DatabaseConnection { $this->sqliteCreateFunction('substring_index', array($this, 'sqlFunctionSubstringIndex'), 3); $this->sqliteCreateFunction('rand', array($this, 'sqlFunctionRand')); + // Enable the Write-Ahead Logging (WAL) option for SQLite if supported. + // @see https://www.drupal.org/node/2348137 + // @see https://sqlite.org/wal.html + if (version_compare($version, '3.7') >= 0) { + $connection_options += array( + 'init_commands' => array(), + ); + $connection_options['init_commands'] += array( + 'wal' => "PRAGMA journal_mode=WAL", + ); + } + // Execute sqlite init_commands. if (isset($connection_options['init_commands'])) { $this->exec(implode('; ', $connection_options['init_commands'])); @@ -128,10 +140,10 @@ class DatabaseConnection_sqlite extends DatabaseConnection { $count = $this->query('SELECT COUNT(*) FROM ' . $prefix . '.sqlite_master WHERE type = :type AND name NOT LIKE :pattern', array(':type' => 'table', ':pattern' => 'sqlite_%'))->fetchField(); // We can prune the database file if it doesn't have any tables. - if ($count == 0) { - // Detach the database. - $this->query('DETACH DATABASE :schema', array(':schema' => $prefix)); - // Destroy the database file. + if ($count == 0 && $this->connectionOptions['database'] != ':memory:') { + // Detaching the database fails at this point, but no other queries + // are executed after the connection is destructed so we can simply + // remove the database file. unlink($this->connectionOptions['database'] . '-' . $prefix); } } @@ -143,6 +155,18 @@ class DatabaseConnection_sqlite extends DatabaseConnection { } } + /** + * Gets all the attached databases. + * + * @return array + * An array of attached database names. + * + * @see DatabaseConnection_sqlite::__construct(). + */ + public function getAttachedDatabases() { + return $this->attachedDatabases; + } + /** * SQLite compatibility implementation for the IF() SQL function. */ diff --git a/frontend/drupal/includes/database/sqlite/query.inc b/frontend/drupal/includes/database/sqlite/query.inc index c9c028bb0..45c6a3024 100644 --- a/frontend/drupal/includes/database/sqlite/query.inc +++ b/frontend/drupal/includes/database/sqlite/query.inc @@ -23,7 +23,7 @@ class InsertQuery_sqlite extends InsertQuery { if (!$this->preExecute()) { return NULL; } - if (count($this->insertFields)) { + if (count($this->insertFields) || !empty($this->fromQuery)) { return parent::execute(); } else { @@ -36,7 +36,10 @@ class InsertQuery_sqlite extends InsertQuery { $comments = $this->connection->makeComment($this->comments); // Produce as many generic placeholders as necessary. - $placeholders = array_fill(0, count($this->insertFields), '?'); + $placeholders = array(); + if (!empty($this->insertFields)) { + $placeholders = array_fill(0, count($this->insertFields), '?'); + } // If we're selecting from a SelectQuery, finish building the query and // pass it back, as any remaining options are irrelevant. diff --git a/frontend/drupal/includes/database/sqlite/schema.inc b/frontend/drupal/includes/database/sqlite/schema.inc index 281d8fc6b..43ea6d61c 100644 --- a/frontend/drupal/includes/database/sqlite/schema.inc +++ b/frontend/drupal/includes/database/sqlite/schema.inc @@ -668,6 +668,9 @@ class DatabaseSchema_sqlite extends DatabaseSchema { $this->alterTable($table, $old_schema, $new_schema); } + /** + * {@inheritdoc} + */ public function findTables($table_expression) { // Don't add the prefix, $table_expression already includes the prefix. $info = $this->getPrefixInfo($table_expression, FALSE); @@ -680,4 +683,32 @@ class DatabaseSchema_sqlite extends DatabaseSchema { )); return $result->fetchAllKeyed(0, 0); } + + /** + * {@inheritdoc} + */ + public function findTablesD8($table_expression) { + $tables = array(); + + // The SQLite implementation doesn't need to use the same filtering strategy + // as the parent one because individually prefixed tables live in their own + // schema (database), which means that neither the main database nor any + // attached one will contain a prefixed table name, so we just need to loop + // over all known schemas and filter by the user-supplied table expression. + $attached_dbs = $this->connection->getAttachedDatabases(); + foreach ($attached_dbs as $schema) { + // Can't use query placeholders for the schema because the query would + // have to be :prefixsqlite_master, which does not work. We also need to + // ignore the internal SQLite tables. + $result = db_query("SELECT name FROM " . $schema . ".sqlite_master WHERE type = :type AND name LIKE :table_name AND name NOT LIKE :pattern", array( + ':type' => 'table', + ':table_name' => $table_expression, + ':pattern' => 'sqlite_%', + )); + $tables += $result->fetchAllKeyed(0, 0); + } + + return $tables; + } + } diff --git a/frontend/drupal/includes/file.inc b/frontend/drupal/includes/file.inc index 69ee4cdc2..013c435cf 100644 --- a/frontend/drupal/includes/file.inc +++ b/frontend/drupal/includes/file.inc @@ -1147,8 +1147,8 @@ function file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXIST * exploit.php_.pps. * * Specifically, this function adds an underscore to all extensions that are - * between 2 and 5 characters in length, internal to the file name, and not - * included in $extensions. + * between 2 and 5 characters in length, internal to the file name, and either + * included in the list of unsafe extensions, or not included in $extensions. * * Function behavior is also controlled by the Drupal variable * 'allow_insecure_uploads'. If 'allow_insecure_uploads' evaluates to TRUE, no @@ -1157,7 +1157,8 @@ function file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXIST * @param $filename * File name to modify. * @param $extensions - * A space-separated list of extensions that should not be altered. + * A space-separated list of extensions that should not be altered. Note that + * extensions that are unsafe will be altered regardless of this parameter. * @param $alerts * If TRUE, drupal_set_message() will be called to display a message if the * file name was changed. @@ -1175,6 +1176,10 @@ function file_munge_filename($filename, $extensions, $alerts = TRUE) { $whitelist = array_unique(explode(' ', strtolower(trim($extensions)))); + // Remove unsafe extensions from the list of allowed extensions. The list is + // copied from file_save_upload(). + $whitelist = array_diff($whitelist, explode('|', 'php|phar|pl|py|cgi|asp|js')); + // Split the filename up by periods. The first part becomes the basename // the last part the final extension. $filename_parts = explode('.', $filename); @@ -1542,25 +1547,35 @@ function file_save_upload($form_field_name, $validators = array(), $destination $validators['file_validate_extensions'][0] = $extensions; } - if (!empty($extensions)) { - // Munge the filename to protect against possible malicious extension hiding - // within an unknown file type (ie: filename.html.foo). - $file->filename = file_munge_filename($file->filename, $extensions); - } - - // Rename potentially executable files, to help prevent exploits (i.e. will - // rename filename.php.foo and filename.php to filename.php.foo.txt and - // filename.php.txt, respectively). Don't rename if 'allow_insecure_uploads' - // evaluates to TRUE. - if (!variable_get('allow_insecure_uploads', 0) && preg_match('/\.(php|phar|pl|py|cgi|asp|js)(\.|$)/i', $file->filename) && (substr($file->filename, -4) != '.txt')) { - $file->filemime = 'text/plain'; - // The destination filename will also later be used to create the URI. - $file->filename .= '.txt'; - // The .txt extension may not be in the allowed list of extensions. We have - // to add it here or else the file upload will fail. + if (!variable_get('allow_insecure_uploads', 0)) { if (!empty($extensions)) { - $validators['file_validate_extensions'][0] .= ' txt'; - drupal_set_message(t('For security reasons, your upload has been renamed to %filename.', array('%filename' => $file->filename))); + // Munge the filename to protect against possible malicious extension hiding + // within an unknown file type (ie: filename.html.foo). + $file->filename = file_munge_filename($file->filename, $extensions); + } + + // Rename potentially executable files, to help prevent exploits (i.e. will + // rename filename.php.foo and filename.php to filename.php_.foo_.txt and + // filename.php_.txt, respectively). Don't rename if 'allow_insecure_uploads' + // evaluates to TRUE. + if (preg_match('/\.(php|phar|pl|py|cgi|asp|js)(\.|$)/i', $file->filename)) { + // If the file will be rejected anyway due to a disallowed extension, it + // should not be renamed; rather, we'll let file_validate_extensions() + // reject it below. + if (!isset($validators['file_validate_extensions']) || !file_validate_extensions($file, $extensions)) { + $file->filemime = 'text/plain'; + if (substr($file->filename, -4) != '.txt') { + // The destination filename will also later be used to create the URI. + $file->filename .= '.txt'; + } + $file->filename = file_munge_filename($file->filename, $extensions, FALSE); + drupal_set_message(t('For security reasons, your upload has been renamed to %filename.', array('%filename' => $file->filename))); + // The .txt extension may not be in the allowed list of extensions. We have + // to add it here or else the file upload will fail. + if (!empty($validators['file_validate_extensions'][0])) { + $validators['file_validate_extensions'][0] .= ' txt'; + } + } } } @@ -1728,7 +1743,18 @@ function file_validate(stdClass &$file, $validators = array()) { } // Let other modules perform validation on the new file. - return array_merge($errors, module_invoke_all('file_validate', $file)); + $errors = array_merge($errors, module_invoke_all('file_validate', $file)); + + // Ensure the file does not contain a malicious extension. At this point + // file_save_upload() will have munged the file so it does not contain a + // malicious extension. Contributed and custom code that calls this method + // needs to take similar steps if they need to permit files with malicious + // extensions to be uploaded. + if (empty($errors) && !variable_get('allow_insecure_uploads', 0) && preg_match('/\.(php|phar|pl|py|cgi|asp|js)(\.|$)/i', $file->filename)) { + $errors[] = t('For security reasons, your upload has been rejected.'); + } + + return $errors; } /** diff --git a/frontend/drupal/includes/form.inc b/frontend/drupal/includes/form.inc index 1158fd031..f2557e832 100644 --- a/frontend/drupal/includes/form.inc +++ b/frontend/drupal/includes/form.inc @@ -1361,7 +1361,10 @@ function _form_validate(&$elements, &$form_state, $form_id = NULL) { // The following errors are always shown. if (isset($elements['#needs_validation'])) { // Verify that the value is not longer than #maxlength. - if (isset($elements['#maxlength']) && drupal_strlen($elements['#value']) > $elements['#maxlength']) { + if (isset($elements['#maxlength']) && (isset($elements['#value']) && !is_scalar($elements['#value']))) { + form_error($elements, $t('An illegal value has been detected. Please contact the site administrator.')); + } + elseif (isset($elements['#maxlength']) && drupal_strlen($elements['#value']) > $elements['#maxlength']) { form_error($elements, $t('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'], '%max' => $elements['#maxlength'], '%length' => drupal_strlen($elements['#value'])))); } @@ -4124,9 +4127,17 @@ function form_process_weight($element) { $max_elements = variable_get('drupal_weight_select_max', DRUPAL_WEIGHT_SELECT_MAX); if ($element['#delta'] <= $max_elements) { $element['#type'] = 'select'; + $weights = array(); for ($n = (-1 * $element['#delta']); $n <= $element['#delta']; $n++) { $weights[$n] = $n; } + if (isset($element['#default_value'])) { + $default_value = (int) $element['#default_value']; + if (!isset($weights[$default_value])) { + $weights[$default_value] = $default_value; + ksort($weights); + } + } $element['#options'] = $weights; $element += element_info('select'); } diff --git a/frontend/drupal/includes/mail.inc b/frontend/drupal/includes/mail.inc index 0e5c17804..a97c788f0 100644 --- a/frontend/drupal/includes/mail.inc +++ b/frontend/drupal/includes/mail.inc @@ -12,6 +12,12 @@ */ define('MAIL_LINE_ENDINGS', isset($_SERVER['WINDIR']) || (isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Win32') !== FALSE) ? "\r\n" : "\n"); + +/** + * Special characters, defined in RFC_2822. + */ +define('MAIL_RFC_2822_SPECIALS', '()<>[]:;@\,."'); + /** * Composes and optionally sends an e-mail message. * @@ -148,8 +154,13 @@ function drupal_mail($module, $key, $to, $language, $params = array(), $from = N // Return-Path headers should have a domain authorized to use the originating // SMTP server. $headers['From'] = $headers['Sender'] = $headers['Return-Path'] = $default_from; + + if (variable_get('mail_display_name_site_name', FALSE)) { + $display_name = variable_get('site_name', 'Drupal'); + $headers['From'] = drupal_mail_format_display_name($display_name) . ' <' . $default_from . '>'; + } } - if ($from) { + if ($from && $from != $default_from) { $headers['From'] = $from; } $message['headers'] = $headers; @@ -557,10 +568,59 @@ function drupal_html_to_text($string, $allowed_tags = NULL) { return $output . $footnotes; } +/** + * Return a RFC-2822 compliant "display-name" component. + * + * The "display-name" component is used in mail header "Originator" fields + * (From, Sender, Reply-to) to give a human-friendly description of the + * address, i.e. From: My Display Name . RFC-822 and + * RFC-2822 define its syntax and rules. This method gets as input a string + * to be used as "display-name" and formats it to be RFC compliant. + * + * @param string $string + * A string to be used as "display-name". + * + * @return string + * A RFC compliant version of the string, ready to be used as + * "display-name" in mail originator header fields. + */ +function drupal_mail_format_display_name($string) { + // Make sure we don't process html-encoded characters. They may create + // unneeded trouble if left encoded, besides they will be correctly + // processed if decoded. + $string = decode_entities($string); + + // If string contains non-ASCII characters it must be (short) encoded + // according to RFC-2047. The output of a "B" (Base64) encoded-word is + // always safe to be used as display-name. + $safe_display_name = mime_header_encode($string, TRUE); + + // Encoded-words are always safe to be used as display-name because don't + // contain any RFC 2822 "specials" characters. However + // mimeHeaderEncode() encodes a string only if it contains any + // non-ASCII characters, and leaves its value untouched (un-encoded) if + // ASCII only. For this reason in order to produce a valid display-name we + // still need to make sure there are no "specials" characters left. + if (preg_match('/[' . preg_quote(MAIL_RFC_2822_SPECIALS) . ']/', $safe_display_name)) { + + // If string is already quoted, it may or may not be escaped properly, so + // don't trust it and reset. + if (preg_match('/^"(.+)"$/', $safe_display_name, $matches)) { + $safe_display_name = str_replace(array('\\\\', '\\"'), array('\\', '"'), $matches[1]); + } + + // Transform the string in a RFC-2822 "quoted-string" by wrapping it in + // double-quotes. Also make sure '"' and '\' occurrences are escaped. + $safe_display_name = '"' . str_replace(array('\\', '"'), array('\\\\', '\\"'), $safe_display_name) . '"'; + } + + return $safe_display_name; +} + /** * Wraps words on a single line. * - * Callback for array_walk() winthin drupal_wrap_mail(). + * Callback for array_walk() within drupal_wrap_mail(). */ function _drupal_wrap_mail_line(&$line, $key, $values) { // Use soft-breaks only for purely quoted or unindented text. diff --git a/frontend/drupal/includes/menu.inc b/frontend/drupal/includes/menu.inc index 2b489d886..22e6dba97 100644 --- a/frontend/drupal/includes/menu.inc +++ b/frontend/drupal/includes/menu.inc @@ -1067,7 +1067,7 @@ function menu_tree_output($tree) { // the active class accordingly. But local tasks do not appear in menu // trees, so if the current path is a local task, and this link is its // tab root, then we have to set the class manually. - if ($data['link']['href'] == $router_item['tab_root_href'] && $data['link']['href'] != $_GET['q']) { + if ($router_item && $data['link']['href'] == $router_item['tab_root_href'] && $data['link']['href'] != $_GET['q']) { $data['link']['localized_options']['attributes']['class'][] = 'active'; } diff --git a/frontend/drupal/misc/jquery.js b/frontend/drupal/misc/jquery.js index e900c19a3..8f3ca2e2d 100644 --- a/frontend/drupal/misc/jquery.js +++ b/frontend/drupal/misc/jquery.js @@ -1,4 +1,3 @@ - /*! * jQuery JavaScript Library v1.4.4 * http://jquery.com/ diff --git a/frontend/drupal/modules/aggregator/aggregator.info b/frontend/drupal/modules/aggregator/aggregator.info index ec036940f..27a51856f 100644 --- a/frontend/drupal/modules/aggregator/aggregator.info +++ b/frontend/drupal/modules/aggregator/aggregator.info @@ -7,7 +7,7 @@ files[] = aggregator.test configure = admin/config/services/aggregator/settings stylesheets[all][] = aggregator.css -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/aggregator/tests/aggregator_test.info b/frontend/drupal/modules/aggregator/tests/aggregator_test.info index b5f6259c0..2da3409fe 100644 --- a/frontend/drupal/modules/aggregator/tests/aggregator_test.info +++ b/frontend/drupal/modules/aggregator/tests/aggregator_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/block/block.info b/frontend/drupal/modules/block/block.info index 037d40467..60b80957c 100644 --- a/frontend/drupal/modules/block/block.info +++ b/frontend/drupal/modules/block/block.info @@ -6,7 +6,7 @@ core = 7.x files[] = block.test configure = admin/structure/block -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/block/tests/block_test.info b/frontend/drupal/modules/block/tests/block_test.info index da7ab998f..820a7d52a 100644 --- a/frontend/drupal/modules/block/tests/block_test.info +++ b/frontend/drupal/modules/block/tests/block_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/block/tests/themes/block_test_theme/block_test_theme.info b/frontend/drupal/modules/block/tests/themes/block_test_theme/block_test_theme.info index f415eeef4..5a18c5220 100644 --- a/frontend/drupal/modules/block/tests/themes/block_test_theme/block_test_theme.info +++ b/frontend/drupal/modules/block/tests/themes/block_test_theme/block_test_theme.info @@ -13,7 +13,7 @@ regions[footer] = Footer regions[highlighted] = Highlighted regions[help] = Help -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/blog/blog.info b/frontend/drupal/modules/blog/blog.info index 0d0230268..2f0c69ffe 100644 --- a/frontend/drupal/modules/blog/blog.info +++ b/frontend/drupal/modules/blog/blog.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = blog.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/book/book.info b/frontend/drupal/modules/book/book.info index 3ab126686..706b07984 100644 --- a/frontend/drupal/modules/book/book.info +++ b/frontend/drupal/modules/book/book.info @@ -7,7 +7,7 @@ files[] = book.test configure = admin/content/book/settings stylesheets[all][] = book.css -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/color/color.info b/frontend/drupal/modules/color/color.info index a7710b428..ca4610c21 100644 --- a/frontend/drupal/modules/color/color.info +++ b/frontend/drupal/modules/color/color.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = color.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/comment/comment.info b/frontend/drupal/modules/comment/comment.info index 80a18eeb4..201f84d31 100644 --- a/frontend/drupal/modules/comment/comment.info +++ b/frontend/drupal/modules/comment/comment.info @@ -9,7 +9,7 @@ files[] = comment.test configure = admin/content/comment stylesheets[all][] = comment.css -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/contact/contact.info b/frontend/drupal/modules/contact/contact.info index dd5aa77d9..b35f09ba4 100644 --- a/frontend/drupal/modules/contact/contact.info +++ b/frontend/drupal/modules/contact/contact.info @@ -6,7 +6,7 @@ core = 7.x files[] = contact.test configure = admin/structure/contact -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/contextual/contextual.info b/frontend/drupal/modules/contextual/contextual.info index c45fa0fa2..87bbf5545 100644 --- a/frontend/drupal/modules/contextual/contextual.info +++ b/frontend/drupal/modules/contextual/contextual.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = contextual.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/dashboard/dashboard.info b/frontend/drupal/modules/dashboard/dashboard.info index 10f0d0acf..0f4134aa7 100644 --- a/frontend/drupal/modules/dashboard/dashboard.info +++ b/frontend/drupal/modules/dashboard/dashboard.info @@ -7,7 +7,7 @@ files[] = dashboard.test dependencies[] = block configure = admin/dashboard/customize -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/dblog/dblog.info b/frontend/drupal/modules/dblog/dblog.info index 4f19265c9..f20ced61a 100644 --- a/frontend/drupal/modules/dblog/dblog.info +++ b/frontend/drupal/modules/dblog/dblog.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = dblog.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/field/field.info b/frontend/drupal/modules/field/field.info index 9baa4cf72..a684ceeed 100644 --- a/frontend/drupal/modules/field/field.info +++ b/frontend/drupal/modules/field/field.info @@ -11,7 +11,7 @@ dependencies[] = field_sql_storage required = TRUE stylesheets[all][] = theme/field.css -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/field/modules/field_sql_storage/field_sql_storage.info b/frontend/drupal/modules/field/modules/field_sql_storage/field_sql_storage.info index 9b2bac339..2168c02f7 100644 --- a/frontend/drupal/modules/field/modules/field_sql_storage/field_sql_storage.info +++ b/frontend/drupal/modules/field/modules/field_sql_storage/field_sql_storage.info @@ -7,7 +7,7 @@ dependencies[] = field files[] = field_sql_storage.test required = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/field/modules/field_sql_storage/field_sql_storage.test b/frontend/drupal/modules/field/modules/field_sql_storage/field_sql_storage.test index 7c88ac776..b2eb50652 100644 --- a/frontend/drupal/modules/field/modules/field_sql_storage/field_sql_storage.test +++ b/frontend/drupal/modules/field/modules/field_sql_storage/field_sql_storage.test @@ -313,9 +313,13 @@ class FieldSqlStorageTestCase extends DrupalWebTestCase { $field = array('field_name' => 'test_text', 'type' => 'text', 'settings' => array('max_length' => 255)); $field = field_create_field($field); - // Attempt to update the field in a way that would break the storage. + // Attempt to update the field in a way that would break the storage. The + // parenthesis suffix is needed because SQLite has *very* relaxed rules for + // data types, so we actually need to provide an invalid SQL syntax in order + // to break it. + // @see https://www.sqlite.org/datatype3.html $prior_field = $field; - $field['settings']['max_length'] = -1; + $field['settings']['max_length'] = '-1)'; try { field_update_field($field); $this->fail(t('Update succeeded.')); diff --git a/frontend/drupal/modules/field/modules/list/list.info b/frontend/drupal/modules/field/modules/list/list.info index 933cff7b9..19c44f2dc 100644 --- a/frontend/drupal/modules/field/modules/list/list.info +++ b/frontend/drupal/modules/field/modules/list/list.info @@ -7,7 +7,7 @@ dependencies[] = field dependencies[] = options files[] = tests/list.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/field/modules/list/tests/list_test.info b/frontend/drupal/modules/field/modules/list/tests/list_test.info index 539625b43..9f76b3a02 100644 --- a/frontend/drupal/modules/field/modules/list/tests/list_test.info +++ b/frontend/drupal/modules/field/modules/list/tests/list_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/field/modules/number/number.info b/frontend/drupal/modules/field/modules/number/number.info index 32f24e111..8780f8f23 100644 --- a/frontend/drupal/modules/field/modules/number/number.info +++ b/frontend/drupal/modules/field/modules/number/number.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = field files[] = number.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/field/modules/options/options.info b/frontend/drupal/modules/field/modules/options/options.info index 39ef6c928..aad274ee0 100644 --- a/frontend/drupal/modules/field/modules/options/options.info +++ b/frontend/drupal/modules/field/modules/options/options.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = field files[] = options.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/field/modules/text/text.info b/frontend/drupal/modules/field/modules/text/text.info index 72f6db907..009f21778 100644 --- a/frontend/drupal/modules/field/modules/text/text.info +++ b/frontend/drupal/modules/field/modules/text/text.info @@ -7,7 +7,7 @@ dependencies[] = field files[] = text.test required = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/field/tests/field_test.info b/frontend/drupal/modules/field/tests/field_test.info index 54d961c54..72db32712 100644 --- a/frontend/drupal/modules/field/tests/field_test.info +++ b/frontend/drupal/modules/field/tests/field_test.info @@ -6,7 +6,7 @@ files[] = field_test.entity.inc version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/field_ui/field_ui.info b/frontend/drupal/modules/field_ui/field_ui.info index 6e6e0ae0f..a8ad2713b 100644 --- a/frontend/drupal/modules/field_ui/field_ui.info +++ b/frontend/drupal/modules/field_ui/field_ui.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = field files[] = field_ui.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/file/file.info b/frontend/drupal/modules/file/file.info index 00443c27a..72eee76f6 100644 --- a/frontend/drupal/modules/file/file.info +++ b/frontend/drupal/modules/file/file.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = field files[] = tests/file.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/file/file.module b/frontend/drupal/modules/file/file.module index eea58470f..1f1d59447 100644 --- a/frontend/drupal/modules/file/file.module +++ b/frontend/drupal/modules/file/file.module @@ -281,10 +281,11 @@ function file_ajax_upload() { } // Otherwise just add the new content class on a placeholder. else { - $form['#suffix'] .= ''; + $form['#suffix'] = (isset($form['#suffix']) ? $form['#suffix'] : '') . ''; } - $form['#prefix'] .= theme('status_messages'); + $form['#prefix'] = (isset($form['#prefix']) ? $form['#prefix'] : '') . theme('status_messages'); + $output = drupal_render($form); $js = drupal_add_js(); $settings = drupal_array_merge_deep_array($js['settings']['data']); diff --git a/frontend/drupal/modules/file/tests/file_module_test.info b/frontend/drupal/modules/file/tests/file_module_test.info index 91cabbf0a..8d922bd30 100644 --- a/frontend/drupal/modules/file/tests/file_module_test.info +++ b/frontend/drupal/modules/file/tests/file_module_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/filter/filter.info b/frontend/drupal/modules/filter/filter.info index e3d5033d8..7e6cb99f0 100644 --- a/frontend/drupal/modules/filter/filter.info +++ b/frontend/drupal/modules/filter/filter.info @@ -7,7 +7,7 @@ files[] = filter.test required = TRUE configure = admin/config/content/formats -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/forum/forum.info b/frontend/drupal/modules/forum/forum.info index 5e20d7767..0c0173e31 100644 --- a/frontend/drupal/modules/forum/forum.info +++ b/frontend/drupal/modules/forum/forum.info @@ -9,7 +9,7 @@ files[] = forum.test configure = admin/structure/forum stylesheets[all][] = forum.css -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/help/help.info b/frontend/drupal/modules/help/help.info index eedaaea64..0a74b076e 100644 --- a/frontend/drupal/modules/help/help.info +++ b/frontend/drupal/modules/help/help.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = help.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/image/image.info b/frontend/drupal/modules/image/image.info index 0f2dd92f5..5f998ec5a 100644 --- a/frontend/drupal/modules/image/image.info +++ b/frontend/drupal/modules/image/image.info @@ -7,7 +7,7 @@ dependencies[] = file files[] = image.test configure = admin/config/media/image-styles -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/image/tests/image_module_test.info b/frontend/drupal/modules/image/tests/image_module_test.info index 5f13a4b3f..df4ce2673 100644 --- a/frontend/drupal/modules/image/tests/image_module_test.info +++ b/frontend/drupal/modules/image/tests/image_module_test.info @@ -6,7 +6,7 @@ core = 7.x files[] = image_module_test.module hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/locale/locale.info b/frontend/drupal/modules/locale/locale.info index e2cd1d870..f2e593c7e 100644 --- a/frontend/drupal/modules/locale/locale.info +++ b/frontend/drupal/modules/locale/locale.info @@ -6,7 +6,7 @@ core = 7.x files[] = locale.test configure = admin/config/regional/language -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/locale/locale.module b/frontend/drupal/modules/locale/locale.module index 768fead67..93a4657f0 100644 --- a/frontend/drupal/modules/locale/locale.module +++ b/frontend/drupal/modules/locale/locale.module @@ -564,6 +564,7 @@ function locale_language_types_info() { * Implements hook_language_negotiation_info(). */ function locale_language_negotiation_info() { + require_once DRUPAL_ROOT . '/includes/locale.inc'; $file = 'includes/locale.inc'; $providers = array(); diff --git a/frontend/drupal/modules/locale/tests/locale_test.info b/frontend/drupal/modules/locale/tests/locale_test.info index a0fe2c972..37989ebb2 100644 --- a/frontend/drupal/modules/locale/tests/locale_test.info +++ b/frontend/drupal/modules/locale/tests/locale_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/menu/menu.info b/frontend/drupal/modules/menu/menu.info index 71b169d53..917c786ff 100644 --- a/frontend/drupal/modules/menu/menu.info +++ b/frontend/drupal/modules/menu/menu.info @@ -6,7 +6,7 @@ core = 7.x files[] = menu.test configure = admin/structure/menu -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/node/node.info b/frontend/drupal/modules/node/node.info index d6e67a86e..e4afc0b0d 100644 --- a/frontend/drupal/modules/node/node.info +++ b/frontend/drupal/modules/node/node.info @@ -9,7 +9,7 @@ required = TRUE configure = admin/structure/types stylesheets[all][] = node.css -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/node/tests/node_access_test.info b/frontend/drupal/modules/node/tests/node_access_test.info index a7e49c376..c38c57e1d 100644 --- a/frontend/drupal/modules/node/tests/node_access_test.info +++ b/frontend/drupal/modules/node/tests/node_access_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/node/tests/node_test.info b/frontend/drupal/modules/node/tests/node_test.info index 20eeb6ffa..506e38e19 100644 --- a/frontend/drupal/modules/node/tests/node_test.info +++ b/frontend/drupal/modules/node/tests/node_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/node/tests/node_test_exception.info b/frontend/drupal/modules/node/tests/node_test_exception.info index ca9abb7a6..444c204e0 100644 --- a/frontend/drupal/modules/node/tests/node_test_exception.info +++ b/frontend/drupal/modules/node/tests/node_test_exception.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/openid/openid.info b/frontend/drupal/modules/openid/openid.info index 52ca85f10..e0421984f 100644 --- a/frontend/drupal/modules/openid/openid.info +++ b/frontend/drupal/modules/openid/openid.info @@ -5,7 +5,7 @@ package = Core core = 7.x files[] = openid.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/openid/tests/openid_test.info b/frontend/drupal/modules/openid/tests/openid_test.info index b9fddd569..9c4892014 100644 --- a/frontend/drupal/modules/openid/tests/openid_test.info +++ b/frontend/drupal/modules/openid/tests/openid_test.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = openid hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/overlay/overlay.info b/frontend/drupal/modules/overlay/overlay.info index a9bfbe392..35bac133a 100644 --- a/frontend/drupal/modules/overlay/overlay.info +++ b/frontend/drupal/modules/overlay/overlay.info @@ -4,7 +4,7 @@ package = Core version = VERSION core = 7.x -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/path/path.info b/frontend/drupal/modules/path/path.info index f383134a6..41e25fce5 100644 --- a/frontend/drupal/modules/path/path.info +++ b/frontend/drupal/modules/path/path.info @@ -6,7 +6,7 @@ core = 7.x files[] = path.test configure = admin/config/search/path -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/php/php.info b/frontend/drupal/modules/php/php.info index ba95d9dba..873375008 100644 --- a/frontend/drupal/modules/php/php.info +++ b/frontend/drupal/modules/php/php.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = php.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/poll/poll.info b/frontend/drupal/modules/poll/poll.info index c9bfe2d58..4004f2252 100644 --- a/frontend/drupal/modules/poll/poll.info +++ b/frontend/drupal/modules/poll/poll.info @@ -6,7 +6,7 @@ core = 7.x files[] = poll.test stylesheets[all][] = poll.css -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/profile/profile.info b/frontend/drupal/modules/profile/profile.info index 68dfa56f0..67135277c 100644 --- a/frontend/drupal/modules/profile/profile.info +++ b/frontend/drupal/modules/profile/profile.info @@ -11,7 +11,7 @@ configure = admin/config/people/profile ; See user_system_info_alter(). hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/rdf/rdf.info b/frontend/drupal/modules/rdf/rdf.info index 98803474f..254b30cef 100644 --- a/frontend/drupal/modules/rdf/rdf.info +++ b/frontend/drupal/modules/rdf/rdf.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x files[] = rdf.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/rdf/tests/rdf_test.info b/frontend/drupal/modules/rdf/tests/rdf_test.info index e42dd057b..9cd772362 100644 --- a/frontend/drupal/modules/rdf/tests/rdf_test.info +++ b/frontend/drupal/modules/rdf/tests/rdf_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = blog -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/search/search.info b/frontend/drupal/modules/search/search.info index 51e33ba34..f13a4c7a0 100644 --- a/frontend/drupal/modules/search/search.info +++ b/frontend/drupal/modules/search/search.info @@ -8,7 +8,7 @@ files[] = search.test configure = admin/config/search/settings stylesheets[all][] = search.css -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/search/tests/search_embedded_form.info b/frontend/drupal/modules/search/tests/search_embedded_form.info index ee220bcca..6305ae366 100644 --- a/frontend/drupal/modules/search/tests/search_embedded_form.info +++ b/frontend/drupal/modules/search/tests/search_embedded_form.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/search/tests/search_extra_type.info b/frontend/drupal/modules/search/tests/search_extra_type.info index 63bf37f59..a59e16c0e 100644 --- a/frontend/drupal/modules/search/tests/search_extra_type.info +++ b/frontend/drupal/modules/search/tests/search_extra_type.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/search/tests/search_node_tags.info b/frontend/drupal/modules/search/tests/search_node_tags.info index 582eed19b..ae7267805 100644 --- a/frontend/drupal/modules/search/tests/search_node_tags.info +++ b/frontend/drupal/modules/search/tests/search_node_tags.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/shortcut/shortcut.info b/frontend/drupal/modules/shortcut/shortcut.info index 94090ebd5..ab434e9b5 100644 --- a/frontend/drupal/modules/shortcut/shortcut.info +++ b/frontend/drupal/modules/shortcut/shortcut.info @@ -6,7 +6,7 @@ core = 7.x files[] = shortcut.test configure = admin/config/user-interface/shortcut -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/drupal_web_test_case.php b/frontend/drupal/modules/simpletest/drupal_web_test_case.php index a0872c234..c426ba53a 100644 --- a/frontend/drupal/modules/simpletest/drupal_web_test_case.php +++ b/frontend/drupal/modules/simpletest/drupal_web_test_case.php @@ -1677,15 +1677,12 @@ class DrupalWebTestCase extends DrupalTestCase { file_unmanaged_delete_recursive($this->originalFileDirectory . '/simpletest/' . substr($this->databasePrefix, 10)); // Remove all prefixed tables. - $tables = db_find_tables($this->databasePrefix . '%'); - $connection_info = Database::getConnectionInfo('default'); - $tables = db_find_tables($connection_info['default']['prefix']['default'] . '%'); + $tables = db_find_tables_d8('%'); if (empty($tables)) { $this->fail('Failed to find test tables to drop.'); } - $prefix_length = strlen($connection_info['default']['prefix']['default']); foreach ($tables as $table) { - if (db_drop_table(substr($table, $prefix_length))) { + if (db_drop_table($table)) { unset($tables[$table]); } } diff --git a/frontend/drupal/modules/simpletest/simpletest.info b/frontend/drupal/modules/simpletest/simpletest.info index a06e5d743..5ca6fbc7b 100644 --- a/frontend/drupal/modules/simpletest/simpletest.info +++ b/frontend/drupal/modules/simpletest/simpletest.info @@ -58,7 +58,7 @@ files[] = tests/upgrade/update.trigger.test files[] = tests/upgrade/update.field.test files[] = tests/upgrade/update.user.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/simpletest.module b/frontend/drupal/modules/simpletest/simpletest.module index cf8304781..6a60d5949 100644 --- a/frontend/drupal/modules/simpletest/simpletest.module +++ b/frontend/drupal/modules/simpletest/simpletest.module @@ -563,7 +563,7 @@ function simpletest_clean_environment() { * Removed prefixed tables from the database that are left over from crashed tests. */ function simpletest_clean_database() { - $tables = db_find_tables(Database::getConnection()->prefixTables('{simpletest}') . '%'); + $tables = db_find_tables_d8(Database::getConnection()->prefixTables('{simpletest}') . '%'); $schema = drupal_get_schema_unprocessed('simpletest'); $count = 0; foreach (array_diff_key($tables, $schema) as $table) { diff --git a/frontend/drupal/modules/simpletest/tests/actions_loop_test.info b/frontend/drupal/modules/simpletest/tests/actions_loop_test.info index e2c8260d5..5c9b26507 100644 --- a/frontend/drupal/modules/simpletest/tests/actions_loop_test.info +++ b/frontend/drupal/modules/simpletest/tests/actions_loop_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/ajax_forms_test.info b/frontend/drupal/modules/simpletest/tests/ajax_forms_test.info index 5c662d491..b156d2e96 100644 --- a/frontend/drupal/modules/simpletest/tests/ajax_forms_test.info +++ b/frontend/drupal/modules/simpletest/tests/ajax_forms_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/ajax_test.info b/frontend/drupal/modules/simpletest/tests/ajax_test.info index a3c01c731..0562bafee 100644 --- a/frontend/drupal/modules/simpletest/tests/ajax_test.info +++ b/frontend/drupal/modules/simpletest/tests/ajax_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/batch_test.info b/frontend/drupal/modules/simpletest/tests/batch_test.info index 4fe3cf2bf..d0fe98244 100644 --- a/frontend/drupal/modules/simpletest/tests/batch_test.info +++ b/frontend/drupal/modules/simpletest/tests/batch_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/boot_test_1.info b/frontend/drupal/modules/simpletest/tests/boot_test_1.info index 188007b7b..32cc844e9 100644 --- a/frontend/drupal/modules/simpletest/tests/boot_test_1.info +++ b/frontend/drupal/modules/simpletest/tests/boot_test_1.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/boot_test_2.info b/frontend/drupal/modules/simpletest/tests/boot_test_2.info index d3020eda9..57eaf26a2 100644 --- a/frontend/drupal/modules/simpletest/tests/boot_test_2.info +++ b/frontend/drupal/modules/simpletest/tests/boot_test_2.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/common.test b/frontend/drupal/modules/simpletest/tests/common.test index bd774dc19..6145546f7 100644 --- a/frontend/drupal/modules/simpletest/tests/common.test +++ b/frontend/drupal/modules/simpletest/tests/common.test @@ -2051,6 +2051,32 @@ class DrupalRenderTestCase extends DrupalWebTestCase { // The elements should appear in output in the same order as the array. $this->assertTrue(strpos($output, $second) < strpos($output, $first), 'Elements were not sorted.'); + + // The order of children with same weight should be preserved. + $element_mixed_weight = array( + 'child5' => array('#weight' => 10), + 'child3' => array('#weight' => -10), + 'child1' => array(), + 'child4' => array('#weight' => 10), + 'child2' => array(), + 'child6' => array('#weight' => 10), + 'child9' => array(), + 'child8' => array('#weight' => 10), + 'child7' => array(), + ); + + $expected = array( + 'child3', + 'child1', + 'child2', + 'child9', + 'child7', + 'child5', + 'child4', + 'child6', + 'child8', + ); + $this->assertEqual($expected, element_children($element_mixed_weight, TRUE), 'Order of elements with the same weight is preserved.'); } /** diff --git a/frontend/drupal/modules/simpletest/tests/common_test.info b/frontend/drupal/modules/simpletest/tests/common_test.info index 826fa069b..b870fe36b 100644 --- a/frontend/drupal/modules/simpletest/tests/common_test.info +++ b/frontend/drupal/modules/simpletest/tests/common_test.info @@ -7,7 +7,7 @@ stylesheets[all][] = common_test.css stylesheets[print][] = common_test.print.css hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/common_test_cron_helper.info b/frontend/drupal/modules/simpletest/tests/common_test_cron_helper.info index cf4ddc66b..40b920f89 100644 --- a/frontend/drupal/modules/simpletest/tests/common_test_cron_helper.info +++ b/frontend/drupal/modules/simpletest/tests/common_test_cron_helper.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/database_test.info b/frontend/drupal/modules/simpletest/tests/database_test.info index 14e7b7e8c..8f977bb66 100644 --- a/frontend/drupal/modules/simpletest/tests/database_test.info +++ b/frontend/drupal/modules/simpletest/tests/database_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/database_test.install b/frontend/drupal/modules/simpletest/tests/database_test.install index 11361151f..44ed5ee0a 100644 --- a/frontend/drupal/modules/simpletest/tests/database_test.install +++ b/frontend/drupal/modules/simpletest/tests/database_test.install @@ -217,5 +217,24 @@ function database_test_schema() { ), ); + $schema['virtual'] = array( + 'description' => 'Basic test table with a reserved name.', + 'fields' => array( + 'id' => array( + 'type' => 'serial', + 'unsigned' => TRUE, + 'not null' => TRUE, + ), + 'function' => array( + 'description' => "A column with a reserved name.", + 'type' => 'varchar', + 'length' => 255, + 'not null' => FALSE, + 'default' => '', + ), + ), + 'primary key' => array('id'), + ); + return $schema; } diff --git a/frontend/drupal/modules/simpletest/tests/database_test.test b/frontend/drupal/modules/simpletest/tests/database_test.test index 59d2e5d62..04be5c85b 100644 --- a/frontend/drupal/modules/simpletest/tests/database_test.test +++ b/frontend/drupal/modules/simpletest/tests/database_test.test @@ -163,6 +163,12 @@ class DatabaseTestCase extends DrupalWebTestCase { 'priority' => 3, )) ->execute(); + + db_insert('virtual') + ->fields(array( + 'function' => 'Function value 1', + )) + ->execute(); } } @@ -3457,7 +3463,6 @@ class DatabaseQueryTestCase extends DatabaseTestCase { ->fetchField(); $this->assertFalse($result, 'SQL injection attempt did not result in a row being inserted in the database table.'); } - } /** @@ -4033,6 +4038,8 @@ class ConnectionUnitTest extends DrupalUnitTestCase { protected $monitor; protected $originalCount; + protected $skipTest; + public static function getInfo() { return array( 'name' => 'Connection unit tests', @@ -4053,7 +4060,7 @@ class ConnectionUnitTest extends DrupalUnitTestCase { // @todo Make this test driver-agnostic, or find a proper way to skip it. // @see http://drupal.org/node/1273478 $connection_info = Database::getConnectionInfo('default'); - $this->skipTest = (bool) $connection_info['default']['driver'] != 'mysql'; + $this->skipTest = (bool) ($connection_info['default']['driver'] != 'mysql'); if ($this->skipTest) { // Insert an assertion to prevent Simpletest from interpreting the test // as failure. @@ -4238,5 +4245,178 @@ class ConnectionUnitTest extends DrupalUnitTestCase { // Verify that we are back to the original connection count. $this->assertNoConnection($id); } - +} + +/** + * Test reserved keyword handling (introduced for MySQL 8+) +*/ +class DatabaseReservedKeywordTestCase extends DatabaseTestCase { + public static function getInfo() { + return array( + 'name' => 'Reserved Keywords', + 'description' => 'Test handling of reserved keywords.', + 'group' => 'Database', + ); + } + + function setUp() { + parent::setUp('database_test'); + } + + public function testTableNameQuoting() { + // Test db_query with {table} pattern. + $record = db_query('SELECT * FROM {system} LIMIT 1')->fetchObject(); + $this->assertTrue(isset($record->filename), 'Successfully queried the {system} table.'); + + $connection = Database::getConnection()->getConnectionOptions(); + if ($connection['driver'] === 'sqlite') { + // In SQLite simpletest's prefixed db tables exist in their own schema + // (e.g. simpletest124904.system), so we cannot test the schema.{table} + // syntax here as the table name will have the schema name prepended to it + // when prefixes are processed. + $this->assert(TRUE, 'Skipping schema.{system} test for SQLite.'); + } + else { + $database = $connection['database']; + // Test db_query with schema.{table} pattern + db_query('SELECT * FROM ' . $database . '.{system} LIMIT 1')->fetchObject(); + $this->assertTrue(isset($record->filename), 'Successfully queried the schema.{system} table.'); + } + } + + public function testSelectReservedWordTableCount() { + $rows = db_select('virtual') + ->countQuery() + ->execute() + ->fetchField(); + $this->assertEqual($rows, 1, 'Successful count query on a table with a reserved name.'); + } + + public function testSelectReservedWordTableSpecificField() { + $record = db_select('virtual') + ->fields('virtual', array('function')) + ->execute() + ->fetchAssoc(); + $this->assertEqual($record['function'], 'Function value 1', 'Successfully read a field from a table with a name and column which are reserved words.'); + } + + public function testSelectReservedWordTableAllFields() { + $record = db_select('virtual') + ->fields('virtual') + ->execute() + ->fetchAssoc(); + $this->assertEqual($record['function'], 'Function value 1', 'Successful all_fields query from a table with a name and column which are reserved words.'); + } + + public function testSelectReservedWordAliasCount() { + $rows = db_select('test', 'character') + ->countQuery() + ->execute() + ->fetchField(); + $this->assertEqual($rows, 4, 'Successful count query using an alias which is a reserved word.'); + } + + public function testSelectReservedWordAliasSpecificFields() { + $record = db_select('test', 'high_priority') + ->fields('high_priority', array('name')) + ->condition('age', 27) + ->execute()->fetchAssoc(); + $this->assertEqual($record['name'], 'George', 'Successful query using an alias which is a reserved word.'); + } + + public function testSelectReservedWordAliasAllFields() { + $record = db_select('test', 'high_priority') + ->fields('high_priority') + ->condition('age', 27) + ->execute()->fetchAssoc(); + $this->assertEqual($record['name'], 'George', 'Successful all_fields query using an alias which is a reserved word.'); + } + + public function testInsertReservedWordTable() { + $num_records_before = db_query('SELECT COUNT(*) FROM {virtual}')->fetchField(); + db_insert('virtual') + ->fields(array( + 'function' => 'Inserted function', + )) + ->execute(); + $num_records_after = db_query('SELECT COUNT(*) FROM {virtual}')->fetchField(); + $this->assertIdentical($num_records_before + 1, (int) $num_records_after, 'Successful insert into a table with a name and column which are reserved words.'); + } + + public function testDeleteReservedWordTable() { + $delete = db_delete('virtual') + ->condition('function', 'Function value 1'); + $num_deleted = $delete->execute(); + $this->assertEqual($num_deleted, 1, "Deleted 1 record from a table with a name and column which are reserved words.."); + } + + function testTruncateReservedWordTable() { + db_truncate('virtual')->execute(); + $num_records_after = db_query("SELECT COUNT(*) FROM {virtual}")->fetchField(); + $this->assertEqual(0, $num_records_after, 'Truncated a table with a reserved name.'); + } + + function testUpdateReservedWordTable() { + $num_updated = db_update('virtual') + ->fields(array('function' => 'Updated function')) + ->execute(); + $this->assertIdentical($num_updated, 1, 'Updated 1 record in a table with a name and column which are reserved words.'); + } + + function testMergeReservedWordTable() { + $key = db_query('SELECT id FROM {virtual} LIMIT 1')->fetchField(); + $num_records_before = db_query('SELECT COUNT(*) FROM {virtual}')->fetchField(); + db_merge('virtual') + ->key(array('id' => $key)) + ->fields(array('function' => 'Merged function')) + ->execute(); + $num_records_after = db_query('SELECT COUNT(*) FROM {virtual}')->fetchField(); + $this->assertIdentical($num_records_before, $num_records_after, 'Successful merge query on a table with a name and column which are reserved words.'); + } +} + +/** + * Test table prefix handling. +*/ +class DatabaseTablePrefixTestCase extends DatabaseTestCase { + public static function getInfo() { + return array( + 'name' => 'Table prefixes', + 'description' => 'Test handling of table prefixes.', + 'group' => 'Database', + ); + } + + public function testSchemaDotTablePrefixes() { + // Get a copy of the default connection options. + $db = Database::getConnection('default', 'default'); + $connection_options = $db->getConnectionOptions(); + + if ($connection_options['driver'] === 'sqlite') { + // In SQLite simpletest's prefixed db tables exist in their own schema + // (e.g. simpletest124904.system), so we cannot test the schema.table + // prefix syntax here. + $this->assert(TRUE, 'Skipping schema.table prefixed tables test for SQLite.'); + return; + } + + $db_name = $connection_options['database']; + // This prefix is usually something like simpletest12345 + $test_prefix = $connection_options['prefix']['default']; + + // Set up a new connection with table prefixes in the form "schema.table" + $prefixed = $connection_options; + $prefixed['prefix'] = array( + 'default' => $test_prefix, + 'users' => $db_name . '.' . $test_prefix, + 'role' => $db_name . '.' . $test_prefix, + ); + Database::addConnectionInfo('default', 'prefixed', $prefixed); + + // Test that the prefixed database connection can query the prefixed tables. + $num_users_prefixed = Database::getConnection('prefixed', 'default')->query('SELECT COUNT(1) FROM {users}')->fetchField(); + $this->assertTrue((int) $num_users_prefixed > 0, 'Successfully queried the users table using a schema.table prefix'); + $num_users_default = Database::getConnection('default', 'default')->query('SELECT COUNT(1) FROM {users}')->fetchField(); + $this->assertEqual($num_users_default, $num_users_prefixed, 'Verified results of query using a connection with schema.table prefixed tables'); + } } diff --git a/frontend/drupal/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info b/frontend/drupal/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info index 8dace3173..9b08957ce 100644 --- a/frontend/drupal/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info +++ b/frontend/drupal/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info @@ -7,7 +7,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info b/frontend/drupal/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info index 276f952a8..d5cd81718 100644 --- a/frontend/drupal/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info +++ b/frontend/drupal/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info b/frontend/drupal/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info index d244dbb1d..c51fee750 100644 --- a/frontend/drupal/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info +++ b/frontend/drupal/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/entity_cache_test.info b/frontend/drupal/modules/simpletest/tests/entity_cache_test.info index 1707173a2..b96c8f006 100644 --- a/frontend/drupal/modules/simpletest/tests/entity_cache_test.info +++ b/frontend/drupal/modules/simpletest/tests/entity_cache_test.info @@ -6,7 +6,7 @@ core = 7.x dependencies[] = entity_cache_test_dependency hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/entity_cache_test_dependency.info b/frontend/drupal/modules/simpletest/tests/entity_cache_test_dependency.info index 801139498..4cf76db5b 100644 --- a/frontend/drupal/modules/simpletest/tests/entity_cache_test_dependency.info +++ b/frontend/drupal/modules/simpletest/tests/entity_cache_test_dependency.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/entity_crud_hook_test.info b/frontend/drupal/modules/simpletest/tests/entity_crud_hook_test.info index e3dd00129..3872d2e32 100644 --- a/frontend/drupal/modules/simpletest/tests/entity_crud_hook_test.info +++ b/frontend/drupal/modules/simpletest/tests/entity_crud_hook_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/entity_query_access_test.info b/frontend/drupal/modules/simpletest/tests/entity_query_access_test.info index 1584790a5..7ed113fa3 100644 --- a/frontend/drupal/modules/simpletest/tests/entity_query_access_test.info +++ b/frontend/drupal/modules/simpletest/tests/entity_query_access_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/error_test.info b/frontend/drupal/modules/simpletest/tests/error_test.info index 12c6c4543..d7c1efd08 100644 --- a/frontend/drupal/modules/simpletest/tests/error_test.info +++ b/frontend/drupal/modules/simpletest/tests/error_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/file.test b/frontend/drupal/modules/simpletest/tests/file.test index 429a55180..57b315fb0 100644 --- a/frontend/drupal/modules/simpletest/tests/file.test +++ b/frontend/drupal/modules/simpletest/tests/file.test @@ -706,7 +706,7 @@ class FileSaveUploadTest extends FileHookTestCase { $edit = array( 'file_test_replace' => FILE_EXISTS_REPLACE, 'files[file_test_upload]' => drupal_realpath($this->image->uri), - 'allow_all_extensions' => TRUE, + 'allow_all_extensions' => 'empty_array', ); $this->drupalPost('file-test/upload', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); @@ -715,14 +715,35 @@ class FileSaveUploadTest extends FileHookTestCase { // Check that the correct hooks were called. $this->assertFileHooksCalled(array('validate', 'load', 'update')); + + // Reset the hook counters. + file_test_reset(); + + // Now tell file_save_upload() to allow any extension and try and upload a + // malicious file. + $edit = array( + 'file_test_replace' => FILE_EXISTS_REPLACE, + 'files[file_test_upload]' => drupal_realpath($this->phpfile->uri), + 'is_image_file' => FALSE, + 'allow_all_extensions' => 'empty_array', + ); + $this->drupalPost('file-test/upload', $edit, t('Submit')); + $this->assertResponse(200, 'Received a 200 response for posted test file.'); + $message = t('For security reasons, your upload has been renamed to') . ' ' . $this->phpfile->filename . '_.txt' . ''; + $this->assertRaw($message, 'Dangerous file was renamed.'); + $this->assertText('File name is php-2.php_.txt.'); + $this->assertRaw(t('File MIME type is text/plain.'), "Dangerous file's MIME type was changed."); + $this->assertRaw(t('You WIN!'), 'Found the success message.'); + // Check that the correct hooks were called. + $this->assertFileHooksCalled(array('validate', 'insert')); } /** * Test dangerous file handling. */ function testHandleDangerousFile() { - // Allow the .php extension and make sure it gets renamed to .txt for - // safety. Also check to make sure its MIME type was changed. + // Allow the .php extension and make sure it gets munged and given a .txt + // extension for safety. Also check to make sure its MIME type was changed. $edit = array( 'file_test_replace' => FILE_EXISTS_REPLACE, 'files[file_test_upload]' => drupal_realpath($this->phpfile->uri), @@ -732,8 +753,9 @@ class FileSaveUploadTest extends FileHookTestCase { $this->drupalPost('file-test/upload', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); - $message = t('For security reasons, your upload has been renamed to') . ' ' . $this->phpfile->filename . '.txt' . ''; + $message = t('For security reasons, your upload has been renamed to') . ' ' . $this->phpfile->filename . '_.txt' . ''; $this->assertRaw($message, 'Dangerous file was renamed.'); + $this->assertRaw('File name is php-2.php_.txt.'); $this->assertRaw(t('File MIME type is text/plain.'), "Dangerous file's MIME type was changed."); $this->assertRaw(t('You WIN!'), 'Found the success message.'); @@ -755,8 +777,39 @@ class FileSaveUploadTest extends FileHookTestCase { // Check that the correct hooks were called. $this->assertFileHooksCalled(array('validate', 'insert')); - // Turn off insecure uploads. + // Reset the hook counters. + file_test_reset(); + + // Even with insecure uploads allowed, the .php file should not be uploaded + // if it is not explicitly included in the list of allowed extensions. + $edit['extensions'] = 'foo'; + $this->drupalPost('file-test/upload', $edit, t('Submit')); + $this->assertResponse(200, 'Received a 200 response for posted test file.'); + $message = t('Only files with the following extensions are allowed:') . ' ' . $edit['extensions'] . ''; + $this->assertRaw($message, 'Cannot upload a disallowed extension'); + $this->assertRaw(t('Epic upload FAIL!'), 'Found the failure message.'); + + // Check that the correct hooks were called. + $this->assertFileHooksCalled(array('validate')); + + // Reset the hook counters. + file_test_reset(); + + // Turn off insecure uploads, then try the same thing as above (ensure that + // the .php file is still rejected since it's not in the list of allowed + // extensions). variable_set('allow_insecure_uploads', 0); + $this->drupalPost('file-test/upload', $edit, t('Submit')); + $this->assertResponse(200, 'Received a 200 response for posted test file.'); + $message = t('Only files with the following extensions are allowed:') . ' ' . $edit['extensions'] . ''; + $this->assertRaw($message, 'Cannot upload a disallowed extension'); + $this->assertRaw(t('Epic upload FAIL!'), 'Found the failure message.'); + + // Check that the correct hooks were called. + $this->assertFileHooksCalled(array('validate')); + + // Reset the hook counters. + file_test_reset(); } /** @@ -765,6 +818,7 @@ class FileSaveUploadTest extends FileHookTestCase { function testHandleFileMunge() { // Ensure insecure uploads are disabled for this test. variable_set('allow_insecure_uploads', 0); + $original_image_uri = $this->image->uri; $this->image = file_move($this->image, $this->image->uri . '.foo.' . $this->image_extension); // Reset the hook counters to get rid of the 'move' we just called. @@ -789,13 +843,33 @@ class FileSaveUploadTest extends FileHookTestCase { // Check that the correct hooks were called. $this->assertFileHooksCalled(array('validate', 'insert')); + // Reset the hook counters. + file_test_reset(); + + // Ensure we don't munge the .foo extension if it is in the list of allowed + // extensions. + $extensions = 'foo ' . $this->image_extension; + $edit = array( + 'files[file_test_upload]' => drupal_realpath($this->image->uri), + 'extensions' => $extensions, + ); + + $this->drupalPost('file-test/upload', $edit, t('Submit')); + $this->assertResponse(200, 'Received a 200 response for posted test file.'); + $this->assertNoRaw(t('For security reasons, your upload has been renamed'), 'Found no security message.'); + $this->assertRaw(t('File name is @filename', array('@filename' => 'image-test.png.foo.png')), 'File was not munged when all extensions within it are allowed.'); + $this->assertRaw(t('You WIN!'), 'Found the success message.'); + + // Check that the correct hooks were called. + $this->assertFileHooksCalled(array('validate', 'insert')); + // Ensure we don't munge files if we're allowing any extension. // Reset the hook counters. file_test_reset(); $edit = array( 'files[file_test_upload]' => drupal_realpath($this->image->uri), - 'allow_all_extensions' => TRUE, + 'allow_all_extensions' => 'empty_array', ); $this->drupalPost('file-test/upload', $edit, t('Submit')); @@ -806,6 +880,94 @@ class FileSaveUploadTest extends FileHookTestCase { // Check that the correct hooks were called. $this->assertFileHooksCalled(array('validate', 'insert')); + + // Test that a dangerous extension such as .php is munged even if it is in + // the list of allowed extensions. + $this->image = file_move($this->image, $original_image_uri . '.php.' . $this->image_extension); + // Reset the hook counters. + file_test_reset(); + + $extensions = 'php ' . $this->image_extension; + $edit = array( + 'files[file_test_upload]' => drupal_realpath($this->image->uri), + 'extensions' => $extensions, + ); + + $munged_filename = $this->image->filename; + $munged_filename = substr($munged_filename, 0, strrpos($munged_filename, '.')); + $munged_filename .= '_.' . $this->image_extension; + + $this->drupalPost('file-test/upload', $edit, t('Submit')); + $this->assertResponse(200, 'Received a 200 response for posted test file.'); + $this->assertRaw(t('For security reasons, your upload has been renamed'), 'Found security message.'); + $this->assertRaw(t('File name is @filename', array('@filename' => $munged_filename)), 'File was successfully munged.'); + $this->assertRaw(t('You WIN!'), 'Found the success message.'); + + // Check that the correct hooks were called. + $this->assertFileHooksCalled(array('validate', 'insert')); + + // Reset the hook counters. + file_test_reset(); + + // Dangerous extensions are munged even when all extensions are allowed. + $edit = array( + 'files[file_test_upload]' => drupal_realpath($this->image->uri), + 'allow_all_extensions' => 'empty_array', + ); + + $munged_filename = $this->image->filename; + $munged_filename = substr($munged_filename, 0, strrpos($munged_filename, '.')); + $munged_filename .= '_.' . $this->image_extension; + + $this->drupalPost('file-test/upload', $edit, t('Submit')); + $this->assertResponse(200, 'Received a 200 response for posted test file.'); + $this->assertRaw(t('For security reasons, your upload has been renamed'), 'Found security message.'); + $this->assertRaw(t('File name is @filename.', array('@filename' => 'image-test.png_.php_.png_.txt')), 'File was successfully munged.'); + $this->assertRaw(t('You WIN!'), 'Found the success message.'); + + // Check that the correct hooks were called. + $this->assertFileHooksCalled(array('validate', 'insert')); + + // Dangerous extensions are munged if is renamed to end in .txt. + $this->image = file_move($this->image, $original_image_uri . '.cgi.' . $this->image_extension . '.txt'); + // Reset the hook counters. + file_test_reset(); + + $edit = array( + 'files[file_test_upload]' => drupal_realpath($this->image->uri), + 'allow_all_extensions' => 'empty_array', + ); + + $munged_filename = $this->image->filename; + $munged_filename = substr($munged_filename, 0, strrpos($munged_filename, '.')); + $munged_filename .= '_.' . $this->image_extension; + + $this->drupalPost('file-test/upload', $edit, t('Submit')); + $this->assertResponse(200, 'Received a 200 response for posted test file.'); + $this->assertRaw(t('For security reasons, your upload has been renamed'), 'Found security message.'); + $this->assertRaw(t('File name is @filename.', array('@filename' => 'image-test.png_.cgi_.png_.txt')), 'File was successfully munged.'); + $this->assertRaw(t('You WIN!'), 'Found the success message.'); + + // Check that the correct hooks were called. + $this->assertFileHooksCalled(array('validate', 'insert')); + + // Reset the hook counters. + file_test_reset(); + + // Ensure that setting $validators['file_validate_extensions'] = array('') + // rejects all files without munging or renaming. + $edit = array( + 'files[file_test_upload]' => drupal_realpath($this->image->uri), + 'allow_all_extensions' => 'empty_string', + ); + + $this->drupalPost('file-test/upload', $edit, t('Submit')); + $this->assertResponse(200, 'Received a 200 response for posted test file.'); + $this->assertNoRaw(t('For security reasons, your upload has been renamed'), 'Found security message.'); + $this->assertRaw(t('Epic upload FAIL!'), 'Found the failure message.'); + + // Check that the correct hooks were called. + $this->assertFileHooksCalled(array('validate')); } /** @@ -2192,6 +2354,25 @@ class FileValidateTest extends FileHookTestCase { $this->assertEqual(file_validate($file, $failing), array('Failed', 'Badly', 'Epic fail'), 'Validating returns errors.'); $this->assertFileHooksCalled(array('validate')); } + + /** + * Tests hard-coded security check in file_validate(). + */ + public function testInsecureExtensions() { + $file = $this->createFile('test.php', 'Invalid PHP'); + + // Test that file_validate() will check for insecure extensions by default. + $errors = file_validate($file, array()); + $this->assertEqual('For security reasons, your upload has been rejected.', $errors[0]); + $this->assertFileHooksCalled(array('validate')); + file_test_reset(); + + // Test that the 'allow_insecure_uploads' is respected. + variable_set('allow_insecure_uploads', 1); + $errors = file_validate($file, array()); + $this->assertEqual(array(), $errors); + $this->assertFileHooksCalled(array('validate')); + } } /** @@ -2561,7 +2742,7 @@ class FileNameMungingTest extends FileTestCase { function setUp() { parent::setUp(); - $this->bad_extension = 'php'; + $this->bad_extension = 'foo'; $this->name = $this->randomName() . '.' . $this->bad_extension . '.txt'; $this->name_with_uc_ext = $this->randomName() . '.' . strtoupper($this->bad_extension) . '.txt'; } @@ -2610,6 +2791,18 @@ class FileNameMungingTest extends FileTestCase { $this->assertIdentical($munged_name, $this->name, format_string('The new filename (%munged) matches the original (%original) also when the whitelisted extension is in uppercase.', array('%munged' => $munged_name, '%original' => $this->name))); } + /** + * Tests unsafe extensions are munged by file_munge_filename(). + */ + public function testMungeUnsafe() { + $prefix = $this->randomName(); + $name = "$prefix.php.txt"; + // Put the php extension in the allowed list, but since it is in the unsafe + // extension list, it should still be munged. + $munged_name = file_munge_filename($name, 'php txt'); + $this->assertIdentical($munged_name, "$prefix.php_.txt", format_string('The filename (%munged) has been modified from the original (%original) if the allowed extension is also on the unsafe list.', array('%munged' => $munged_name, '%original' => $name))); + } + /** * Ensure that unmunge gets your name back. */ diff --git a/frontend/drupal/modules/simpletest/tests/file_test.info b/frontend/drupal/modules/simpletest/tests/file_test.info index 6ce436b86..a15d4adcb 100644 --- a/frontend/drupal/modules/simpletest/tests/file_test.info +++ b/frontend/drupal/modules/simpletest/tests/file_test.info @@ -6,7 +6,7 @@ core = 7.x files[] = file_test.module hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/file_test.module b/frontend/drupal/modules/simpletest/tests/file_test.module index 1b11316f9..b7d6fd0c2 100644 --- a/frontend/drupal/modules/simpletest/tests/file_test.module +++ b/frontend/drupal/modules/simpletest/tests/file_test.module @@ -76,9 +76,13 @@ function _file_test_form($form, &$form_state) { ); $form['allow_all_extensions'] = array( - '#type' => 'checkbox', - '#title' => t('Allow all extensions?'), - '#default_value' => FALSE, + '#type' => 'radios', + '#options' => array( + 'false' => 'No', + 'empty_array' => 'Empty array', + 'empty_string' => 'Empty string', + ), + '#default_value' => 'false', ); $form['is_image_file'] = array( @@ -114,9 +118,13 @@ function _file_test_form_submit(&$form, &$form_state) { $validators['file_validate_is_image'] = array(); } - if ($form_state['values']['allow_all_extensions']) { + $allow = $form_state['values']['allow_all_extensions']; + if ($allow === 'empty_array') { $validators['file_validate_extensions'] = array(); } + elseif ($allow === 'empty_string') { + $validators['file_validate_extensions'] = array(''); + } elseif (!empty($form_state['values']['extensions'])) { $validators['file_validate_extensions'] = array($form_state['values']['extensions']); } diff --git a/frontend/drupal/modules/simpletest/tests/filter_test.info b/frontend/drupal/modules/simpletest/tests/filter_test.info index edfe36fbf..acdb733ec 100644 --- a/frontend/drupal/modules/simpletest/tests/filter_test.info +++ b/frontend/drupal/modules/simpletest/tests/filter_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/form.test b/frontend/drupal/modules/simpletest/tests/form.test index d1be69d72..49b561a63 100644 --- a/frontend/drupal/modules/simpletest/tests/form.test +++ b/frontend/drupal/modules/simpletest/tests/form.test @@ -591,6 +591,19 @@ class FormElementTestCase extends DrupalWebTestCase { ))); } } + + /** + * Tests Weight form element #default_value behavior. + */ + public function testWeightDefaultValue() { + $element = array( + '#type' => 'weight', + '#delta' => 10, + '#default_value' => 15, + ); + $element = form_process_weight($element); + $this->assertTrue(isset($element['#options'][$element['#default_value']]), 'Default value exists in #options list'); + } } /** diff --git a/frontend/drupal/modules/simpletest/tests/form_test.info b/frontend/drupal/modules/simpletest/tests/form_test.info index 77dfd266c..4fc7142bd 100644 --- a/frontend/drupal/modules/simpletest/tests/form_test.info +++ b/frontend/drupal/modules/simpletest/tests/form_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/image_test.info b/frontend/drupal/modules/simpletest/tests/image_test.info index 7f7942b59..e7e00f318 100644 --- a/frontend/drupal/modules/simpletest/tests/image_test.info +++ b/frontend/drupal/modules/simpletest/tests/image_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/mail.test b/frontend/drupal/modules/simpletest/tests/mail.test index 3e40e13a8..307c77b29 100644 --- a/frontend/drupal/modules/simpletest/tests/mail.test +++ b/frontend/drupal/modules/simpletest/tests/mail.test @@ -59,6 +59,81 @@ class MailTestCase extends DrupalWebTestCase implements MailSystemInterface { $this->assertNull(self::$sent_message, 'Message was canceled.'); } + /** + * Checks for the site name in an auto-generated From: header. + */ + function testFromHeader() { + global $language; + $default_from = variable_get('site_mail', ini_get('sendmail_from')); + $site_name = variable_get('site_name', 'Drupal'); + + // Reset the class variable holding a copy of the last sent message. + self::$sent_message = NULL; + // Send an e-mail with a sender address specified. + $from_email = 'someone_else@example.com'; + $message = drupal_mail('simpletest', 'from_test', 'from_test@example.com', $language, array(), $from_email); + // Test that the from e-mail is just the e-mail and not the site name and + // default sender e-mail. + $this->assertEqual($from_email, self::$sent_message['headers']['From']); + + // Check default behavior is only email in FROM header. + self::$sent_message = NULL; + // Send an e-mail and check that the From-header contains only default mail address. + variable_del('mail_display_name_site_name'); + $message = drupal_mail('simpletest', 'from_test', 'from_test@example.com', $language); + $this->assertEqual($default_from, self::$sent_message['headers']['From']); + + self::$sent_message = NULL; + // Send an e-mail and check that the From-header contains the site name. + variable_set('mail_display_name_site_name', TRUE); + $message = drupal_mail('simpletest', 'from_test', 'from_test@example.com', $language); + $this->assertEqual($site_name . ' <' . $default_from . '>', self::$sent_message['headers']['From']); + } + + /** + * Checks for the site name in an auto-generated From: header. + */ + function testFromHeaderRfc2822Compliant() { + global $language; + $default_from = variable_get('site_mail', ini_get('sendmail_from')); + + // Enable adding a site name to From. + variable_set('mail_display_name_site_name', TRUE); + + $site_names = array( + // Simple ASCII characters. + 'Test site' => 'Test site', + // ASCII with html entity. + 'Test & site' => 'Test & site', + // Non-ASCII characters. + 'Tést site' => '=?UTF-8?B?VMOpc3Qgc2l0ZQ==?=', + // Non-ASCII with special characters. + 'Tést; site' => '=?UTF-8?B?VMOpc3Q7IHNpdGU=?=', + // Non-ASCII with html entity. + 'Tést; site' => '=?UTF-8?B?VMOpc3Q7IHNpdGU=?=', + // ASCII with special characters. + 'Test; site' => '"Test; site"', + // ASCII with special characters as html entity. + 'Test < site' => '"Test < site"', + // ASCII with special characters and '\'. + 'Test; \ "site"' => '"Test; \\\\ \"site\""', + // String already RFC-2822 compliant. + '"Test; site"' => '"Test; site"', + // String already RFC-2822 compliant. + '"Test; \\\\ \"site\""' => '"Test; \\\\ \"site\""', + ); + + foreach ($site_names as $original_name => $safe_string) { + variable_set('site_name', $original_name); + + // Reset the class variable holding a copy of the last sent message. + self::$sent_message = NULL; + // Send an e-mail and check that the From-header contains is RFC-2822 compliant. + drupal_mail('simpletest', 'from_test', 'from_test@example.com', $language); + $this->assertEqual($safe_string . ' <' . $default_from . '>', self::$sent_message['headers']['From']); + } + } + /** * Concatenate and wrap the e-mail body for plain-text mails. * diff --git a/frontend/drupal/modules/simpletest/tests/menu_test.info b/frontend/drupal/modules/simpletest/tests/menu_test.info index e463fada6..c5bcdd431 100644 --- a/frontend/drupal/modules/simpletest/tests/menu_test.info +++ b/frontend/drupal/modules/simpletest/tests/menu_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/module_test.info b/frontend/drupal/modules/simpletest/tests/module_test.info index 53933427f..7e97d6719 100644 --- a/frontend/drupal/modules/simpletest/tests/module_test.info +++ b/frontend/drupal/modules/simpletest/tests/module_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/path_test.info b/frontend/drupal/modules/simpletest/tests/path_test.info index 3b586e372..1aa1e3e40 100644 --- a/frontend/drupal/modules/simpletest/tests/path_test.info +++ b/frontend/drupal/modules/simpletest/tests/path_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/psr_0_test/psr_0_test.info b/frontend/drupal/modules/simpletest/tests/psr_0_test/psr_0_test.info index 86c848ad5..e25e89e8d 100644 --- a/frontend/drupal/modules/simpletest/tests/psr_0_test/psr_0_test.info +++ b/frontend/drupal/modules/simpletest/tests/psr_0_test/psr_0_test.info @@ -5,7 +5,7 @@ core = 7.x hidden = TRUE package = Testing -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/psr_4_test/psr_4_test.info b/frontend/drupal/modules/simpletest/tests/psr_4_test/psr_4_test.info index 7d8be117b..e8cfed0ff 100644 --- a/frontend/drupal/modules/simpletest/tests/psr_4_test/psr_4_test.info +++ b/frontend/drupal/modules/simpletest/tests/psr_4_test/psr_4_test.info @@ -5,7 +5,7 @@ core = 7.x hidden = TRUE package = Testing -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/requirements1_test.info b/frontend/drupal/modules/simpletest/tests/requirements1_test.info index da22662aa..c7c3c0273 100644 --- a/frontend/drupal/modules/simpletest/tests/requirements1_test.info +++ b/frontend/drupal/modules/simpletest/tests/requirements1_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/requirements2_test.info b/frontend/drupal/modules/simpletest/tests/requirements2_test.info index 2d3b81ce4..33b899d25 100644 --- a/frontend/drupal/modules/simpletest/tests/requirements2_test.info +++ b/frontend/drupal/modules/simpletest/tests/requirements2_test.info @@ -7,7 +7,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/schema.test b/frontend/drupal/modules/simpletest/tests/schema.test index 41994284e..070b2911e 100644 --- a/frontend/drupal/modules/simpletest/tests/schema.test +++ b/frontend/drupal/modules/simpletest/tests/schema.test @@ -381,4 +381,60 @@ class SchemaTestCase extends DrupalWebTestCase { db_drop_field($table_name, $field_name); } + + /** + * Tests the findTables() method. + */ + public function testFindTables() { + // We will be testing with three tables, two of them using the default + // prefix and the third one with an individually specified prefix. + + // Set up a new connection with different connection info. + $connection_info = Database::getConnectionInfo(); + + // Add per-table prefix to the second table. + $new_connection_info = $connection_info['default']; + $new_connection_info['prefix']['test_2_table'] = $new_connection_info['prefix']['default'] . '_shared_'; + Database::addConnectionInfo('test', 'default', $new_connection_info); + + Database::setActiveConnection('test'); + + // Create the tables. + $table_specification = array( + 'description' => 'Test table.', + 'fields' => array( + 'id' => array( + 'type' => 'int', + 'default' => NULL, + ), + ), + ); + Database::getConnection()->schema()->createTable('test_1_table', $table_specification); + Database::getConnection()->schema()->createTable('test_2_table', $table_specification); + Database::getConnection()->schema()->createTable('the_third_table', $table_specification); + + // Check the "all tables" syntax. + $tables = Database::getConnection()->schema()->findTablesD8('%'); + sort($tables); + $expected = array( + 'test_1_table', + // This table uses a per-table prefix, yet it is returned as un-prefixed. + 'test_2_table', + 'the_third_table', + ); + + $this->assertTrue(!array_diff($expected, $tables), 'All tables were found.'); + + // Check the restrictive syntax. + $tables = Database::getConnection()->schema()->findTablesD8('test_%'); + sort($tables); + $expected = array( + 'test_1_table', + 'test_2_table', + ); + $this->assertEqual($tables, $expected, 'Two tables were found.'); + + // Go back to the initial connection. + Database::setActiveConnection('default'); + } } diff --git a/frontend/drupal/modules/simpletest/tests/session_test.info b/frontend/drupal/modules/simpletest/tests/session_test.info index d3035aaa0..fe7d29fcd 100644 --- a/frontend/drupal/modules/simpletest/tests/session_test.info +++ b/frontend/drupal/modules/simpletest/tests/session_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/system_dependencies_test.info b/frontend/drupal/modules/simpletest/tests/system_dependencies_test.info index f85a2ed28..d1e6f872f 100644 --- a/frontend/drupal/modules/simpletest/tests/system_dependencies_test.info +++ b/frontend/drupal/modules/simpletest/tests/system_dependencies_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = _missing_dependency -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info b/frontend/drupal/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info index e794e96f7..fff100703 100644 --- a/frontend/drupal/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info +++ b/frontend/drupal/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = system_incompatible_core_version_test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/system_incompatible_core_version_test.info b/frontend/drupal/modules/simpletest/tests/system_incompatible_core_version_test.info index b4a95332a..5f1ad7bfd 100644 --- a/frontend/drupal/modules/simpletest/tests/system_incompatible_core_version_test.info +++ b/frontend/drupal/modules/simpletest/tests/system_incompatible_core_version_test.info @@ -5,7 +5,7 @@ version = VERSION core = 5.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info b/frontend/drupal/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info index 76a900084..54a358f0a 100644 --- a/frontend/drupal/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info +++ b/frontend/drupal/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info @@ -7,7 +7,7 @@ hidden = TRUE ; system_incompatible_module_version_test declares version 1.0 dependencies[] = system_incompatible_module_version_test (>2.0) -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/system_incompatible_module_version_test.info b/frontend/drupal/modules/simpletest/tests/system_incompatible_module_version_test.info index 3aac4aee1..eda0120b8 100644 --- a/frontend/drupal/modules/simpletest/tests/system_incompatible_module_version_test.info +++ b/frontend/drupal/modules/simpletest/tests/system_incompatible_module_version_test.info @@ -5,7 +5,7 @@ version = 1.0 core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/system_project_namespace_test.info b/frontend/drupal/modules/simpletest/tests/system_project_namespace_test.info index 00919281b..f23fc9ebc 100644 --- a/frontend/drupal/modules/simpletest/tests/system_project_namespace_test.info +++ b/frontend/drupal/modules/simpletest/tests/system_project_namespace_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = drupal:filter -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/system_test.info b/frontend/drupal/modules/simpletest/tests/system_test.info index eede27b1c..fe690b107 100644 --- a/frontend/drupal/modules/simpletest/tests/system_test.info +++ b/frontend/drupal/modules/simpletest/tests/system_test.info @@ -6,7 +6,7 @@ core = 7.x files[] = system_test.module hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/taxonomy_test.info b/frontend/drupal/modules/simpletest/tests/taxonomy_test.info index dcd0a9582..57d979084 100644 --- a/frontend/drupal/modules/simpletest/tests/taxonomy_test.info +++ b/frontend/drupal/modules/simpletest/tests/taxonomy_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE dependencies[] = taxonomy -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/theme_test.info b/frontend/drupal/modules/simpletest/tests/theme_test.info index 793358dc5..791c91272 100644 --- a/frontend/drupal/modules/simpletest/tests/theme_test.info +++ b/frontend/drupal/modules/simpletest/tests/theme_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info b/frontend/drupal/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info index 905cec3cf..acc5ad1ad 100644 --- a/frontend/drupal/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info +++ b/frontend/drupal/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info @@ -6,7 +6,7 @@ hidden = TRUE settings[basetheme_only] = base theme value settings[subtheme_override] = base theme value -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info b/frontend/drupal/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info index 04fa0a1db..a6742d338 100644 --- a/frontend/drupal/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info +++ b/frontend/drupal/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info @@ -6,7 +6,7 @@ hidden = TRUE settings[subtheme_override] = subtheme value -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/themes/test_theme/test_theme.info b/frontend/drupal/modules/simpletest/tests/themes/test_theme/test_theme.info index 957ea9cd0..2a67572b5 100644 --- a/frontend/drupal/modules/simpletest/tests/themes/test_theme/test_theme.info +++ b/frontend/drupal/modules/simpletest/tests/themes/test_theme/test_theme.info @@ -17,7 +17,7 @@ stylesheets[all][] = system.base.css settings[theme_test_setting] = default value -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info b/frontend/drupal/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info index 45565f898..416f18c92 100644 --- a/frontend/drupal/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info +++ b/frontend/drupal/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info @@ -4,7 +4,7 @@ core = 7.x hidden = TRUE engine = nyan_cat -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/update_script_test.info b/frontend/drupal/modules/simpletest/tests/update_script_test.info index 3f712fa9b..dc2ea900e 100644 --- a/frontend/drupal/modules/simpletest/tests/update_script_test.info +++ b/frontend/drupal/modules/simpletest/tests/update_script_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/update_test_1.info b/frontend/drupal/modules/simpletest/tests/update_test_1.info index cb13e4953..49442d50c 100644 --- a/frontend/drupal/modules/simpletest/tests/update_test_1.info +++ b/frontend/drupal/modules/simpletest/tests/update_test_1.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/update_test_2.info b/frontend/drupal/modules/simpletest/tests/update_test_2.info index cb13e4953..49442d50c 100644 --- a/frontend/drupal/modules/simpletest/tests/update_test_2.info +++ b/frontend/drupal/modules/simpletest/tests/update_test_2.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/update_test_3.info b/frontend/drupal/modules/simpletest/tests/update_test_3.info index cb13e4953..49442d50c 100644 --- a/frontend/drupal/modules/simpletest/tests/update_test_3.info +++ b/frontend/drupal/modules/simpletest/tests/update_test_3.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/url_alter_test.info b/frontend/drupal/modules/simpletest/tests/url_alter_test.info index cc99920f6..a75a0b44e 100644 --- a/frontend/drupal/modules/simpletest/tests/url_alter_test.info +++ b/frontend/drupal/modules/simpletest/tests/url_alter_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/simpletest/tests/xmlrpc_test.info b/frontend/drupal/modules/simpletest/tests/xmlrpc_test.info index a3a61e599..2a40732a7 100644 --- a/frontend/drupal/modules/simpletest/tests/xmlrpc_test.info +++ b/frontend/drupal/modules/simpletest/tests/xmlrpc_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/statistics/statistics.info b/frontend/drupal/modules/statistics/statistics.info index 5245ab8fc..00465a523 100644 --- a/frontend/drupal/modules/statistics/statistics.info +++ b/frontend/drupal/modules/statistics/statistics.info @@ -6,7 +6,7 @@ core = 7.x files[] = statistics.test configure = admin/config/system/statistics -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/syslog/syslog.info b/frontend/drupal/modules/syslog/syslog.info index 8d5620f5d..51fa2df88 100644 --- a/frontend/drupal/modules/syslog/syslog.info +++ b/frontend/drupal/modules/syslog/syslog.info @@ -6,7 +6,7 @@ core = 7.x files[] = syslog.test configure = admin/config/development/logging -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/system/system.info b/frontend/drupal/modules/system/system.info index 6f73eff3f..4ec02f0f8 100644 --- a/frontend/drupal/modules/system/system.info +++ b/frontend/drupal/modules/system/system.info @@ -12,7 +12,7 @@ files[] = system.test required = TRUE configure = admin/config/system -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/system/system.tar.inc b/frontend/drupal/modules/system/system.tar.inc index 6e3ae4238..92fa52908 100644 --- a/frontend/drupal/modules/system/system.tar.inc +++ b/frontend/drupal/modules/system/system.tar.inc @@ -1788,7 +1788,7 @@ class Archive_Tar // ----- Extract the properties $v_header['filename'] = rtrim($v_data['filename'], "\0"); - if ($this->_maliciousFilename($v_header['filename'])) { + if ($this->_isMaliciousFilename($v_header['filename'])) { $this->_error( 'Malicious .tar detected, file "' . $v_header['filename'] . '" will not install in desired directory tree' @@ -1858,9 +1858,9 @@ class Archive_Tar * * @return bool */ - private function _maliciousFilename($file) + private function _isMaliciousFilename($file) { - if (strpos($file, 'phar://') === 0) { + if (strpos($file, '://') !== false) { return true; } if (strpos($file, '../') !== false || strpos($file, '..\\') !== false) { @@ -1896,7 +1896,7 @@ class Archive_Tar $v_filename = rtrim(substr($v_filename, 0, $v_filesize), "\0"); $v_header['filename'] = $v_filename; - if ($this->_maliciousFilename($v_filename)) { + if ($this->_isMaliciousFilename($v_filename)) { $this->_error( 'Malicious .tar detected, file "' . $v_filename . '" will not install in desired directory tree' diff --git a/frontend/drupal/modules/system/system.test b/frontend/drupal/modules/system/system.test index 270311ecb..45c6648c4 100644 --- a/frontend/drupal/modules/system/system.test +++ b/frontend/drupal/modules/system/system.test @@ -28,7 +28,7 @@ class ModuleTestCase extends DrupalWebTestCase { * specified base table. Defaults to TRUE. */ function assertTableCount($base_table, $count = TRUE) { - $tables = db_find_tables(Database::getConnection()->prefixTables('{' . $base_table . '}') . '%'); + $tables = db_find_tables_d8($base_table . '%'); if ($count) { return $this->assertTrue($tables, format_string('Tables matching "@base_table" found.', array('@base_table' => $base_table))); @@ -779,14 +779,14 @@ class IPAddressBlockingTestCase extends DrupalWebTestCase { $submit_ip = $_SERVER['REMOTE_ADDR'] = '192.168.1.1'; system_block_ip_action(); system_block_ip_action(); - $ip_count = db_query("SELECT iid from {blocked_ips} WHERE ip = :ip", array(':ip' => $submit_ip))->rowCount(); + $ip_count = db_query("SELECT COUNT(*) from {blocked_ips} WHERE ip = :ip", array(':ip' => $submit_ip))->fetchColumn(); $this->assertEqual('1', $ip_count); drupal_static_reset('ip_address'); $submit_ip = $_SERVER['REMOTE_ADDR'] = ' '; system_block_ip_action(); system_block_ip_action(); system_block_ip_action(); - $ip_count = db_query("SELECT iid from {blocked_ips} WHERE ip = :ip", array(':ip' => $submit_ip))->rowCount(); + $ip_count = db_query("SELECT COUNT(*) from {blocked_ips} WHERE ip = :ip", array(':ip' => $submit_ip))->fetchColumn(); $this->assertEqual('1', $ip_count); } } diff --git a/frontend/drupal/modules/system/tests/cron_queue_test.info b/frontend/drupal/modules/system/tests/cron_queue_test.info index 2b3c47ebf..16d379ce4 100644 --- a/frontend/drupal/modules/system/tests/cron_queue_test.info +++ b/frontend/drupal/modules/system/tests/cron_queue_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/system/tests/system_cron_test.info b/frontend/drupal/modules/system/tests/system_cron_test.info index 8b78eb9ff..8caf9deef 100644 --- a/frontend/drupal/modules/system/tests/system_cron_test.info +++ b/frontend/drupal/modules/system/tests/system_cron_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/taxonomy/taxonomy.info b/frontend/drupal/modules/taxonomy/taxonomy.info index 60af3b216..6596973b2 100644 --- a/frontend/drupal/modules/taxonomy/taxonomy.info +++ b/frontend/drupal/modules/taxonomy/taxonomy.info @@ -8,7 +8,7 @@ files[] = taxonomy.module files[] = taxonomy.test configure = admin/structure/taxonomy -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/toolbar/toolbar.info b/frontend/drupal/modules/toolbar/toolbar.info index a73d83b4a..cc79e9b2f 100644 --- a/frontend/drupal/modules/toolbar/toolbar.info +++ b/frontend/drupal/modules/toolbar/toolbar.info @@ -4,7 +4,7 @@ core = 7.x package = Core version = VERSION -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/tracker/tracker.info b/frontend/drupal/modules/tracker/tracker.info index fdc994283..df93078be 100644 --- a/frontend/drupal/modules/tracker/tracker.info +++ b/frontend/drupal/modules/tracker/tracker.info @@ -6,7 +6,7 @@ version = VERSION core = 7.x files[] = tracker.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/translation/tests/translation_test.info b/frontend/drupal/modules/translation/tests/translation_test.info index 887432886..d3cc7cece 100644 --- a/frontend/drupal/modules/translation/tests/translation_test.info +++ b/frontend/drupal/modules/translation/tests/translation_test.info @@ -5,7 +5,7 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/translation/translation.info b/frontend/drupal/modules/translation/translation.info index c32580267..4633fd555 100644 --- a/frontend/drupal/modules/translation/translation.info +++ b/frontend/drupal/modules/translation/translation.info @@ -6,7 +6,7 @@ version = VERSION core = 7.x files[] = translation.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/trigger/tests/trigger_test.info b/frontend/drupal/modules/trigger/tests/trigger_test.info index 8ce4cfb61..07741077e 100644 --- a/frontend/drupal/modules/trigger/tests/trigger_test.info +++ b/frontend/drupal/modules/trigger/tests/trigger_test.info @@ -4,7 +4,7 @@ package = Testing core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/trigger/trigger.info b/frontend/drupal/modules/trigger/trigger.info index 01a4fd675..406b48178 100644 --- a/frontend/drupal/modules/trigger/trigger.info +++ b/frontend/drupal/modules/trigger/trigger.info @@ -6,7 +6,7 @@ core = 7.x files[] = trigger.test configure = admin/structure/trigger -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/update/tests/aaa_update_test.info b/frontend/drupal/modules/update/tests/aaa_update_test.info index 13c4c9924..83bd43e59 100644 --- a/frontend/drupal/modules/update/tests/aaa_update_test.info +++ b/frontend/drupal/modules/update/tests/aaa_update_test.info @@ -4,7 +4,7 @@ package = Testing core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/update/tests/bbb_update_test.info b/frontend/drupal/modules/update/tests/bbb_update_test.info index ceae19f06..9a6010a74 100644 --- a/frontend/drupal/modules/update/tests/bbb_update_test.info +++ b/frontend/drupal/modules/update/tests/bbb_update_test.info @@ -4,7 +4,7 @@ package = Testing core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/update/tests/ccc_update_test.info b/frontend/drupal/modules/update/tests/ccc_update_test.info index 2043b61ec..8af509fd8 100644 --- a/frontend/drupal/modules/update/tests/ccc_update_test.info +++ b/frontend/drupal/modules/update/tests/ccc_update_test.info @@ -4,7 +4,7 @@ package = Testing core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info b/frontend/drupal/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info index 1845c74dc..17e19ddf5 100644 --- a/frontend/drupal/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info +++ b/frontend/drupal/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info @@ -3,7 +3,7 @@ description = Test theme which is used as admin theme. core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info b/frontend/drupal/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info index c8b25be39..925e9f93e 100644 --- a/frontend/drupal/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info +++ b/frontend/drupal/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info @@ -3,7 +3,7 @@ description = Test theme which acts as a base theme for other test subthemes. core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info b/frontend/drupal/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info index 0bc9c1ef6..5a6a3e8a4 100644 --- a/frontend/drupal/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info +++ b/frontend/drupal/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info @@ -4,7 +4,7 @@ core = 7.x base theme = update_test_basetheme hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/update/tests/update_test.info b/frontend/drupal/modules/update/tests/update_test.info index c8d621144..08901c0c0 100644 --- a/frontend/drupal/modules/update/tests/update_test.info +++ b/frontend/drupal/modules/update/tests/update_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/update/update.info b/frontend/drupal/modules/update/update.info index 9c99e17eb..9424f04b5 100644 --- a/frontend/drupal/modules/update/update.info +++ b/frontend/drupal/modules/update/update.info @@ -6,7 +6,7 @@ core = 7.x files[] = update.test configure = admin/reports/updates/settings -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/user/tests/user_flood_test.info b/frontend/drupal/modules/user/tests/user_flood_test.info new file mode 100644 index 000000000..9b509e521 --- /dev/null +++ b/frontend/drupal/modules/user/tests/user_flood_test.info @@ -0,0 +1,11 @@ +name = "User module flood control tests" +description = "Support module for user flood control testing." +package = Testing +version = VERSION +core = 7.x +hidden = TRUE + +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" +project = "drupal" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/user/tests/user_flood_test.module b/frontend/drupal/modules/user/tests/user_flood_test.module new file mode 100644 index 000000000..f7388690f --- /dev/null +++ b/frontend/drupal/modules/user/tests/user_flood_test.module @@ -0,0 +1,18 @@ + $username, '%ip' => $ip)); + } + else { + watchdog('user_flood_test', 'hook_user_flood_control was passed IP %ip.', array('%ip' => $ip)); + } +} diff --git a/frontend/drupal/modules/user/tests/user_form_test.info b/frontend/drupal/modules/user/tests/user_form_test.info index 46d74ed40..0d07d7de3 100644 --- a/frontend/drupal/modules/user/tests/user_form_test.info +++ b/frontend/drupal/modules/user/tests/user_form_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/user/tests/user_form_test.module b/frontend/drupal/modules/user/tests/user_form_test.module index 382bc57b8..2af15cb83 100644 --- a/frontend/drupal/modules/user/tests/user_form_test.module +++ b/frontend/drupal/modules/user/tests/user_form_test.module @@ -35,7 +35,7 @@ function user_form_test_current_password($form, &$form_state, $account) { '#description' => t('A field that would require a correct password to change.'), '#required' => TRUE, ); - + $form['current_pass'] = array( '#type' => 'password', '#title' => t('Current password'), diff --git a/frontend/drupal/modules/user/tests/user_session_test.info b/frontend/drupal/modules/user/tests/user_session_test.info index 2272808af..b11e20d30 100644 --- a/frontend/drupal/modules/user/tests/user_session_test.info +++ b/frontend/drupal/modules/user/tests/user_session_test.info @@ -5,7 +5,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/user/user.api.php b/frontend/drupal/modules/user/user.api.php index f205a85b5..b9dc95f15 100644 --- a/frontend/drupal/modules/user/user.api.php +++ b/frontend/drupal/modules/user/user.api.php @@ -472,6 +472,36 @@ function hook_user_role_delete($role) { ->execute(); } +/** + * Respond to user flood control events. + * + * This hook allows you act when an unsuccessful user login has triggered + * flood control. This means that either an IP address or a specific user + * account has been temporarily blocked from logging in. + * + * @param $ip + * The IP address that triggered flood control. + * @param $username + * The username that has been temporarily blocked. + * + * @see user_login_final_validate() + */ +function hook_user_flood_control($ip, $username = FALSE) { + if (!empty($username)) { + // Do something with the blocked $username and $ip. For example, send an + // e-mail to the user and/or site administrator. + + // Drupal core uses this hook to log the event: + watchdog('user', 'Flood control blocked login attempt for %user from %ip.', array('%user' => $username, '%ip' => $ip)); + } + else { + // Do something with the blocked $ip. For example, add it to a block-list. + + // Drupal core uses this hook to log the event: + watchdog('user', 'Flood control blocked login attempt from %ip.', array('%ip' => $ip)); + } +} + /** * @} End of "addtogroup hooks". */ diff --git a/frontend/drupal/modules/user/user.info b/frontend/drupal/modules/user/user.info index b03ea1af8..9725fbc89 100644 --- a/frontend/drupal/modules/user/user.info +++ b/frontend/drupal/modules/user/user.info @@ -9,7 +9,7 @@ required = TRUE configure = admin/config/people stylesheets[all][] = user.css -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/modules/user/user.module b/frontend/drupal/modules/user/user.module index 2309aa929..dfa05978c 100644 --- a/frontend/drupal/modules/user/user.module +++ b/frontend/drupal/modules/user/user.module @@ -2225,11 +2225,17 @@ function user_login_final_validate($form, &$form_state) { if (isset($form_state['flood_control_triggered'])) { if ($form_state['flood_control_triggered'] == 'user') { form_set_error('name', format_plural(variable_get('user_failed_login_user_limit', 5), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or request a new password.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.', array('@url' => url('user/password')))); + module_invoke_all('user_flood_control', ip_address(), $form_state['values']['name']); } else { // We did not find a uid, so the limit is IP-based. form_set_error('name', t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or request a new password.', array('@url' => url('user/password')))); + module_invoke_all('user_flood_control', ip_address()); } + // We cannot call drupal_access_denied() here as that can result in an + // infinite loop if the login form is rendered on the 403 page (e.g. in a + // block). So add the 403 header and allow form processing to finish. + drupal_add_http_header('Status', '403 Forbidden'); } else { // Use $form_state['input']['name'] here to guarantee that we send @@ -2247,6 +2253,23 @@ function user_login_final_validate($form, &$form_state) { } } +/** + * Implements hook_user_flood_control(). + */ +function user_user_flood_control($ip, $username = FALSE) { + if (variable_get('log_user_flood_control', TRUE)) { + if (!empty($username)) { + watchdog('user', 'Flood control blocked login attempt for %user from %ip.', array( + '%user' => $username, + '%ip' => $ip + )); + } + else { + watchdog('user', 'Flood control blocked login attempt from %ip.', array('%ip' => $ip)); + } + } +} + /** * Try to validate the user's login credentials locally. * diff --git a/frontend/drupal/modules/user/user.pages.inc b/frontend/drupal/modules/user/user.pages.inc index 2a1b291b1..6f997a62e 100644 --- a/frontend/drupal/modules/user/user.pages.inc +++ b/frontend/drupal/modules/user/user.pages.inc @@ -66,6 +66,22 @@ function user_pass() { * @see user_pass_submit() */ function user_pass_validate($form, &$form_state) { + if (isset($form_state['values']['name']) && !is_scalar($form_state['values']['name'])) { + form_set_error('name', t('An illegal value has been detected. Please contact the site administrator.')); + return; + } + $user_pass_reset_ip_window = variable_get('user_pass_reset_ip_window', 3600); + // Do not allow any password reset from the current user's IP if the limit + // has been reached. Default is 50 attempts allowed in one hour. This is + // independent of the per-user limit to catch attempts from one IP to request + // resets for many different user accounts. We have a reasonably high limit + // since there may be only one apparent IP for all users at an institution. + if (!flood_is_allowed('pass_reset_ip', variable_get('user_pass_reset_ip_limit', 50), $user_pass_reset_ip_window)) { + form_set_error('name', t('Sorry, too many password reset attempts from your IP address. This IP address is temporarily blocked. Try again later or request a new password.', array('@url' => url('user/password')))); + return; + } + // Always register an per-IP event. + flood_register_event('pass_reset_ip', $user_pass_reset_ip_window); $name = trim($form_state['values']['name']); // Try to load by email. $users = user_load_multiple(array(), array('mail' => $name, 'status' => '1')); @@ -76,6 +92,19 @@ function user_pass_validate($form, &$form_state) { $account = reset($users); } if (isset($account->uid)) { + // Register user flood events based on the uid only, so they can be cleared + // when a password is reset successfully. + $identifier = $account->uid; + $user_pass_reset_user_window = variable_get('user_pass_reset_user_window', 21600); + $user_pass_reset_user_limit = variable_get('user_pass_reset_user_limit', 5); + // Don't allow password reset if the limit for this user has been reached. + // Default is to allow 5 passwords resets every 6 hours. + if (!flood_is_allowed('pass_reset_user', $user_pass_reset_user_limit, $user_pass_reset_user_window, $identifier)) { + form_set_error('name', format_plural($user_pass_reset_user_limit, 'Sorry, there has been more than one password reset attempt for this account. It is temporarily blocked. Try again later or login with your password.', 'Sorry, there have been more than @count password reset attempts for this account. It is temporarily blocked. Try again later or login with your password.', array('@url' => url('user/login')))); + return; + } + // Register a per-user event. + flood_register_event('pass_reset_user', $user_pass_reset_user_window, $identifier); form_set_value(array('#parents' => array('account')), $account, $form_state); } else { @@ -161,6 +190,8 @@ function user_pass_reset($form, &$form_state, $uid, $timestamp, $hashed_pass, $a // user_login_finalize() also updates the login timestamp of the // user, which invalidates further use of the one-time login link. user_login_finalize(); + // Clear any password reset flood events for this user. + flood_clear_event('pass_reset_user', $account->uid); watchdog('user', 'User %name used one-time login link at time %timestamp.', array('%name' => $account->name, '%timestamp' => $timestamp)); drupal_set_message(t('You have just used your one-time login link. It is no longer necessary to use this link to log in. Please change your password.')); // Let the user's password be changed without the current password check. diff --git a/frontend/drupal/modules/user/user.test b/frontend/drupal/modules/user/user.test index 835154b25..4c16b531c 100644 --- a/frontend/drupal/modules/user/user.test +++ b/frontend/drupal/modules/user/user.test @@ -322,7 +322,7 @@ class UserLoginTestCase extends DrupalWebTestCase { } function setUp() { - parent::setUp('user_session_test'); + parent::setUp('user_session_test', 'user_flood_test'); } /** @@ -453,12 +453,19 @@ class UserLoginTestCase extends DrupalWebTestCase { $this->drupalPost('user', $edit, t('Log in')); $this->assertNoFieldByXPath("//input[@name='pass' and @value!='']", NULL, 'Password value attribute is blank.'); if (isset($flood_trigger)) { + $this->assertResponse(403); + $user_log = db_query_range('SELECT message FROM {watchdog} WHERE type = :type ORDER BY wid DESC', 0, 1, array(':type' => 'user'))->fetchField(); + $user_flood_test_log = db_query_range('SELECT message FROM {watchdog} WHERE type = :type ORDER BY wid DESC', 0, 1, array(':type' => 'user_flood_test'))->fetchField(); if ($flood_trigger == 'user') { - $this->assertRaw(format_plural(variable_get('user_failed_login_user_limit', 5), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or request a new password.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.', array('@url' => url('user/password')))); + $this->assertRaw(t('Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.', array('@url' => url('user/password'), '@count' => variable_get('user_failed_login_user_limit', 5)))); + $this->assertEqual('Flood control blocked login attempt for %user from %ip.', $user_log, 'A watchdog message was logged for the login attempt blocked by flood control per user'); + $this->assertEqual('hook_user_flood_control was passed username %username and IP %ip.', $user_flood_test_log, 'hook_user_flood_control was invoked by flood control per user'); } else { // No uid, so the limit is IP-based. $this->assertRaw(t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or request a new password.', array('@url' => url('user/password')))); + $this->assertEqual('Flood control blocked login attempt from %ip.', $user_log, 'A watchdog message was logged for the login attempt blocked by flood control per IP'); + $this->assertEqual('hook_user_flood_control was passed IP %ip.', $user_flood_test_log, 'hook_user_flood_control was invoked by flood control per IP'); } } else { @@ -507,6 +514,8 @@ class UserPasswordResetTestCase extends DrupalWebTestCase { $this->drupalPost('user/password', $edit, t('E-mail new password')); // Confirm the password reset. $this->assertText(t('Further instructions have been sent to your e-mail address.'), 'Password reset instructions mailed message displayed.'); + // Ensure that flood control was not triggered. + $this->assertNoText(t('is temporarily blocked. Try again later'), 'Flood control was not triggered by single password reset.'); // Create an image field to enable an Ajax request on the user profile page. $field = array( @@ -552,6 +561,84 @@ class UserPasswordResetTestCase extends DrupalWebTestCase { $this->assertText(t('The changes have been saved.'), 'Forgotten password changed.'); } + /** + * Test user-based flood control on password reset. + */ + function testPasswordResetFloodControlPerUser() { + // Set a very low limit for testing. + variable_set('user_pass_reset_user_limit', 2); + + // Create a user. + $account = $this->drupalCreateUser(); + $this->drupalLogin($account); + $this->drupalLogout(); + + $edit = array('name' => $account->name); + + // Try 2 requests that should not trigger flood control. + for ($i = 0; $i < 2; $i++) { + $this->drupalPost('user/password', $edit, t('E-mail new password')); + // Confirm the password reset. + $this->assertText(t('Further instructions have been sent to your e-mail address.'), 'Password reset instructions mailed message displayed.'); + // Ensure that flood control was not triggered. + $this->assertNoText(t('is temporarily blocked. Try again later'), 'Flood control was not triggered by password reset.'); + } + + // A successful password reset should clear flood events. + $resetURL = $this->getResetURL(); + $this->drupalGet($resetURL); + + // Check successful login. + $this->drupalPost(NULL, NULL, t('Log in')); + $this->drupalLogout(); + + // Try 2 requests that should not trigger flood control. + for ($i = 0; $i < 2; $i++) { + $this->drupalPost('user/password', $edit, t('E-mail new password')); + // Confirm the password reset. + $this->assertText(t('Further instructions have been sent to your e-mail address.'), 'Password reset instructions mailed message displayed.'); + // Ensure that flood control was not triggered. + $this->assertNoText(t('is temporarily blocked. Try again later'), 'Flood control was not triggered by password reset.'); + } + + // The next request should trigger flood control + $this->drupalPost('user/password', $edit, t('E-mail new password')); + // Confirm the password reset was blocked. + $this->assertNoText(t('Further instructions have been sent to your e-mail address.'), 'Password reset instructions mailed message not displayed for excessive password resets.'); + // Ensure that flood control was triggered. + $this->assertText(t('Sorry, there have been more than 2 password reset attempts for this account. It is temporarily blocked.'), 'Flood control was triggered by excessive password resets for one user.'); + } + + /** + * Test IP-based flood control on password reset. + */ + function testPasswordResetFloodControlPerIp() { + // Set a very low limit for testing. + variable_set('user_pass_reset_ip_limit', 2); + + // Try 2 requests that should not trigger flood control. + for ($i = 0; $i < 2; $i++) { + $name = $this->randomName(); + $edit = array('name' => $name); + $this->drupalPost('user/password', $edit, t('E-mail new password')); + // Confirm the password reset was not blocked. Note that @name is used + // instead of %name as assertText() works with plain text not HTML. + $this->assertText(t('Sorry, @name is not recognized as a user name or an e-mail address.', array('@name' => $name)), 'User name not recognized message displayed.'); + // Ensure that flood control was not triggered. + $this->assertNoText(t('is temporarily blocked. Try again later'), 'Flood control was not triggered by password reset.'); + } + + // The next request should trigger flood control + $name = $this->randomName(); + $edit = array('name' => $name); + $this->drupalPost('user/password', $edit, t('E-mail new password')); + // Confirm the password reset was blocked early. Note that @name is used + // instead of %name as assertText() works with plain text not HTML. + $this->assertNoText(t('Sorry, @name is not recognized as a user name or an e-mail address.', array('@name' => $name)), 'User name not recognized message not displayed.'); + // Ensure that flood control was triggered. + $this->assertText(t('Sorry, too many password reset attempts from your IP address. This IP address is temporarily blocked.'), 'Flood control was triggered by excessive password resets from one IP.'); + } + /** * Test user password reset while logged in. */ diff --git a/frontend/drupal/profiles/minimal/minimal.info b/frontend/drupal/profiles/minimal/minimal.info index 755927bff..766002ee1 100644 --- a/frontend/drupal/profiles/minimal/minimal.info +++ b/frontend/drupal/profiles/minimal/minimal.info @@ -5,7 +5,7 @@ core = 7.x dependencies[] = block dependencies[] = dblog -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/profiles/standard/standard.info b/frontend/drupal/profiles/standard/standard.info index 770d84373..423b4db9f 100644 --- a/frontend/drupal/profiles/standard/standard.info +++ b/frontend/drupal/profiles/standard/standard.info @@ -24,7 +24,7 @@ dependencies[] = field_ui dependencies[] = file dependencies[] = rdf -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info b/frontend/drupal/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info index a4b0d1dc4..3e17b7224 100644 --- a/frontend/drupal/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info +++ b/frontend/drupal/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info @@ -6,7 +6,7 @@ core = 7.x hidden = TRUE files[] = drupal_system_listing_compatible_test.test -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info b/frontend/drupal/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info index cbc1f80f5..50af6bfea 100644 --- a/frontend/drupal/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info +++ b/frontend/drupal/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info @@ -8,7 +8,7 @@ version = VERSION core = 6.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/profiles/testing/testing.info b/frontend/drupal/profiles/testing/testing.info index 90652f324..8cda41507 100644 --- a/frontend/drupal/profiles/testing/testing.info +++ b/frontend/drupal/profiles/testing/testing.info @@ -4,7 +4,7 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2020-09-16 -version = "7.73" +; Information added by Drupal.org packaging script on 2020-12-03 +version = "7.77" project = "drupal" -datestamp = "1600272641" +datestamp = "1607003447" diff --git a/frontend/drupal/scripts/run-tests.sh b/frontend/drupal/scripts/run-tests.sh index 8c0be40ef..f5c4a144f 100755 --- a/frontend/drupal/scripts/run-tests.sh +++ b/frontend/drupal/scripts/run-tests.sh @@ -264,6 +264,10 @@ function simpletest_script_init($server_software) { // '_' is an environment variable set by the shell. It contains the command that was executed. $php = $php_env; } + elseif (defined('PHP_BINARY') && $php_env = PHP_BINARY) { + // 'PHP_BINARY' specifies the PHP binary path during script execution. Available since PHP 5.4. + $php = $php_env; + } elseif ($sudo = getenv('SUDO_COMMAND')) { // 'SUDO_COMMAND' is an environment variable set by the sudo program. // Extract only the PHP interpreter, not the rest of the command. diff --git a/frontend/drupal/sites/all/modules/eu_cookie_compliance/eu_cookie_compliance.api.php b/frontend/drupal/sites/all/modules/eu_cookie_compliance/eu_cookie_compliance.api.php index 632052f59..e1651eded 100644 --- a/frontend/drupal/sites/all/modules/eu_cookie_compliance/eu_cookie_compliance.api.php +++ b/frontend/drupal/sites/all/modules/eu_cookie_compliance/eu_cookie_compliance.api.php @@ -24,7 +24,7 @@ * Whether to show the cookie compliance banner. */ function hook_eu_cookie_compliance_geoip_match_alter(&$geoip_match) { - $geoip_match = FALSE; + $geoip_match['in_eu'] = FALSE; } /** diff --git a/frontend/drupal/sites/all/modules/eu_cookie_compliance/eu_cookie_compliance.info b/frontend/drupal/sites/all/modules/eu_cookie_compliance/eu_cookie_compliance.info index 41a823dae..843f9eb71 100644 --- a/frontend/drupal/sites/all/modules/eu_cookie_compliance/eu_cookie_compliance.info +++ b/frontend/drupal/sites/all/modules/eu_cookie_compliance/eu_cookie_compliance.info @@ -4,8 +4,8 @@ core = 7.x configure = admin/config/system/eu-cookie-compliance dependencies[] = ctools -; Information added by Drupal.org packaging script on 2020-10-21 -version = "7.x-1.35" +; Information added by Drupal.org packaging script on 2020-11-28 +version = "7.x-1.36" core = "7.x" project = "eu_cookie_compliance" -datestamp = "1603297775" +datestamp = "1606569905" diff --git a/frontend/drupal/sites/all/modules/prijava_1ka/prijava_1ka.module b/frontend/drupal/sites/all/modules/prijava_1ka/prijava_1ka.module index d8a2ba450..5ec89499c 100644 --- a/frontend/drupal/sites/all/modules/prijava_1ka/prijava_1ka.module +++ b/frontend/drupal/sites/all/modules/prijava_1ka/prijava_1ka.module @@ -25,6 +25,10 @@ function prijava_1ka_block_info() 'info' => t('Prijava z ostalimi (Google, FB, AAI) računi 1ka - modal'), ]; + $blocks['prijava_arnes_aai'] = [ + 'info' => t('ArnesAAI popup - modal'), + ]; + return $blocks; } @@ -225,7 +229,7 @@ function prijava_1ka_block_view($delta = '') $html = ''; // Modul izpišemo samo če uporabnik ni prijavljen if(empty($_COOKIE['unam'])) { - $html = '