From d9ad041c47c1e0f303ec79642da0e5cd6a593663 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Fri, 13 Sep 2019 15:47:37 +0900 Subject: [PATCH] Renamed all .inc PHP files to .php and replaced all .inc calls Because .inc style is deprecated and also dangerious as often not setup correctly on the server all .inc files have been renamed to .php files. All internall calls have been udpated. --- .phan/config.php | 81 +++++++++++++++++++ www/admin/class_test.php | 1 - www/admin/edit_access.php | 2 +- www/admin/edit_groups.php | 2 +- www/admin/edit_languages.php | 2 +- www/admin/edit_menu_group.php | 2 +- www/admin/edit_order.php | 2 +- www/admin/edit_pages.php | 2 +- www/admin/edit_schemes.php | 2 +- www/admin/edit_users.php | 2 +- www/admin/edit_visible_group.php | 2 +- www/admin/error_test.php | 4 +- www/admin/namespace_test.php | 2 - www/admin/qq_file_upload_ajax.php | 2 + www/admin/smarty_test.php | 8 +- www/admin/various_class_test.php | 4 +- www/configs/{config.db.inc => config.db.php} | 0 .../{config.host.inc => config.host.php} | 0 www/configs/{config.inc => config.master.php} | 12 +-- .../{config.path.inc => config.path.php} | 0 www/configs/config.php | 4 +- www/includes/{Date.Vars.inc => Date.Vars.php} | 0 .../{admin_footer.inc => admin_footer.php} | 0 .../{admin_header.inc => admin_header.php} | 2 +- ...dmin_set_paths.inc => admin_set_paths.php} | 2 +- .../{admin_smarty.inc => admin_smarty.php} | 0 www/includes/{edit_base.inc => edit_base.php} | 0 ..._edit_access.inc => array_edit_access.php} | 0 ..._edit_groups.inc => array_edit_groups.php} | 0 ...languages.inc => array_edit_languages.php} | 0 ...nu_group.inc => array_edit_menu_group.php} | 0 ...ay_edit_pages.inc => array_edit_pages.php} | 0 ...dit_schemes.inc => array_edit_schemes.php} | 0 ...ay_edit_users.inc => array_edit_users.php} | 0 ...group.inc => array_edit_visible_group.php} | 0 www/lib/CoreLibs/ACL/{Login.inc => Login.php} | 9 +-- .../Admin/{Backend.inc => Backend.php} | 8 -- www/lib/CoreLibs/{Basic.inc => Basic.php} | 40 ++------- .../DB/Extended/{ArrayIO.inc => ArrayIO.php} | 8 -- www/lib/CoreLibs/DB/{IO.inc => IO.php} | 7 -- .../CoreLibs/DB/SQL/{PgSQL.inc => PgSQL.php} | 0 ...hedFileReader.inc => CachedFileReader.php} | 0 .../Core/{FileReader.inc => FileReader.php} | 0 .../{GetTextReader.inc => GetTextReader.php} | 0 .../{StreamReader.inc => StreamReader.php} | 0 .../{StringReader.inc => StringReader.php} | 0 .../CoreLibs/Language/{L10n.inc => L10n.php} | 0 .../Form/{Generate.inc => Generate.php} | 18 ++--- .../{Progressbar.inc => Progressbar.php} | 0 .../{SmartyExtend.inc => SmartyExtend.php} | 0 ...{Error.Handling.inc => Error.Handling.php} | 0 ...dedFileForm.inc => qqUploadedFileForm.php} | 0 ...oadedFileXhr.inc => qqUploadedFileXhr.php} | 0 ...{qqFileUploader.inc => qqFileUploader.php} | 0 www/lib/autoloader.php | 2 +- 55 files changed, 124 insertions(+), 108 deletions(-) create mode 100644 .phan/config.php rename www/configs/{config.db.inc => config.db.php} (100%) rename www/configs/{config.host.inc => config.host.php} (100%) rename www/configs/{config.inc => config.master.php} (96%) rename www/configs/{config.path.inc => config.path.php} (100%) rename www/includes/{Date.Vars.inc => Date.Vars.php} (100%) rename www/includes/{admin_footer.inc => admin_footer.php} (100%) rename www/includes/{admin_header.inc => admin_header.php} (98%) rename www/includes/{admin_set_paths.inc => admin_set_paths.php} (98%) rename www/includes/{admin_smarty.inc => admin_smarty.php} (100%) rename www/includes/{edit_base.inc => edit_base.php} (100%) rename www/includes/table_arrays/{array_edit_access.inc => array_edit_access.php} (100%) rename www/includes/table_arrays/{array_edit_groups.inc => array_edit_groups.php} (100%) rename www/includes/table_arrays/{array_edit_languages.inc => array_edit_languages.php} (100%) rename www/includes/table_arrays/{array_edit_menu_group.inc => array_edit_menu_group.php} (100%) rename www/includes/table_arrays/{array_edit_pages.inc => array_edit_pages.php} (100%) rename www/includes/table_arrays/{array_edit_schemes.inc => array_edit_schemes.php} (100%) rename www/includes/table_arrays/{array_edit_users.inc => array_edit_users.php} (100%) rename www/includes/table_arrays/{array_edit_visible_group.inc => array_edit_visible_group.php} (100%) rename www/lib/CoreLibs/ACL/{Login.inc => Login.php} (99%) rename www/lib/CoreLibs/Admin/{Backend.inc => Backend.php} (98%) rename www/lib/CoreLibs/{Basic.inc => Basic.php} (98%) rename www/lib/CoreLibs/DB/Extended/{ArrayIO.inc => ArrayIO.php} (98%) rename www/lib/CoreLibs/DB/{IO.inc => IO.php} (99%) rename www/lib/CoreLibs/DB/SQL/{PgSQL.inc => PgSQL.php} (100%) rename www/lib/CoreLibs/Language/Core/{CachedFileReader.inc => CachedFileReader.php} (100%) rename www/lib/CoreLibs/Language/Core/{FileReader.inc => FileReader.php} (100%) rename www/lib/CoreLibs/Language/Core/{GetTextReader.inc => GetTextReader.php} (100%) rename www/lib/CoreLibs/Language/Core/{StreamReader.inc => StreamReader.php} (100%) rename www/lib/CoreLibs/Language/Core/{StringReader.inc => StringReader.php} (100%) rename www/lib/CoreLibs/Language/{L10n.inc => L10n.php} (100%) rename www/lib/CoreLibs/Output/Form/{Generate.inc => Generate.php} (99%) rename www/lib/CoreLibs/Output/{Progressbar.inc => Progressbar.php} (100%) rename www/lib/CoreLibs/Template/{SmartyExtend.inc => SmartyExtend.php} (100%) rename www/lib/{Error.Handling.inc => Error.Handling.php} (100%) rename www/lib/FileUpload/Core/{qqUploadedFileForm.inc => qqUploadedFileForm.php} (100%) rename www/lib/FileUpload/Core/{qqUploadedFileXhr.inc => qqUploadedFileXhr.php} (100%) rename www/lib/FileUpload/{qqFileUploader.inc => qqFileUploader.php} (100%) diff --git a/.phan/config.php b/.phan/config.php new file mode 100644 index 00000000..ba999272 --- /dev/null +++ b/.phan/config.php @@ -0,0 +1,81 @@ + true, + + // Allow null to be cast as any type and for any + // type to be cast to null. + "null_casts_as_any_type" => true, + + // Backwards Compatibility Checking + 'backward_compatibility_checks' => false, + + // Run a quick version of checks that takes less + // time + "quick_mode" => false, + + // Only emit critical issues to start with + // (0 is low severity, 5 is normal severity, 10 is critical) + "minimum_severity" => 10, + + // A list of directories that should be parsed for class and + // method information. After excluding the directories + // defined in exclude_analysis_directory_list, the remaining + // files will be statically analyzed for errors. + // + // Thus, both first-party and third-party code being used by + // your application should be included in this list. + 'directory_list' => [ + // Change this to include the folders you wish to analyze + // (and the folders of their dependencies) + 'www', + // To speed up analysis, we recommend going back later and + // limiting this to only the vendor/ subdirectories your + // project depends on. + // `phan --init` will generate a list of folders for you + //'www/vendor', + ], + + // A list of directories holding code that we want + // to parse, but not analyze + "exclude_analysis_directory_list" => [ + 'www/vendor', + 'www/lib/FileUpload', + 'www/lib/pChart', + 'www/lib/pChart2.1.4', + 'www/lib/Smarty', + 'www/lib/smarty-3.1.30', + 'www/templates_c', + 'www/log', + 'www/tmp', + 'www/cache', + 'www/media', + ], +]; diff --git a/www/admin/class_test.php b/www/admin/class_test.php index f697f85e..ea48c710 100644 --- a/www/admin/class_test.php +++ b/www/admin/class_test.php @@ -14,7 +14,6 @@ ob_start(); // basic class test file define('USE_DATABASE', true); // sample config -// require("config.inc"); require 'config.php'; // set session name if (!defined('SET_SESSION_NAME')) { diff --git a/www/admin/edit_access.php b/www/admin/edit_access.php index f5399662..b57efc1e 120000 --- a/www/admin/edit_access.php +++ b/www/admin/edit_access.php @@ -1 +1 @@ -../includes/edit_base.inc \ No newline at end of file +../includes/edit_base.php \ No newline at end of file diff --git a/www/admin/edit_groups.php b/www/admin/edit_groups.php index f5399662..b57efc1e 120000 --- a/www/admin/edit_groups.php +++ b/www/admin/edit_groups.php @@ -1 +1 @@ -../includes/edit_base.inc \ No newline at end of file +../includes/edit_base.php \ No newline at end of file diff --git a/www/admin/edit_languages.php b/www/admin/edit_languages.php index f5399662..b57efc1e 120000 --- a/www/admin/edit_languages.php +++ b/www/admin/edit_languages.php @@ -1 +1 @@ -../includes/edit_base.inc \ No newline at end of file +../includes/edit_base.php \ No newline at end of file diff --git a/www/admin/edit_menu_group.php b/www/admin/edit_menu_group.php index f5399662..b57efc1e 120000 --- a/www/admin/edit_menu_group.php +++ b/www/admin/edit_menu_group.php @@ -1 +1 @@ -../includes/edit_base.inc \ No newline at end of file +../includes/edit_base.php \ No newline at end of file diff --git a/www/admin/edit_order.php b/www/admin/edit_order.php index f5399662..b57efc1e 120000 --- a/www/admin/edit_order.php +++ b/www/admin/edit_order.php @@ -1 +1 @@ -../includes/edit_base.inc \ No newline at end of file +../includes/edit_base.php \ No newline at end of file diff --git a/www/admin/edit_pages.php b/www/admin/edit_pages.php index f5399662..b57efc1e 120000 --- a/www/admin/edit_pages.php +++ b/www/admin/edit_pages.php @@ -1 +1 @@ -../includes/edit_base.inc \ No newline at end of file +../includes/edit_base.php \ No newline at end of file diff --git a/www/admin/edit_schemes.php b/www/admin/edit_schemes.php index f5399662..b57efc1e 120000 --- a/www/admin/edit_schemes.php +++ b/www/admin/edit_schemes.php @@ -1 +1 @@ -../includes/edit_base.inc \ No newline at end of file +../includes/edit_base.php \ No newline at end of file diff --git a/www/admin/edit_users.php b/www/admin/edit_users.php index f5399662..b57efc1e 120000 --- a/www/admin/edit_users.php +++ b/www/admin/edit_users.php @@ -1 +1 @@ -../includes/edit_base.inc \ No newline at end of file +../includes/edit_base.php \ No newline at end of file diff --git a/www/admin/edit_visible_group.php b/www/admin/edit_visible_group.php index f5399662..b57efc1e 120000 --- a/www/admin/edit_visible_group.php +++ b/www/admin/edit_visible_group.php @@ -1 +1 @@ -../includes/edit_base.inc \ No newline at end of file +../includes/edit_base.php \ No newline at end of file diff --git a/www/admin/error_test.php b/www/admin/error_test.php index 98f4b894..6b624871 100644 --- a/www/admin/error_test.php +++ b/www/admin/error_test.php @@ -11,8 +11,8 @@ if ($DEBUG_ALL) { // sample config require 'config.php'; -echo "FILE: ".BASE.LIB."Error.Handling.inc
"; -require(BASE.LIB."Error.Handling.inc"); +echo "FILE: ".BASE.LIB."Error.Handling.php
"; +require(BASE.LIB."Error.Handling.php"); if ($var) { echo "OUT
"; diff --git a/www/admin/namespace_test.php b/www/admin/namespace_test.php index c35bfcf3..64b9ae97 100755 --- a/www/admin/namespace_test.php +++ b/www/admin/namespace_test.php @@ -1,7 +1,5 @@ DATA['SMARTY_TEST'] = 'Test Data'; @@ -48,5 +48,5 @@ $options = array ( $cms->DATA['drop_down_test'] = $options; -require BASE.INCLUDES.'admin_smarty.inc'; -require BASE.INCLUDES.'admin_footer.inc'; +require BASE.INCLUDES.'admin_smarty.php'; +require BASE.INCLUDES.'admin_footer.php'; diff --git a/www/admin/various_class_test.php b/www/admin/various_class_test.php index 0076680b..a5eb1028 100755 --- a/www/admin/various_class_test.php +++ b/www/admin/various_class_test.php @@ -6,7 +6,6 @@ $PRINT_ALL = 1; $DB_DEBUG = 1; // admin class tests -// require 'config.inc'; require 'config.php'; DEFINE('SET_SESSION_NAME', EDIT_SESSION_NAME); $base = new CoreLibs\Basic(); @@ -43,7 +42,7 @@ print "LB remove: ".$base->removeLB($text, '##BR##')."
"; // ) // ); -$base->debug('ARRAY', $base->printAr($test)); +// $base->debug('ARRAY', $base->printAr($test)); function rec($pre, $cur, $node = array ()) { @@ -82,6 +81,7 @@ function flattenArrayKey(array $array, array $return = array ()) return $return; } +$test = array (); // core $test = rec('', 'A', $test); $test = rec('', '1', $test); diff --git a/www/configs/config.db.inc b/www/configs/config.db.php similarity index 100% rename from www/configs/config.db.inc rename to www/configs/config.db.php diff --git a/www/configs/config.host.inc b/www/configs/config.host.php similarity index 100% rename from www/configs/config.host.inc rename to www/configs/config.host.php diff --git a/www/configs/config.inc b/www/configs/config.master.php similarity index 96% rename from www/configs/config.inc rename to www/configs/config.master.php index e74262a1..92311229 100644 --- a/www/configs/config.inc +++ b/www/configs/config.master.php @@ -167,16 +167,16 @@ DEFINE('TEST_SCHEMA', 'public'); DEFINE('LIVE_SCHEMA', 'public'); /************* DB ACCESS *****************/ -if (file_exists(BASE.CONFIGS.'config.db.inc')) { - require BASE.CONFIGS.'config.db.inc'; +if (file_exists(BASE.CONFIGS.'config.db.php')) { + require BASE.CONFIGS.'config.db.php'; } /************* CORE HOST SETTINGS *****************/ -if (file_exists(BASE.CONFIGS.'config.host.inc')) { - require BASE.CONFIGS.'config.host.inc'; +if (file_exists(BASE.CONFIGS.'config.host.php')) { + require BASE.CONFIGS.'config.host.php'; } /************* OTHER PATHS *****************/ -if (file_exists(BASE.CONFIGS.'config.path.inc')) { - require BASE.CONFIGS.'config.path.inc'; +if (file_exists(BASE.CONFIGS.'config.path.php')) { + require BASE.CONFIGS.'config.path.php'; } // set the USE_DATABASE var, if there is nothing set, we assume TRUE diff --git a/www/configs/config.path.inc b/www/configs/config.path.php similarity index 100% rename from www/configs/config.path.inc rename to www/configs/config.path.php diff --git a/www/configs/config.php b/www/configs/config.php index 24f73ec0..b7cc89c3 100755 --- a/www/configs/config.php +++ b/www/configs/config.php @@ -12,8 +12,8 @@ define('CONFIG_PATH', 'configs'.DIRECTORY_SEPARATOR); $CONFIG_PATH_PREFIX = ''; for ($dir_pos = 0, $dir_max = count(explode(DIRECTORY_SEPARATOR, __DIR__)); $dir_pos <= $dir_max; $dir_pos ++) { $CONFIG_PATH_PREFIX .= '..'.DIRECTORY_SEPARATOR; - if (file_exists($CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc')) { - require $CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc'; + if (file_exists($CONFIG_PATH_PREFIX.CONFIG_PATH.'config.master.php')) { + require $CONFIG_PATH_PREFIX.CONFIG_PATH.'config.master.php'; break; } } diff --git a/www/includes/Date.Vars.inc b/www/includes/Date.Vars.php similarity index 100% rename from www/includes/Date.Vars.inc rename to www/includes/Date.Vars.php diff --git a/www/includes/admin_footer.inc b/www/includes/admin_footer.php similarity index 100% rename from www/includes/admin_footer.inc rename to www/includes/admin_footer.php diff --git a/www/includes/admin_header.inc b/www/includes/admin_header.php similarity index 98% rename from www/includes/admin_header.inc rename to www/includes/admin_header.php index 585485d0..6d2a71ef 100644 --- a/www/includes/admin_header.inc +++ b/www/includes/admin_header.php @@ -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.php"; } // predefine vars $lang = ''; diff --git a/www/includes/admin_set_paths.inc b/www/includes/admin_set_paths.php similarity index 98% rename from www/includes/admin_set_paths.inc rename to www/includes/admin_set_paths.php index 933f1995..8b6cd8b0 100644 --- a/www/includes/admin_set_paths.inc +++ b/www/includes/admin_set_paths.php @@ -39,7 +39,7 @@ $FORM_NAME = !isset($FORM_NAME) || !$FORM_NAME ? str_replace(".php", "", $cms->p $L_TITLE = ucfirst(str_replace('_', ' ', $cms->getPageName(1))).(defined(G_TITLE) ? ' - '.G_TITLE : ''); // strip tpl and replace it with inc // php include file per page -$cms->INC_TEMPLATE_NAME = str_replace(".tpl", ".inc", $CONTENT_INCLUDE); +$cms->INC_TEMPLATE_NAME = str_replace(".tpl", ".php", $CONTENT_INCLUDE); // javascript include per page $cms->JS_TEMPLATE_NAME = str_replace(".tpl", ".js", $CONTENT_INCLUDE); // css per page diff --git a/www/includes/admin_smarty.inc b/www/includes/admin_smarty.php similarity index 100% rename from www/includes/admin_smarty.inc rename to www/includes/admin_smarty.php diff --git a/www/includes/edit_base.inc b/www/includes/edit_base.php similarity index 100% rename from www/includes/edit_base.inc rename to www/includes/edit_base.php diff --git a/www/includes/table_arrays/array_edit_access.inc b/www/includes/table_arrays/array_edit_access.php similarity index 100% rename from www/includes/table_arrays/array_edit_access.inc rename to www/includes/table_arrays/array_edit_access.php diff --git a/www/includes/table_arrays/array_edit_groups.inc b/www/includes/table_arrays/array_edit_groups.php similarity index 100% rename from www/includes/table_arrays/array_edit_groups.inc rename to www/includes/table_arrays/array_edit_groups.php diff --git a/www/includes/table_arrays/array_edit_languages.inc b/www/includes/table_arrays/array_edit_languages.php similarity index 100% rename from www/includes/table_arrays/array_edit_languages.inc rename to www/includes/table_arrays/array_edit_languages.php diff --git a/www/includes/table_arrays/array_edit_menu_group.inc b/www/includes/table_arrays/array_edit_menu_group.php similarity index 100% rename from www/includes/table_arrays/array_edit_menu_group.inc rename to www/includes/table_arrays/array_edit_menu_group.php diff --git a/www/includes/table_arrays/array_edit_pages.inc b/www/includes/table_arrays/array_edit_pages.php similarity index 100% rename from www/includes/table_arrays/array_edit_pages.inc rename to www/includes/table_arrays/array_edit_pages.php diff --git a/www/includes/table_arrays/array_edit_schemes.inc b/www/includes/table_arrays/array_edit_schemes.php similarity index 100% rename from www/includes/table_arrays/array_edit_schemes.inc rename to www/includes/table_arrays/array_edit_schemes.php diff --git a/www/includes/table_arrays/array_edit_users.inc b/www/includes/table_arrays/array_edit_users.php similarity index 100% rename from www/includes/table_arrays/array_edit_users.inc rename to www/includes/table_arrays/array_edit_users.php diff --git a/www/includes/table_arrays/array_edit_visible_group.inc b/www/includes/table_arrays/array_edit_visible_group.php similarity index 100% rename from www/includes/table_arrays/array_edit_visible_group.inc rename to www/includes/table_arrays/array_edit_visible_group.php diff --git a/www/lib/CoreLibs/ACL/Login.inc b/www/lib/CoreLibs/ACL/Login.php similarity index 99% rename from www/lib/CoreLibs/ACL/Login.inc rename to www/lib/CoreLibs/ACL/Login.php index a0cc78fd..d7e857f7 100644 --- a/www/lib/CoreLibs/ACL/Login.inc +++ b/www/lib/CoreLibs/ACL/Login.php @@ -64,6 +64,7 @@ class Login extends \CoreLibs\DB\IO private $euid; // the user id var private $permission_okay = 0; // is set to one if login okay, or EUID is set and user is okay to access this page public $login; // pressed login + private $action; // master action command private $username; // login name private $password; // login password private $logout; // logout button @@ -217,14 +218,6 @@ class Login extends \CoreLibs\DB\IO // users that never get locked, even if they are set strict $this->lock_deny_users = array ('admin'); - // internal - $this->class_info['login'] = array( - 'class_name' => 'Login', - 'class_version' => '5.0.0', - 'class_created' => '2000-06-01', - 'class_author' => 'Clemens Schwaighofer' - ); - // init default ACL list array $_SESSION['DEFAULT_ACL_LIST'] = array (); // read the current edit_access_right list into an array diff --git a/www/lib/CoreLibs/Admin/Backend.inc b/www/lib/CoreLibs/Admin/Backend.php similarity index 98% rename from www/lib/CoreLibs/Admin/Backend.inc rename to www/lib/CoreLibs/Admin/Backend.php index 7ee3a705..a9454626 100644 --- a/www/lib/CoreLibs/Admin/Backend.inc +++ b/www/lib/CoreLibs/Admin/Backend.php @@ -93,14 +93,6 @@ class Backend extends \CoreLibs\DB\IO // init the database class parent::__construct($db_config, $set_control_flag); - // internal - $this->class_info["adbBackend"] = array( - "class_name" => "Admin Interface Backend", - "class_version" => "1.0.0", - "class_created" => "2006/08/15", - "class_author" => "Clemens Schwaighofer" - ); - // set the action ids foreach ($this->action_list as $_action) { $this->$_action = (isset($_POST[$_action])) ? $_POST[$_action] : ''; diff --git a/www/lib/CoreLibs/Basic.inc b/www/lib/CoreLibs/Basic.php similarity index 98% rename from www/lib/CoreLibs/Basic.inc rename to www/lib/CoreLibs/Basic.php index 540c8c81..c823c304 100644 --- a/www/lib/CoreLibs/Basic.inc +++ b/www/lib/CoreLibs/Basic.php @@ -11,7 +11,6 @@ * basic class start class for ALL clases, holds basic vars, infos, methods, etc * * PUBLIC VARIABLES -* class_info * * These are if there is any debug to print out at all at the end * debug_output_all - general yes no @@ -96,12 +95,12 @@ namespace CoreLibs; // define check vars for the flags we can have +/** @internal */ define('CLASS_STRICT_MODE', 1); define('CLASS_OFF_COMPATIBLE_MODE', 2); class Basic { - public $class_info; // class info var // control vars // compatible mode sets variable even if it is not defined private $set_compatible = true; @@ -194,14 +193,6 @@ class Basic // set per run UID for logging $this->running_uid = hash($this->hash_algo, uniqid((string)rand(), true)); - // internal info var - $this->class_info["basic"] = array ( - "class_name" => "Basic", - "class_version" => "2.0.0", - "class_created" => "2003-03-24", - "class_author" => 'Clemens Schwaighofer' - ); - // before we start any work, we should check that all MUST constants are defined $abort = false; foreach (array( @@ -482,6 +473,10 @@ class Basic // GENERAL METHODS // ************************************************************* + /** + * @param string $string + * @return string + */ // METHOD: basicSetLogId // PARAMS: string // RETURN: current set string @@ -498,27 +493,6 @@ class Basic return $log_file_id; } - // METHOD: classInfo - // PARAMS: print to debug (true/false) - // RETURN: string with info - // DESC : default class info (prints out class info) - public function classInfo(string $class_name = 'basic', bool $print_to_debug = false): string - { - 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"]."
"; - $string .= "-Class-info-[".$class_name."]-> Class Revision: ".$this->class_info[$class_name]["class_revision"]."
"; - $string .= "-Class-info-[".$class_name."]-> Class Created: ".$this->class_info[$class_name]["class_created"]."
"; - $string .= "-Class-info-[".$class_name."]-> Class Last Change: ".$this->class_info[$class_name]["class_last_changed"].""; - if ($print_to_debug === true) { - $this->debug('info', '
'.$string); - } - return $string; - } - // ****** DEBUG/ERROR FUNCTIONS ****** // METHOD: hrRunningTime @@ -949,10 +923,10 @@ class Basic // this will not set the class key length variable public function randomKeyGen(int $key_length = -1): string { - $use_key_length; + $use_key_length = 0; // only if valid int key with valid length if ($this->validateRandomKeyLenght($key_length) === true) { - $use_key_length= $key_length; + $use_key_length = $key_length; } else { $use_key_length = $this->key_length; } diff --git a/www/lib/CoreLibs/DB/Extended/ArrayIO.inc b/www/lib/CoreLibs/DB/Extended/ArrayIO.php similarity index 98% rename from www/lib/CoreLibs/DB/Extended/ArrayIO.inc rename to www/lib/CoreLibs/DB/Extended/ArrayIO.php index e911d6bd..11a4c9de 100644 --- a/www/lib/CoreLibs/DB/Extended/ArrayIO.inc +++ b/www/lib/CoreLibs/DB/Extended/ArrayIO.php @@ -75,14 +75,6 @@ class ArrayIO extends \CoreLibs\DB\IO } } } // set pk_name IF table_array was given - // internal - $this->class_info['db_array_io'] = array ( - 'class_name' => 'DB Array IO', - 'class_version' => '1.0.0', - 'class_created' => '2002/12/17', - 'class_author' => 'Clemens Schwaighofer' - ); - // echo "CALSS INFO POST [A]:
".print_r($this->class_info, true)."

