Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d47f525480 |
0
www/admin/edit_groups_test.php
Normal file
0
www/admin/edit_groups_test.php
Normal file
@@ -10,7 +10,7 @@
|
||||
//------------------------------ variable init start
|
||||
// for dev test we set full error reporting; writes everything, except E_ERROR into logs/php_error-<day>.log
|
||||
if ($DEBUG_ALL && $ENABLE_ERROR_HANDLING) {
|
||||
include(BASE.LIBS."Error.Handling.inc");
|
||||
include BASE.LIBS."Error.Handling.inc";
|
||||
}
|
||||
// predefine vars
|
||||
$lang = '';
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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() {};
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user