diff --git a/4dev/bin/create_mo.sh b/4dev/bin/create_mo.sh index 2d3f8818..29d2f639 100755 --- a/4dev/bin/create_mo.sh +++ b/4dev/bin/create_mo.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash -base_folder='/var/www/html/developers/clemens/core_data/php_libraries/trunk/www/'; +BASE_FOLDER=$(dirname $(readlink -f $0))"/"; +# Assume script is in 4dev/bin +base_folder="${BASE_FOLDER}../../www/"; # locale gettext po to mo translator master for file in $(ls -1 ${base_folder}../4dev/locale/*.po); do diff --git a/www/includes/edit_base.php b/www/includes/edit_base.php index 60e0718d..19a37789 100644 --- a/www/includes/edit_base.php +++ b/www/includes/edit_base.php @@ -457,6 +457,8 @@ if ($form->my_page_name == 'edit_order') { $pathinfo = pathinfo($output_file); if (!empty($pathinfo['dirname'])) { $pathinfo['dirname'] .= DIRECTORY_SEPARATOR; + } else { + $pathinfo['dirname'] = ''; } if ($t_q) { $t_q .= ', '; diff --git a/www/layout/admin/javascript/edit.jq.js b/www/layout/admin/javascript/edit.jq.js index c8b4a508..0e7a4f22 100644 --- a/www/layout/admin/javascript/edit.jq.js +++ b/www/layout/admin/javascript/edit.jq.js @@ -1387,6 +1387,8 @@ function createNavMenu(nav_menu, header_id = 'mainHeader') // eslint-disable-lin } }); $('#menuRow').html(content.join('')); + } else { + $('#menuRow').hide(); } } diff --git a/www/lib/CoreLibs/Basic.php b/www/lib/CoreLibs/Basic.php index c9ce4dd9..c902bde5 100644 --- a/www/lib/CoreLibs/Basic.php +++ b/www/lib/CoreLibs/Basic.php @@ -66,7 +66,7 @@ class Basic // logging interface, Debug\Logging class /** @var \CoreLibs\Debug\Logging */ public $log; - /** @var\CoreLibs\Create\Session */ + /** @var \CoreLibs\Create\Session */ public $session; // email valid checks diff --git a/www/lib/CoreLibs/Combined/DateTime.php b/www/lib/CoreLibs/Combined/DateTime.php index 56db0dba..018cf2bb 100644 --- a/www/lib/CoreLibs/Combined/DateTime.php +++ b/www/lib/CoreLibs/Combined/DateTime.php @@ -312,16 +312,17 @@ class DateTime } /** - * plits & checks date, wrap around for check_date function - * returns int in: - * -1 if the first date is smaller the last - * 0 if both are equal - * 1 if the first date is bigger than the last - * false (bool): error + * compares two dates, tries to convert them via strtotime to timestamps + * returns int/bool in: + * -1 if the first date is smaller the last + * 0 if both are equal + * 1 if the first date is bigger than the last + * false if date validation/conversion failed * * @param string $start_date start date string in YYYY-MM-DD * @param string $end_date end date string in YYYY-MM-DD - * @return int|bool false on error, or int -1/0/1 as difference + * @return int|bool false on error + * or int -1 (se) as difference */ public static function compareDate($start_date, $end_date) { @@ -354,16 +355,17 @@ class DateTime /** * compares the two dates + times. if seconds missing in one set, - * add :00, converts / to - + * adds :00, converts date + times via strtotime to timestamps * returns int/bool in: - * -1 if the first date is smaller the last - * 0 if both are equal - * 1 if the first date is bigger than the last - * false if no valid date/times chould be found + * -1 if the first date is smaller the last + * 0 if both are equal + * 1 if the first date is bigger than the last + * false if date/times validation/conversion failed * * @param string $start_datetime start date/time in YYYY-MM-DD HH:mm:ss * @param string $end_datetime end date/time in YYYY-MM-DD HH:mm:ss - * @return int|bool false for error or -1/0/1 as difference + * @return int|bool false for error + * or -1 (se) as difference */ public static function compareDateTime($start_datetime, $end_datetime) { diff --git a/www/lib/CoreLibs/DB/SQL/PgSQL.php b/www/lib/CoreLibs/DB/SQL/PgSQL.php index 36550c9c..d64ffc46 100644 --- a/www/lib/CoreLibs/DB/SQL/PgSQL.php +++ b/www/lib/CoreLibs/DB/SQL/PgSQL.php @@ -779,7 +779,6 @@ class PgSQL implements \CoreLibs\DB\SQL\SqlInterface\SqlFunctions } // get result $db_schema = $this->__dbFetchArray($cursor, PGSQL_ASSOC); - /** @phpstan-ignore-next-line Cannot access offset string on array|bool */ return $db_schema[$show_string] ?? ''; } @@ -806,7 +805,6 @@ class PgSQL implements \CoreLibs\DB\SQL\SqlInterface\SqlFunctions } // check if schema does not exists $row = $this->__dbFetchArray($cursor, PGSQL_ASSOC); - /** @phpstan-ignore-next-line */ if (empty($row['exists']) || $row['exists'] == 'f') { return 2; }