From: SourceForge.net <no...@so...> - 2012-09-17 21:21:13
|
Bugs item #3568596, was opened at 2012-09-17 14:21 Message generated for change (Tracker Item Submitted) made by zyspec You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=3568596&group_id=41586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core - Core Group: XOOPS 2.6.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: zyspec (zyspec) Assigned to: Nobody/Anonymous (nobody) Summary: XoopsLoad unnecessary prevents 3rd party class names Initial Comment: The core XoopsLoad class prevents certain non-core class names that should not be precluded. Currently the code in the load() method in ./class/xoopsload.php is: if (!isset($deprecated)) { $deprecated = array( 'uploader' => 'xoopsmediauploader', 'utility' => 'xoopsutility', 'captcha' => 'xoopscaptcha', 'cache' => 'xoopscache', 'file' => 'xoopsfile', 'model' => 'xoopsmodelfactory', 'calendar' => 'xoopscalendar', 'userutility' => 'xoopsuserutility', ); } $name = strtolower($name); if (array_key_exists($name, $deprecated)) { trigger_error("xoops_load('{$name}') is deprecated, use xoops_load('{$deprecated[$name]}')", E_USER_WARNING); $name = $deprecated[$name]; } $type = empty($type) ? 'core' : $type; The code should be changed to: if (!isset($deprecated)) { $deprecated = array( 'uploader' => 'xoopsmediauploader', 'utility' => 'xoopsutility', 'captcha' => 'xoopscaptcha', 'cache' => 'xoopscache', 'file' => 'xoopsfile', 'model' => 'xoopsmodelfactory', 'calendar' => 'xoopscalendar', 'userutility' => 'xoopsuserutility', ); } $type = empty($type) ? 'core' : $type; $name = strtolower($name); if (array_key_exists($name, $deprecated) && ('core' == $type)) { trigger_error("xoops_load('{$name}') is deprecated, use xoops_load('{$deprecated[$name]}')", E_USER_WARNING); $name = $deprecated[$name]; } This will allow modules, etc. to have classes named like myModuleCalendar, MyModuleFile, MyModuleUtility ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=3568596&group_id=41586 |