diff --git a/www/includes/Date.Vars.inc b/www/includes/Date.Vars.inc
index 1ccc03b1..26774c15 100644
--- a/www/includes/Date.Vars.inc
+++ b/www/includes/Date.Vars.inc
@@ -1,4 +1,4 @@
-
+ 'Mon',
+ 2 => 'Tue',
+ 3 => 'Wed',
+ 4 => 'Thu',
+ 5 => 'Fri',
+ 6 => 'Sat',
+ 7 => 'Sun'
+);
-$day_long[1] = "Monday";
-$day_long[2] = "Tuesday";
-$day_long[3] = "Wednesday";
-$day_long[4] = "Thursday";
-$day_long[5] = "Friday";
-$day_long[6] = "Saturday";
-$day_long[7] = "Sunday";
+$day_long = array (
+ 1 => 'Monday',
+ 2 => 'Tuesday',
+ 3 => 'Wednesday',
+ 4 => 'Thursday',
+ 5 => 'Friday',
+ 6 => 'Saturday',
+ 7 => 'Sunday'
+);
-// monate
-$month_long[1] = "January";
-$month_long[2] = "February";
-$month_long[3] = "March";
-$month_long[4] = "April";
-$month_long[5] = "May";
-$month_long[6] = "June";
-$month_long[7] = "July";
-$month_long[8] = "August";
-$month_long[9] = "September";
-$month_long[10] = "October";
-$month_long[11] = "November";
-$month_long[12] = "December";
+// months
+$month_long = array (
+ 1 => 'January',
+ 2 => 'February',
+ 3 => 'March',
+ 4 => 'April',
+ 5 => 'May',
+ 6 => 'June',
+ 7 => 'July',
+ 8 => 'August',
+ 9 => 'September',
+ 10 => 'October',
+ 11 => 'November',
+ 12 => 'December'
+);
-$month_short[1] = "Jan";
-$month_short[2] = "Feb";
-$month_short[3] = "Mar";
-$month_short[4] = "Apr";
-$month_short[5] = "May";
-$month_short[6] = "Jun";
-$month_short[7] = "Jul";
-$month_short[8] = "Aug";
-$month_short[9] = "Sep";
-$month_short[10] = "Oct";
-$month_short[11] = "Nov";
-$month_short[12] = "Dec";
+$month_short = array (
+ 1 => 'Jan',
+ 2 => 'Feb',
+ 3 => 'Mar',
+ 4 => 'Apr',
+ 5 => 'May',
+ 6 => 'Jun',
+ 7 => 'Jul',
+ 8 => 'Aug',
+ 9 => 'Sep',
+ 10 => 'Oct',
+ 11 => 'Nov',
+ 12 => 'Dec'
+);
+
+// __END__
diff --git a/www/includes/admin_footer.inc b/www/includes/admin_footer.inc
index 997bcfde..81b976b6 100644
--- a/www/includes/admin_footer.inc
+++ b/www/includes/admin_footer.inc
@@ -10,3 +10,5 @@
// print debug messages
echo $login->printErrorMsg();
echo $cms->printErrorMsg();
+
+// __END__
diff --git a/www/includes/admin_header.inc b/www/includes/admin_header.inc
index 1ea4e13a..77fee6a7 100644
--- a/www/includes/admin_header.inc
+++ b/www/includes/admin_header.inc
@@ -94,3 +94,5 @@ if ((TARGET == 'live' || TARGET == 'remote') && !$DEBUG_ALL_OVERRIDE) {
$cms->print_output_all = 0;
}
$cms->DATA['JS_DEBUG'] = DEBUG;
+
+// __END__
diff --git a/www/includes/admin_set_paths.inc b/www/includes/admin_set_paths.inc
index 98bab5ea..14529cc1 100644
--- a/www/includes/admin_set_paths.inc
+++ b/www/includes/admin_set_paths.inc
@@ -144,4 +144,4 @@ if (!file_exists($smarty->getTemplateDir()[0].DS.$TEMPLATE_TRANSLATE)) {
$cms->debug("LANGUAGE", "SL: ".$_SESSION['DEFAULT_CHARSET']." | ".$_SESSION['LANG']." | ".$_SESSION['DEFAULT_LANG']);
$cms->debug("TEMPLATE", "P: ".$smarty->getTemplateDir()[0]);
-# __END__
+// __END__
diff --git a/www/includes/admin_smarty.inc b/www/includes/admin_smarty.inc
index 6731cb06..8aadea69 100644
--- a/www/includes/admin_smarty.inc
+++ b/www/includes/admin_smarty.inc
@@ -101,4 +101,4 @@ if (is_dir(BASE.CACHE)) {
}
$smarty->display($MASTER_TEMPLATE_NAME, $TEMPLATE.$lang, $TEMPLATE.$lang);
-# __END__
+// __END__
diff --git a/www/includes/edit_base.inc b/www/includes/edit_base.inc
index 646e4ef7..a32fd2fd 100644
--- a/www/includes/edit_base.inc
+++ b/www/includes/edit_base.inc
@@ -325,4 +325,4 @@ $smarty->display('edit_body.tpl');
echo $login->printErrorMsg();
echo $form->printErrorMsg();
-# __END__
+// __END__
diff --git a/www/includes/table_arrays/array_edit_access.inc b/www/includes/table_arrays/array_edit_access.inc
index 07269764..9c689a60 100644
--- a/www/includes/table_arrays/array_edit_access.inc
+++ b/www/includes/table_arrays/array_edit_access.inc
@@ -1,4 +1,5 @@
array (
"edit_access_id" => array (
@@ -95,4 +96,4 @@ $edit_access = array (
)
);
-# __END__
+// __END__
diff --git a/www/includes/table_arrays/array_edit_groups.inc b/www/includes/table_arrays/array_edit_groups.inc
index e53d9167..095b1760 100644
--- a/www/includes/table_arrays/array_edit_groups.inc
+++ b/www/includes/table_arrays/array_edit_groups.inc
@@ -1,4 +1,5 @@
array (
"edit_group_id" => array (
@@ -98,4 +99,4 @@ $edit_groups = array (
)
);
-# __END__
+// __END__
diff --git a/www/includes/table_arrays/array_edit_languages.inc b/www/includes/table_arrays/array_edit_languages.inc
index a22f6f55..69fbd011 100644
--- a/www/includes/table_arrays/array_edit_languages.inc
+++ b/www/includes/table_arrays/array_edit_languages.inc
@@ -1,4 +1,5 @@
array (
"edit_language_id" => array (
@@ -71,4 +72,4 @@ $edit_languages=array (
"table_name" => "edit_language"
);
-# __END__
\ No newline at end of file
+// __END__
diff --git a/www/includes/table_arrays/array_edit_menu_group.inc b/www/includes/table_arrays/array_edit_menu_group.inc
index a5e125df..e128ca01 100644
--- a/www/includes/table_arrays/array_edit_menu_group.inc
+++ b/www/includes/table_arrays/array_edit_menu_group.inc
@@ -1,4 +1,5 @@
array (
"edit_menu_group_id" => array (
@@ -36,4 +37,4 @@ $edit_menu_group = array (
)
);
-# __END__
+// __END__
diff --git a/www/includes/table_arrays/array_edit_pages.inc b/www/includes/table_arrays/array_edit_pages.inc
index fbf6cd8a..59b3eecd 100644
--- a/www/includes/table_arrays/array_edit_pages.inc
+++ b/www/includes/table_arrays/array_edit_pages.inc
@@ -1,4 +1,5 @@
array (
"edit_page_id" => array (
@@ -176,4 +177,4 @@ $edit_pages = array (
) // element list
);
-# __END__
+// __END__
diff --git a/www/includes/table_arrays/array_edit_schemes.inc b/www/includes/table_arrays/array_edit_schemes.inc
index 7e523148..d49f9154 100644
--- a/www/includes/table_arrays/array_edit_schemes.inc
+++ b/www/includes/table_arrays/array_edit_schemes.inc
@@ -1,4 +1,5 @@
array (
"edit_scheme_id" => array (
@@ -53,4 +54,4 @@ $edit_schemes = array (
)
); // main array
-# __END__
+// __END__
diff --git a/www/includes/table_arrays/array_edit_users.inc b/www/includes/table_arrays/array_edit_users.inc
index fbfc32fa..1c0bd35b 100644
--- a/www/includes/table_arrays/array_edit_users.inc
+++ b/www/includes/table_arrays/array_edit_users.inc
@@ -1,4 +1,5 @@
array (
"edit_user_id" => array (
@@ -257,4 +258,4 @@ $edit_users = array (
)
);
-# __END__
+// __END__
diff --git a/www/includes/table_arrays/array_edit_visible_group.inc b/www/includes/table_arrays/array_edit_visible_group.inc
index 946c7a24..5b812276 100644
--- a/www/includes/table_arrays/array_edit_visible_group.inc
+++ b/www/includes/table_arrays/array_edit_visible_group.inc
@@ -1,4 +1,5 @@
array (
"edit_visible_group_id" => array (
@@ -29,4 +30,4 @@ $edit_visible_group = array (
)
);
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/ACL/Login.inc b/www/lib/CoreLibs/ACL/Login.inc
index 9f614e17..a49c69db 100644
--- a/www/lib/CoreLibs/ACL/Login.inc
+++ b/www/lib/CoreLibs/ACL/Login.inc
@@ -1192,4 +1192,4 @@ EOM;
}
} // close class
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/Admin/Backend.inc b/www/lib/CoreLibs/Admin/Backend.inc
index d0dae6a9..6702ef22 100644
--- a/www/lib/CoreLibs/Admin/Backend.inc
+++ b/www/lib/CoreLibs/Admin/Backend.inc
@@ -359,4 +359,4 @@ class Backend extends \CoreLibs\DB\IO
}
}
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/Basic.inc b/www/lib/CoreLibs/Basic.inc
index f410b6a5..cf94efc6 100644
--- a/www/lib/CoreLibs/Basic.inc
+++ b/www/lib/CoreLibs/Basic.inc
@@ -419,6 +419,7 @@ class Basic
{
unset($string);
list($major, $minor, $patchlvl) = explode(".", $this->class_info[$class_name]["class_version"]);
+ $string = '';
$string .= "-Class-info-[".$class_name."]-> Class Name: ".$this->class_info[$class_name]["class_name"]."
";
$string .= "-Class-info-[".$class_name."]-> Class Author: ".$this->class_info[$class_name]["class_author"]."
";
$string .= "-Class-info-[".$class_name."]-> Class Version: ".$this->class_info[$class_name]["class_version"]."
";
@@ -1196,6 +1197,7 @@ class Basic
$pos = 0;
$split = 36; // after 36 single bytes characters, if then comes MB, it is broken
// has to 2 x 36 < 74 so the mb_encode_mimeheader 74 hardcoded split does not get triggered
+ $_string = '';
while ($pos < mb_strlen($string, $encoding)) {
$output = mb_strimwidth($string, $pos, $split, "", $encoding);
$pos += mb_strlen($output, $encoding);
@@ -1786,6 +1788,7 @@ class Basic
}
// max should be 63 for this case
$max_rand = count($chars) - 1;
+ $salt_string = '';
// create the salt part
for ($i = 1; $i <= $nSize; $i ++) {
$salt_string .= $chars[mt_rand(0, $max_rand)];
@@ -2490,4 +2493,4 @@ class Basic
}
}
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/DB/Extended/ArrayIO.inc b/www/lib/CoreLibs/DB/Extended/ArrayIO.inc
index 4e87f729..3c64c4cf 100644
--- a/www/lib/CoreLibs/DB/Extended/ArrayIO.inc
+++ b/www/lib/CoreLibs/DB/Extended/ArrayIO.inc
@@ -133,6 +133,7 @@ class ArrayIO extends \CoreLibs\DB\IO
public function dbDumpArray($write = 0)
{
reset($this->table_array);
+ $string = '';
foreach ($this->table_array as $column => $data_array) {
$string .= "".$column." -> ".$data_array["value"]."
";
}
@@ -200,20 +201,21 @@ class ArrayIO extends \CoreLibs\DB\IO
$q .= $this->pk_name." = ".$this->table_array[$this->pk_name]["value"]." ";
// delete files and build FK query
reset($this->table_array);
+ $q_where = '';
foreach ($this->table_array as $column => $data_array) {
// suchen nach bildern und lschen ...
if ($this->table_array[$column]["file"] && file_exists($this->table_array[$column]["url"].$this->table_array[$column]["value"])) {
if (file_exists($this->table_array[$column]["path"].$this->table_array[$column]["value"])) {
unlink($this->table_array[$column]["path"].$this->table_array[$column]["value"]);
}
- $dateiname = str_replace("_tn", "", $this->table_array[$column]["value"]);
- if (file_exists($this->table_array[$column]["path"].$dateiname)) {
- unlink($this->table_array[$column]["path"].$dateiname);
+ $file_name = str_replace("_tn", "", $this->table_array[$column]["value"]);
+ if (file_exists($this->table_array[$column]["path"].$file_name)) {
+ unlink($this->table_array[$column]["path"].$file_name);
}
}
-
+ // if we have a foreign key
if ($this->table_array[$column]["fk"]) {
- // zusammenstellen der FKs
+ // create FK constraint checks
if ($q_where) {
$q_where .= " AND ";
}
@@ -251,6 +253,8 @@ class ArrayIO extends \CoreLibs\DB\IO
return $this->table_array;
}
reset($this->table_array);
+ $q_select = '';
+ $q_where = '';
// create select part & addition FK part
foreach ($this->table_array as $column => $data_array) {
if ($q_select) {
@@ -326,6 +330,9 @@ class ArrayIO extends \CoreLibs\DB\IO
}
reset($this->table_array);
+ $q_data = '';
+ $q_vars = '';
+ $q_where = '';
foreach ($this->table_array as $column => $data_array) {
/********************************* START FILE *************************************/
// file upload
@@ -338,9 +345,9 @@ class ArrayIO extends \CoreLibs\DB\IO
if (file_exists($this->table_array[$column]["path"].$this->table_array[$column]["value"])) {
unlink($this->table_array[$column]["path"].$this->table_array[$column]["value"]);
}
- $dateiname = str_replace("_tn", "", $this->table_array[$column]["value"]);
- if (file_exists($this->table_array[$column]["path"].$dateiname)) {
- unlink($this->table_array[$column]["path"].$dateiname);
+ $file_name = str_replace("_tn", "", $this->table_array[$column]["value"]);
+ if (file_exists($this->table_array[$column]["path"].$file_name)) {
+ unlink($this->table_array[$column]["path"].$file_name);
}
$this->table_array[$column]["value"] = "";
} else {
@@ -355,20 +362,19 @@ class ArrayIO extends \CoreLibs\DB\IO
$ext = end($filename_parts);
array_splice($filename_parts, -1, 1);
$name = str_replace(" ", "_", implode(".", $filename_parts));
- //echo "PK: $pk_ids_file
";
- $dateiname = $name.$pk_ids_file.".".$ext;
- //echo "Dn: $dateiname";
- copy($this->table_array[$column]["tmp"], $this->table_array[$column]["path"].$dateiname);
+ $file_name = $name.".".$ext;
+ //echo "Dn: $file_name";
+ copy($this->table_array[$column]["tmp"], $this->table_array[$column]["path"].$file_name);
// automatisch thumbnail generieren, geht nur mit convert (ImageMagic!!!), aber nur bei bild ..
if (strtolower($ext) == "jpeg" || strtolower($ext) == "jpg" || strtolower($ext) == "gif" || strtolower($ext) == "png") {
- $dateiname_tn = $name.$pk_ids_file."_tn.".$ext;
- $eingang = $this->table_array[$column]["path"].$dateiname;
- $ausgang = $this->table_array[$column]["path"].$dateiname_tn;
+ $file_name_tn = $name."_tn.".$ext;
+ $eingang = $this->table_array[$column]["path"].$file_name;
+ $ausgang = $this->table_array[$column]["path"].$file_name_tn;
$com = "convert -geometry 115 $eingang $ausgang";
exec($com);
- $this->table_array[$column]["value"] = $dateiname_tn;
+ $this->table_array[$column]["value"] = $file_name_tn;
} else {
- $this->table_array[$column]["value"] = $dateiname;
+ $this->table_array[$column]["value"] = $file_name;
}
} elseif (file_exists($this->table_array[$column]["path"].$this->table_array[$column]["value"])) {
// mach gar nix, wenn bild schon da ???
@@ -546,4 +552,4 @@ class ArrayIO extends \CoreLibs\DB\IO
}
} // end of class
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/DB/IO.inc b/www/lib/CoreLibs/DB/IO.inc
index 26dca161..d87cda1d 100644
--- a/www/lib/CoreLibs/DB/IO.inc
+++ b/www/lib/CoreLibs/DB/IO.inc
@@ -511,6 +511,7 @@ class IO extends \CoreLibs\Basic
// NOTE : used in db_dump_data only
private function __printArray($array)
{
+ $string = '';
foreach ($array as $key => $value) {
$string .= $this->nbsp.''.$key.' => ';
if (is_array($value)) {
@@ -977,6 +978,7 @@ class IO extends \CoreLibs\Basic
} else {
$array = $this->cursor_ext;
}
+ $string = '';
if (is_array($array)) {
$this->nbps = '';
$string .= $this->__printArray($array);
@@ -1816,6 +1818,7 @@ class IO extends \CoreLibs\Basic
// DESC : this is only needed for Postgresql. Converts postgresql arrays to PHP
public function dbArrayParse($text)
{
+ $output = array ();
return $this->db_functions->__dbArrayParse($text, $output);
}
diff --git a/www/lib/CoreLibs/DB/SQL/PgSQL.inc b/www/lib/CoreLibs/DB/SQL/PgSQL.inc
index 6ff2e3f8..bc648c42 100644
--- a/www/lib/CoreLibs/DB/SQL/PgSQL.inc
+++ b/www/lib/CoreLibs/DB/SQL/PgSQL.inc
@@ -148,7 +148,7 @@ class PgSQL
{
$result = pg_execute($this->dbh, $name, $data);
if (!$result) {
- $this->last_error_query = $query;
+ $this->last_error_query = $name;
}
return $result;
}
@@ -428,4 +428,4 @@ class PgSQL
}
}
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/Language/Core/CachedFileReader.inc b/www/lib/CoreLibs/Language/Core/CachedFileReader.inc
index a2245e5e..485d6e13 100755
--- a/www/lib/CoreLibs/Language/Core/CachedFileReader.inc
+++ b/www/lib/CoreLibs/Language/Core/CachedFileReader.inc
@@ -45,4 +45,4 @@ class CachedFileReader extends CoreLibs\Language\Core\StringReader
}
}
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/Language/Core/FileReader.inc b/www/lib/CoreLibs/Language/Core/FileReader.inc
index bfbdba78..18ee1193 100755
--- a/www/lib/CoreLibs/Language/Core/FileReader.inc
+++ b/www/lib/CoreLibs/Language/Core/FileReader.inc
@@ -88,4 +88,4 @@ class FileReader
}
}
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/Language/Core/GetTextReader.inc b/www/lib/CoreLibs/Language/Core/GetTextReader.inc
index beca2118..8ea50166 100755
--- a/www/lib/CoreLibs/Language/Core/GetTextReader.inc
+++ b/www/lib/CoreLibs/Language/Core/GetTextReader.inc
@@ -146,8 +146,8 @@ class GetTextReader
private function load_tables()
{
if (is_array($this->cache_translations) &&
- is_array($this->table_originals) &&
- is_array($this->table_translations)) {
+ is_array($this->table_originals) &&
+ is_array($this->table_translations)) {
return;
}
@@ -457,4 +457,4 @@ class GetTextReader
}
}
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/Language/Core/StreamReader.inc b/www/lib/CoreLibs/Language/Core/StreamReader.inc
index 805db260..c6382222 100755
--- a/www/lib/CoreLibs/Language/Core/StreamReader.inc
+++ b/www/lib/CoreLibs/Language/Core/StreamReader.inc
@@ -51,4 +51,4 @@ class StreamReader
}
}
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/Language/Core/StringReader.inc b/www/lib/CoreLibs/Language/Core/StringReader.inc
index e1c63818..606618fc 100755
--- a/www/lib/CoreLibs/Language/Core/StringReader.inc
+++ b/www/lib/CoreLibs/Language/Core/StringReader.inc
@@ -64,4 +64,4 @@ class StringReader
}
}
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/Output/Form/Generate.inc b/www/lib/CoreLibs/Output/Form/Generate.inc
index 2d0f342c..a99aeef8 100644
--- a/www/lib/CoreLibs/Output/Form/Generate.inc
+++ b/www/lib/CoreLibs/Output/Form/Generate.inc
@@ -323,7 +323,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
$this->table_array = array ();
}
reset($this->table_array);
- $string .= "TABLE ARRAY DUMP: ".$this->table_name."
";
+ $string = "TABLE ARRAY DUMP: ".$this->table_name."
";
foreach ($this->table_array as $key => $value) {
$string .= "$key: ".$value["value"]."
";
}
@@ -557,7 +557,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
if ($res[$this->int_pk_name] == $this->table_array[$this->int_pk_name]["value"]) {
$pk_selected = $res[$this->int_pk_name];
}
- unset($t_string);
+ $t_string = '';
for ($i = 0, $i_max = count($this->field_array); $i < $i_max; $i ++) {
if ($t_string) {
$t_string .= ", ";
@@ -1013,7 +1013,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
}
// do optional error checks like for normal fields
// currently active: unique/alphanumeric
- if ($data_rray['error_check']) {
+ if ($data_array['error_check']) {
foreach (explode('|', $value["error_check"]) as $error_check) {
switch ($error_check) {
// check unique, check if field in table is not yet exist
@@ -1314,6 +1314,9 @@ 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]) {
@@ -1718,4 +1721,4 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
}
} // end of class
-# __END__
+// __END__
diff --git a/www/lib/CoreLibs/Output/Progressbar.inc b/www/lib/CoreLibs/Output/Progressbar.inc
index c8ce3f7d..2cc39ff7 100644
--- a/www/lib/CoreLibs/Output/Progressbar.inc
+++ b/www/lib/CoreLibs/Output/Progressbar.inc
@@ -527,7 +527,7 @@ class ProgressBar
case 'percent':
// only one inner percent
// print "STYLE[$name]: ".$style_lbl."
";
- if (!$html_percent) {
+ if (!isset($html_percent)) {
$html_percent = '