"; } // deconstruktor diff --git a/www/lib/CoreLibs/DB/IO.inc b/www/lib/CoreLibs/DB/IO.php similarity index 99% rename from www/lib/CoreLibs/DB/IO.inc rename to www/lib/CoreLibs/DB/IO.php index 2dbdff8e..fe53fd98 100644 --- a/www/lib/CoreLibs/DB/IO.inc +++ b/www/lib/CoreLibs/DB/IO.php @@ -383,13 +383,6 @@ class IO extends \CoreLibs\Basic return false; } - $this->class_info['db_io']=array( - 'class_name' => 'DB IO', - 'class_version' => '5.0.0', - 'class_created' => '2000-11-23', - 'class_author' => 'Clemens Schwaighofer' - ); - // so we can check that we have a successful DB connection created return true; } diff --git a/www/lib/CoreLibs/DB/SQL/PgSQL.inc b/www/lib/CoreLibs/DB/SQL/PgSQL.php similarity index 100% rename from www/lib/CoreLibs/DB/SQL/PgSQL.inc rename to www/lib/CoreLibs/DB/SQL/PgSQL.php diff --git a/www/lib/CoreLibs/Language/Core/CachedFileReader.inc b/www/lib/CoreLibs/Language/Core/CachedFileReader.php similarity index 100% rename from www/lib/CoreLibs/Language/Core/CachedFileReader.inc rename to www/lib/CoreLibs/Language/Core/CachedFileReader.php diff --git a/www/lib/CoreLibs/Language/Core/FileReader.inc b/www/lib/CoreLibs/Language/Core/FileReader.php similarity index 100% rename from www/lib/CoreLibs/Language/Core/FileReader.inc rename to www/lib/CoreLibs/Language/Core/FileReader.php diff --git a/www/lib/CoreLibs/Language/Core/GetTextReader.inc b/www/lib/CoreLibs/Language/Core/GetTextReader.php similarity index 100% rename from www/lib/CoreLibs/Language/Core/GetTextReader.inc rename to www/lib/CoreLibs/Language/Core/GetTextReader.php diff --git a/www/lib/CoreLibs/Language/Core/StreamReader.inc b/www/lib/CoreLibs/Language/Core/StreamReader.php similarity index 100% rename from www/lib/CoreLibs/Language/Core/StreamReader.inc rename to www/lib/CoreLibs/Language/Core/StreamReader.php diff --git a/www/lib/CoreLibs/Language/Core/StringReader.inc b/www/lib/CoreLibs/Language/Core/StringReader.php similarity index 100% rename from www/lib/CoreLibs/Language/Core/StringReader.inc rename to www/lib/CoreLibs/Language/Core/StringReader.php diff --git a/www/lib/CoreLibs/Language/L10n.inc b/www/lib/CoreLibs/Language/L10n.php similarity index 100% rename from www/lib/CoreLibs/Language/L10n.inc rename to www/lib/CoreLibs/Language/L10n.php diff --git a/www/lib/CoreLibs/Output/Form/Generate.inc b/www/lib/CoreLibs/Output/Form/Generate.php similarity index 99% rename from www/lib/CoreLibs/Output/Form/Generate.inc rename to www/lib/CoreLibs/Output/Form/Generate.php index 6cf0967e..7d14344f 100644 --- a/www/lib/CoreLibs/Output/Form/Generate.inc +++ b/www/lib/CoreLibs/Output/Form/Generate.php @@ -173,7 +173,7 @@ * only a certain field list. If where is filled out and used in combination with insert (not same_db) * then this key will be SET when inserted into the DB !!! * 2003-04-09: added open_dir for download of file (URL), save_dir is only for upload (absolute path) -* added require once for class_db_array_io.inc +* added require once for class_db_array_io.php * 2003-03-31: added a file upload module (type==file) * 2003-03-20: added form_procedure_new, etc functions so for default calls it is easier to write * also added security levels to all functions where it is needed @@ -260,12 +260,12 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO // WARNING: auto spl load does not work with this as it is an array and not a function/object // check if this is the old path or the new path if (is_dir(TABLE_ARRAYS)) { - if (is_file(TABLE_ARRAYS.'array_'.$this->my_page_name.'.inc')) { - include(TABLE_ARRAYS.'array_'.$this->my_page_name.'.inc'); + if (is_file(TABLE_ARRAYS.'array_'.$this->my_page_name.'.php')) { + include(TABLE_ARRAYS.'array_'.$this->my_page_name.'.php'); } } else { - if (is_file(BASE.INCLUDES.TABLE_ARRAYS.'array_'.$this->my_page_name.'.inc')) { - include(BASE.INCLUDES.TABLE_ARRAYS.'array_'.$this->my_page_name.'.inc'); + if (is_file(BASE.INCLUDES.TABLE_ARRAYS.'array_'.$this->my_page_name.'.php')) { + include(BASE.INCLUDES.TABLE_ARRAYS.'array_'.$this->my_page_name.'.php'); } } if (isset(${$this->my_page_name}) && is_array(${$this->my_page_name})) { @@ -330,14 +330,6 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO } // write array to class var $this->security_level = $config_array['security_level']; - - // internal - $this->class_info['form'] = array( - 'class_name' => 'Form create', - 'class_version' => '3.0.0', - 'class_created' => '2002-10-22', - 'class_author' => 'Clemens Schwaighofer' - ); } // dumps all values into output (for error msg) diff --git a/www/lib/CoreLibs/Output/Progressbar.inc b/www/lib/CoreLibs/Output/Progressbar.php similarity index 100% rename from www/lib/CoreLibs/Output/Progressbar.inc rename to www/lib/CoreLibs/Output/Progressbar.php diff --git a/www/lib/CoreLibs/Template/SmartyExtend.inc b/www/lib/CoreLibs/Template/SmartyExtend.php similarity index 100% rename from www/lib/CoreLibs/Template/SmartyExtend.inc rename to www/lib/CoreLibs/Template/SmartyExtend.php diff --git a/www/lib/Error.Handling.inc b/www/lib/Error.Handling.php similarity index 100% rename from www/lib/Error.Handling.inc rename to www/lib/Error.Handling.php diff --git a/www/lib/FileUpload/Core/qqUploadedFileForm.inc b/www/lib/FileUpload/Core/qqUploadedFileForm.php similarity index 100% rename from www/lib/FileUpload/Core/qqUploadedFileForm.inc rename to www/lib/FileUpload/Core/qqUploadedFileForm.php diff --git a/www/lib/FileUpload/Core/qqUploadedFileXhr.inc b/www/lib/FileUpload/Core/qqUploadedFileXhr.php similarity index 100% rename from www/lib/FileUpload/Core/qqUploadedFileXhr.inc rename to www/lib/FileUpload/Core/qqUploadedFileXhr.php diff --git a/www/lib/FileUpload/qqFileUploader.inc b/www/lib/FileUpload/qqFileUploader.php similarity index 100% rename from www/lib/FileUpload/qqFileUploader.inc rename to www/lib/FileUpload/qqFileUploader.php diff --git a/www/lib/autoloader.php b/www/lib/autoloader.php index e0a7a88d..5d69c564 100644 --- a/www/lib/autoloader.php +++ b/www/lib/autoloader.php @@ -33,7 +33,7 @@ if (class_exists('Autoload', false) === false) { $len = strlen(__NAMESPACE__); } // set default extension - $extension = '.inc'; + $extension = '.php'; // set full include path $path = __DIR__.$ds.$LIB.substr($class, $len); // replace namespace \ with dir sepeator