diff --git a/htdocs/Frameworks/art/functions.user.php b/htdocs/Frameworks/art/functions.user.php index 31aa48908..09165a120 100644 --- a/htdocs/Frameworks/art/functions.user.php +++ b/htdocs/Frameworks/art/functions.user.php @@ -18,6 +18,7 @@ * @param bool $asString * * @return mixed + * @deprecated */ function mod_getIP($asString = false) { @@ -32,6 +33,7 @@ function mod_getIP($asString = false) * @param bool $linked * * @return array + * @deprecated */ function &mod_getUnameFromIds($uid, $usereal = false, $linked = false) { @@ -47,6 +49,7 @@ function &mod_getUnameFromIds($uid, $usereal = false, $linked = false) * @param bool $linked * * @return string + * @deprecated */ function mod_getUnameFromId($uid, $usereal = 0, $linked = false) { diff --git a/htdocs/class/database/database.php b/htdocs/class/database/database.php index c980d016f..fcceff4ab 100644 --- a/htdocs/class/database/database.php +++ b/htdocs/class/database/database.php @@ -152,6 +152,7 @@ abstract public function exec(string $sql); /** * Legacy alias for writes; kept for BC. + * @deprecated */ public function queryF(string $sql) { diff --git a/htdocs/class/errorhandler.php b/htdocs/class/errorhandler.php index e9fedecc2..5ffd6200a 100644 --- a/htdocs/class/errorhandler.php +++ b/htdocs/class/errorhandler.php @@ -34,6 +34,7 @@ * @author Kazumi Ono * @author John Neill * @copyright (c) 2000-2025 XOOPS Project (https://xoops.org) + * @deprecated */ class XoopsErrorHandler extends XoopsLogger { diff --git a/htdocs/class/model/read.php b/htdocs/class/model/read.php index 58d44733e..e27ec469b 100644 --- a/htdocs/class/model/read.php +++ b/htdocs/class/model/read.php @@ -198,6 +198,7 @@ public function &getIds(?CriteriaElement $criteria = null) * @param array $fields variables to fetch * @param bool $asObject flag indicating as object, otherwise as array * @return array of objects {@link XoopsObject} + * @deprecated */ public function &getByLimit($limit = 0, $start = 0, ?CriteriaElement $criteria = null, $fields = null, $asObject = true) { @@ -222,6 +223,7 @@ public function &getByLimit($limit = 0, $start = 0, ?CriteriaElement $criteria = * @param bool $id_as_key - should NOT be used with joint keys * @param bool $as_object * @return array + * @deprecated */ public function convertResultSet($result, $id_as_key = false, $as_object = true) { diff --git a/htdocs/class/module.errorhandler.php b/htdocs/class/module.errorhandler.php index 9ec219ca1..dd22066c3 100644 --- a/htdocs/class/module.errorhandler.php +++ b/htdocs/class/module.errorhandler.php @@ -27,6 +27,7 @@ * @package kernel * @subpackage core * @author Goghs (http://www.eqiao.com/) + * @deprecated */ class ErrorHandler { diff --git a/htdocs/class/module.textsanitizer.php b/htdocs/class/module.textsanitizer.php index 5652533cc..57bef486c 100644 --- a/htdocs/class/module.textsanitizer.php +++ b/htdocs/class/module.textsanitizer.php @@ -843,6 +843,7 @@ public function nl2Br($text) * * @param string $text * @return string + * @deprecated */ public function addSlashes($text) { diff --git a/htdocs/class/template.php b/htdocs/class/template.php index ea6cd4ee3..3babba83d 100644 --- a/htdocs/class/template.php +++ b/htdocs/class/template.php @@ -298,6 +298,7 @@ public function xoops_setCacheTime($num = 0) * * @param string $tpl_var the template variable name * @param mixed &$value the referenced value to assign + * @deprecated */ public function assign_by_ref($tpl_var, &$value) { @@ -311,6 +312,7 @@ public function assign_by_ref($tpl_var, &$value) * @param string $tpl_var the template variable name * @param mixed &$value the referenced value to append * @param boolean $merge flag if array elements shall be merged + * @deprecated */ public function append_by_ref($tpl_var, &$value, $merge = false) { @@ -322,6 +324,7 @@ public function append_by_ref($tpl_var, &$value, $merge = false) * deprecated clear_assign * * @param string $tpl_var the template variable to clear + * @deprecated */ public function clear_assign($tpl_var) { @@ -338,6 +341,7 @@ public function clear_assign($tpl_var) * @param mixed $cache_attrs * * @throws \SmartyException + * @deprecated */ public function register_function($function, $function_impl, $cacheable = true, $cache_attrs = null) { @@ -349,6 +353,7 @@ public function register_function($function, $function_impl, $cacheable = true, * deprecated unregister_function * * @param string $function name of template function + * @deprecated */ public function unregister_function($function) { @@ -367,6 +372,7 @@ public function unregister_function($function) * * @throws SmartyException * @internal param array $block_functs list of methods that are block format + * @deprecated */ public function register_object( $object, @@ -385,6 +391,7 @@ public function register_object( * deprecated unregister_object * * @param string $object name of template object + * @deprecated */ public function unregister_object($object) { @@ -401,6 +408,7 @@ public function unregister_object($object) * @param mixed $cache_attrs * * @throws \SmartyException + * @deprecated */ public function register_block($block, $block_impl, $cacheable = true, $cache_attrs = null) { @@ -412,6 +420,7 @@ public function register_block($block, $block_impl, $cacheable = true, $cache_at * deprecated unregister_block * * @param string $block name of template function + * @deprecated */ public function unregister_block($block) { @@ -427,6 +436,7 @@ public function unregister_block($block) * @param bool $cacheable * * @throws \SmartyException + * @deprecated */ public function register_compiler_function($function, $function_impl, $cacheable = true) { @@ -438,6 +448,7 @@ public function register_compiler_function($function, $function_impl, $cacheable * deprecated unregister_compiler_function * * @param string $function name of template function + * @deprecated */ public function unregister_compiler_function($function) { @@ -452,6 +463,7 @@ public function unregister_compiler_function($function) * @param string $modifier_impl name of PHP function to register * * @throws \SmartyException + * @deprecated */ public function register_modifier($modifier, $modifier_impl) { @@ -463,6 +475,7 @@ public function register_modifier($modifier, $modifier_impl) * deprecated unregister_modifier * * @param string $modifier name of template modifier + * @deprecated */ public function unregister_modifier($modifier) { @@ -475,6 +488,7 @@ public function unregister_modifier($modifier) * * @param string $type name of resource * @param array $functions array of functions to handle resource + * @deprecated */ public function register_resource($type, $functions) { @@ -486,6 +500,7 @@ public function register_resource($type, $functions) * deprecated unregister_resource * * @param string $type name of resource + * @deprecated */ public function unregister_resource($type) { @@ -499,6 +514,7 @@ public function unregister_resource($type) * @param callable $function * * @throws \SmartyException + * @deprecated */ public function register_prefilter($function) { @@ -510,6 +526,7 @@ public function register_prefilter($function) * deprecated unregister_prefilter * * @param callable $function + * @deprecated */ public function unregister_prefilter($function) { @@ -523,6 +540,7 @@ public function unregister_prefilter($function) * @param callable $function * * @throws \SmartyException + * @deprecated */ public function register_postfilter($function) { @@ -534,6 +552,7 @@ public function register_postfilter($function) * deprecated unregister_postfilter * * @param callable $function + * @deprecated */ public function unregister_postfilter($function) { @@ -547,6 +566,7 @@ public function unregister_postfilter($function) * @param callable $function * * @throws \SmartyException + * @deprecated */ public function register_outputfilter($function) { @@ -558,6 +578,7 @@ public function register_outputfilter($function) * deprecated unregister_outputfilter * * @param callable $function + * @deprecated */ public function unregister_outputfilter($function) { @@ -572,6 +593,7 @@ public function unregister_outputfilter($function) * @param string $name filter name * * @throws \SmartyException + * @deprecated */ public function load_filter($type, $name) { @@ -588,6 +610,7 @@ public function load_filter($type, $name) * @param string $exp_time expiration time * * @return boolean + * @deprecated */ public function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null) { @@ -601,6 +624,7 @@ public function clear_cache($tpl_file = null, $cache_id = null, $compile_id = nu * @param string $exp_time expire time * * @return boolean + * @deprecated */ public function clear_all_cache($exp_time = null) { @@ -618,6 +642,7 @@ public function clear_all_cache($exp_time = null) * @return bool * @throws \Exception * @throws \SmartyException + * @deprecated */ public function is_cached($tpl_file, $cache_id = null, $compile_id = null) { @@ -627,6 +652,7 @@ public function is_cached($tpl_file, $cache_id = null, $compile_id = null) /** * deprecated clear_all_assign + * @deprecated */ public function clear_all_assign() { @@ -642,6 +668,7 @@ public function clear_all_assign() * @param string $exp_time * * @return boolean results of {@link smarty_core_rm_auto()} + * @deprecated */ public function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null) { @@ -656,6 +683,7 @@ public function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_ti * * @return bool * @throws \SmartyException + * @deprecated */ public function template_exists($tpl_file) { @@ -669,6 +697,7 @@ public function template_exists($tpl_file) * @param string $name * * @return array + * @deprecated */ public function get_template_vars($name = null) { @@ -682,6 +711,7 @@ public function get_template_vars($name = null) * @param string $name * * @return array + * @deprecated */ public function get_config_vars($name = null) { @@ -695,6 +725,7 @@ public function get_config_vars($name = null) * @param string $file * @param string $section * @param string $scope + * @deprecated */ public function config_load($file, $section = null, $scope = 'global') { @@ -708,6 +739,7 @@ public function config_load($file, $section = null, $scope = 'global') * @param string $name * * @return object + * @deprecated */ public function get_registered_object($name) { @@ -719,6 +751,7 @@ public function get_registered_object($name) * deprecated clear_config * * @param string $var + * @deprecated */ public function clear_config($var = null) { diff --git a/htdocs/class/xoopscomments.php b/htdocs/class/xoopscomments.php index 7948dffbe..5919eaff5 100644 --- a/htdocs/class/xoopscomments.php +++ b/htdocs/class/xoopscomments.php @@ -33,6 +33,7 @@ * @package kernel * @subpackage comments * @access public + * @deprecated since 2.5.4 Use \XoopsComment in /kernel/comment.php instead. */ class XoopsComments extends XoopsObject { diff --git a/htdocs/class/xoopseditor/xoopseditor.php b/htdocs/class/xoopseditor/xoopseditor.php index cc134cd76..4af15887d 100644 --- a/htdocs/class/xoopseditor/xoopseditor.php +++ b/htdocs/class/xoopseditor/xoopseditor.php @@ -206,7 +206,8 @@ public function getList($noHtml = false) * XoopsEditorHandler::render() * * @param mixed $editor - * @return + * @return string + * @deprecated */ public function render($editor) { diff --git a/htdocs/class/xoopstopic.php b/htdocs/class/xoopstopic.php index 7cf8359b2..a99d8924d 100644 --- a/htdocs/class/xoopstopic.php +++ b/htdocs/class/xoopstopic.php @@ -25,6 +25,7 @@ /** * Class XoopsTopic + * @deprecated */ class XoopsTopic { diff --git a/htdocs/include/cp_functions.php b/htdocs/include/cp_functions.php index b80eca59d..acc916406 100644 --- a/htdocs/include/cp_functions.php +++ b/htdocs/include/cp_functions.php @@ -190,6 +190,7 @@ function xoops_module_get_admin_menu() * * @param string $content * @return bool + * @deprecated since version 2.5.0 This function is deprecated and should not be used. No replacement available. */ function xoops_module_write_admin_menu($content) { diff --git a/htdocs/include/functions.legacy.php b/htdocs/include/functions.legacy.php index 94df01e6e..28829b137 100644 --- a/htdocs/include/functions.legacy.php +++ b/htdocs/include/functions.legacy.php @@ -23,6 +23,7 @@ * @param string $module * @param string $default * @return bool + * @deprecated */ // Backward compatibility for 2.2* @@ -37,6 +38,7 @@ function xoops_load_lang_file($name, $module = '', $default = 'english') * @param int $docheck * * @return mixed + * @deprecated */ function xoops_refcheck($docheck = 1) { @@ -49,6 +51,7 @@ function xoops_refcheck($docheck = 1) * @param $userid * * @return string + * @deprecated */ function xoops_getLinkedUnameFromId($userid) { @@ -58,18 +61,20 @@ function xoops_getLinkedUnameFromId($userid) return XoopsUserUtility::getUnameFromId($userid, false, true); } -/* +/** * Function to display banners in all pages - */ +* @deprecated +*/ function showbanner() { $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoops_getbanner instead'); echo xoops_getbanner(); } -/* +/** * This function is deprecated. Do not use! - */ + * @deprecated +*/ function getTheme() { $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . "() is deprecated, use \$xoopsConfig['theme_set'] directly"); @@ -85,6 +90,7 @@ function getTheme() * @param string $theme * * @return string + * @deprecated */ function getcss($theme = '') { @@ -95,6 +101,7 @@ function getcss($theme = '') /** * @return XoopsMailer|XoopsMailerLocal + * @deprecated */ function getMailer() { @@ -104,9 +111,10 @@ function getMailer() return $mailer; } -/* +/** * Functions to display dhtml loading image box - */ + * @deprecated +*/ function OpenWaitBox() { $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated'); @@ -152,6 +160,10 @@ function ap_showWaitMessage(div,flag) "; } +/** + * @return void + * @deprecated + */ function CloseWaitBox() { $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated'); diff --git a/htdocs/include/old_theme_functions.php b/htdocs/include/old_theme_functions.php index b89acb62a..ad5b884ee 100644 --- a/htdocs/include/old_theme_functions.php +++ b/htdocs/include/old_theme_functions.php @@ -21,6 +21,7 @@ if (!function_exists('opentable')) { /** * @param string $width + * @deprecated */ function openTable($width = '100%') { @@ -30,6 +31,10 @@ function openTable($width = '100%') } if (!function_exists('closetable')) { + /** + * @return void + * @deprecated + */ function closeTable() { $GLOBALS['xoopsLogger']->addDeprecated("Function '" . __FUNCTION__ . "' in '" . __FILE__ . "' is deprecated, should not be used any more"); @@ -41,6 +46,7 @@ function closeTable() /** * @param $title * @param $content + * @deprecated */ function themecenterposts($title, $content) { diff --git a/htdocs/kernel/module.php b/htdocs/kernel/module.php index ff7fca87d..7fa5500f7 100644 --- a/htdocs/kernel/module.php +++ b/htdocs/kernel/module.php @@ -521,6 +521,7 @@ public function checkAccess() * @param string $type * * @return bool + * @deprecated */ public function loadLanguage($type = 'main') { @@ -531,6 +532,7 @@ public function loadLanguage($type = 'main') /** * @return bool + * @deprecated */ public function loadErrorMessages() { @@ -541,6 +543,7 @@ public function loadErrorMessages() /** * @return bool + * @deprecated */ public function getCurrentPage() { @@ -554,6 +557,7 @@ public function getCurrentPage() * @param array $accessgroups * * @return bool + * @deprecated */ public function install($admingroups = [], $accessgroups = []) { @@ -564,6 +568,7 @@ public function install($admingroups = [], $accessgroups = []) /** * @return bool + * @deprecated */ public function update() { @@ -574,6 +579,7 @@ public function update() /** * @return bool + * @deprecated */ public function insert() { @@ -594,6 +600,7 @@ public function executeSQL() /** * @return bool + * @deprecated */ public function insertTemplates() { @@ -607,6 +614,7 @@ public function insertTemplates() * @param bool $block * * @return bool + * @deprecated */ public function gettemplate($template, $block = false) { @@ -617,6 +625,7 @@ public function gettemplate($template, $block = false) /** * @return bool + * @deprecated */ public function insertBlocks() { @@ -627,6 +636,7 @@ public function insertBlocks() /** * @return bool + * @deprecated */ public function insertConfigCategories() { @@ -637,6 +647,7 @@ public function insertConfigCategories() /** * @return bool + * @deprecated */ public function insertConfig() { @@ -647,6 +658,7 @@ public function insertConfig() /** * @return bool + * @deprecated */ public function insertProfileFields() { @@ -660,6 +672,7 @@ public function insertProfileFields() * @param int $state * * @return bool + * @deprecated */ public function executeScript($type, $state = 2) { @@ -673,6 +686,7 @@ public function executeScript($type, $state = 2) * @param $type * * @return bool + * @deprecated */ public function insertGroupPermissions($groups, $type) { diff --git a/htdocs/register.php b/htdocs/register.php index bf18d6dce..43f936bb0 100644 --- a/htdocs/register.php +++ b/htdocs/register.php @@ -49,6 +49,7 @@ * @param $vpass * * @return bool|string + * @deprecated */ function userCheck($uname, $email, $pass, $vpass) {