diff --git a/www/admin/edit_groups_test.php b/www/admin/edit_groups_test.php new file mode 100644 index 00000000..e69de29b diff --git a/www/includes/admin_header.inc b/www/includes/admin_header.inc index 77fee6a7..06974972 100644 --- a/www/includes/admin_header.inc +++ b/www/includes/admin_header.inc @@ -10,7 +10,7 @@ //------------------------------ variable init start // for dev test we set full error reporting; writes everything, except E_ERROR into logs/php_error-.log if ($DEBUG_ALL && $ENABLE_ERROR_HANDLING) { - include(BASE.LIBS."Error.Handling.inc"); + include BASE.LIBS."Error.Handling.inc"; } // predefine vars $lang = ''; diff --git a/www/layout/admin/default/javascript/edit.js b/www/layout/admin/default/javascript/edit.js index 8e1917ac..d9729a42 100644 --- a/www/layout/admin/default/javascript/edit.js +++ b/www/layout/admin/default/javascript/edit.js @@ -1,30 +1,15 @@ -/* - code is taken and adapted from dokuwiki -*/ +/* general edit javascript */ /* jshint esversion: 6 */ -/** - * Some browser detection - */ -var clientPC = navigator.userAgent.toLowerCase(); // Get client info -var is_gecko = ((clientPC.indexOf('gecko') != -1) && (clientPC.indexOf('spoofer') == -1) && - (clientPC.indexOf('khtml') == -1) && (clientPC.indexOf('netscape/7.0') == -1)); -var is_safari = ((clientPC.indexOf('AppleWebKit') != -1) && (clientPC.indexOf('spoofer') == -1)); -var is_khtml = (navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled )); -if (clientPC.indexOf('opera') != -1) { - var is_opera = true; - var is_opera_preseven = (window.opera && !document.childNodes); - var is_opera_seven = (window.opera && document.childNodes); -} // debug set -var FRONTEND_DEBUG = false; +/*var FRONTEND_DEBUG = false; var DEBUG = true; if (!DEBUG) { $($H(window.console)).each(function(w) { window.console[w.key] = function() {}; }); -} +}*/ // METHOD: pop // PARAMS: url, window name, features diff --git a/www/layout/admin/default/javascript/firebug.js b/www/layout/admin/default/javascript/firebug.js index 9c975f19..27a5ca27 100644 --- a/www/layout/admin/default/javascript/firebug.js +++ b/www/layout/admin/default/javascript/firebug.js @@ -3,14 +3,14 @@ * firebug 1.2+ and the webkit console */ var ConsoleSetup = function() { - if (!window.console) - window.console = {}; + if (!window.console) + window.console = {}; - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; + var names = ['log', 'debug', 'info', 'warn', 'error', 'assert', 'dir', 'dirxml', 'group', 'groupEnd', 'time', 'timeEnd', 'count', 'trace', 'profile', 'profileEnd']; - for (var i = 0; i < names.length; ++i) { - if (!window.console[names[i]]) { - window.console[names[i]] = function() {}; - } - } + for (var i = 0; i < names.length; ++i) { + if (!window.console[names[i]]) { + window.console[names[i]] = function() {}; + } + } }(); diff --git a/www/lib/CoreLibs/Language/L10n.inc b/www/lib/CoreLibs/Language/L10n.inc index 6475a49c..9e21700d 100644 --- a/www/lib/CoreLibs/Language/L10n.inc +++ b/www/lib/CoreLibs/Language/L10n.inc @@ -63,6 +63,7 @@ class L10n extends \CoreLibs\Basic // reloads the mofile, if the location of the lang file changes public function l10nReloadMOfile($lang, $path = DEFAULT_TEMPLATE) { + $success = false; $old_mofile = $this->mofile; $old_lang = $this->lang; @@ -80,11 +81,14 @@ class L10n extends \CoreLibs\Basic if (is_readable($this->mofile)) { $this->input = new FileReader($this->mofile); $this->l10n = new GetTextReader($this->input); + // we successfully loaded + $success = true; } else { // else fall back to the old ones $this->mofile = $old_mofile; $this->lang = $old_lang; } + return $success; } public function __($text) diff --git a/www/lib/CoreLibs/Output/Form/Generate.inc b/www/lib/CoreLibs/Output/Form/Generate.inc index a99aeef8..481fab36 100644 --- a/www/lib/CoreLibs/Output/Form/Generate.inc +++ b/www/lib/CoreLibs/Output/Form/Generate.inc @@ -1294,6 +1294,10 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO } reset($this->element_list); foreach ($this->element_list as $table_name => $reference_array) { + // init arrays + $q_names = array (); + $q_data = array (); + $q_values = array (); // get the number of keys from the elements array $keys = array_keys($reference_array["elements"]); // element prefix name @@ -1314,9 +1318,6 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO // go through all submitted data // for ($i = 0; $i < count($_POST[$el_name]); $i ++) for ($i = 0; $i < $max; $i ++) { - $q_data[$i] = ''; - $q_names[$i] = ''; - $q_values[$i] = ''; // if we have enable name & delete set, then only insert/update those which are flagged as active // check if mandatory field is set, if not set "do not write flag" if ($data_array["mandatory"] && !$_POST[$prfx.$el_name][$i]) { @@ -1355,7 +1356,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO $q_data[$i] .= ", "; } // insert name part list - if ($q_names[$i]) { + if (strlen($q_names[$i])) { $q_names[$i] .= ", "; } // insert value part list