21
zyspec
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2011/12/2 18:37

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Trabis, et al, has done a much better job of adding in documentation and throwing errors for deprecated functions in the more recent releases. Here's a list of methods/classes/functions/files which are denoted in the source code as deprecated. Some of these still work in 2.5.4 without throwing errors, others will throw an error. Many of these were removed in previous XOOPS releases but I thought I'd just document anything that indicates it might 'go away' in subsequent releases.
Quote:

Deprecated functions in 2.5.4 or previous release
=====================================
- method: Database::getInstance()
- method: XoopsLogger->logger(), use XoopsLogger::getInstance()
- method: XoopsLogger->addDeprecated()
- method: XoopsLogger::triggerError()
- method: XoopsLogger->dumpAll()
- method: XoopsLogger->dumpBlocks()
- method: XoopsLogger->dumpExtra()
- method: XoopsLogger->dumpQueries()
- method: XoopsModelRead->getByLimit(), use XoopsModelRead->getAll()
- method: XoopsModelRead->convertResultSet()
- method: XoopsModelSync->sychronization(), use XoopsModelSync->cleanOrphan()
- method: XoopsEditorHandler::getList() static call, use XoopsEditorHandler::getInstance()
- method: XoopsEditorHandler::render(), load editor object then call $editor->render();
- method: XoopsForm->getObjectID()
- method: XoopsForm->getName()
- method: XoopsFormElement->getNocolspan()
- method: XoopsFormElement->setNocolspan()
- method: XoopsFormElement->getFormType()
- method: XoopsFormElement->setFormType()
- method: MyTextSanitizerExtension::codeSanitizer()
- method: MyTextSanitizer::sanitizeForPreview()
- method: MyTextSanitizer::makeTboxData4Save()
- method: MyTextSanitizer::makeTboxData4Show()
- method: MyTextSanitizer::makeTboxData4Edit()
- method: MyTextSanitizer::makeTboxData4Preview()
- method: MyTextSanitizer::makeTboxData4PreviewInForm()
- method: MyTextSanitizer::makeTareaData4Save()
- method: MyTextSanitizer::makeTareaData4Show()
- method: MyTextSanitizer::makeTareaData4Edit()
- method: MyTextSanitizer::makeTareaData4Preview()
- method: MyTextSanitizer::makeTareaData4PreviewInForm()
- method: MyTextSanitizer::makeTareaData4InsideQuotes()
- method: MyTextSanitizer::oopsStripSlashesGPC()
- method: MyTextSanitizer::oopsStripSlashesRT()
- method: MyTextSanitizer::oopsAddSlashes()
- method: MyTextSanitizer::oopsHtmlSpecialChars()
- method: MyTextSanitizer::oopsNl2Br()
- method: XoopsTpl->xoops_setTemplateDir()
- method: XoopsTpl->xoops_getTemplateDir()
- method: XoopsTpl->xoops_setDebugging()
- method: XoopsTpl->xoops_setCaching()
- method: XoopsTpl->xoops_setCompileDir()
- method: XoopsTpl->xoops_setCacheDir()
- method: XoopsTpl->xoops_canUpdateFromFile()
- method: XoopsTpl->xoops_fetchFromData()
- method: XoopsTpl->xoops_setCacheTime()
- method: MyTextSanitizerExtension::sanitizeForDisplay()
- method: XoopsConfigHandler::deleteConfigOption()
- method: XoopsConfigCategory::getCatByModule()
- method: XoopsModule->checkAccess()
- method: XoopsModule->loadErrorMessages()
- method: XoopsModule->getCurrentPage()
- method: XoopsModule->install()
- method: XoopsModule->update()
- method: XoopsModule->insert()
- method: XoopsModule->executeSQL()
- method: XoopsModule->insertTemplates()
- method: XoopsModule->loadLanguage()
- method: XoopsModule->gettemplate()
- method: XoopsModule->insertBlocks()
- method: XoopsModule->insertConfigCategories()
- method: XoopsModule->insertConfig()
- method: XoopsModule->insertProfileFields()
- method: XoopsModule->executeScript()
- method: XoopsModule->insertGroupPermissions()
- method: XoopsObject->convertResultSet()
- method: XoopsUser->incrementPost()
- method: XoopsUser->groups()
- method: XoopsUser->getProfile()
- method: XoopsUser->loginUser()
- method: XoopsUser->updateUserByField()
- smarty: <{html_checkboxes}> 'checkboxes' attribute, use 'options'
- smarty: <{html_radios}> 'radios' attribute, use 'options'
- class: MytsLi (used in textsanitizer)
- class: MytsUl (used in textsanitizer)
- class: xos_kernel_Xoops2
- class: XoopsErrorHandler, use XoopsLogger class
- class: Uploader, see XoopsMediaUploader
- class: Utility, see XoopsUtility
- class: Captcha, XoopsCaptcha
- class: Cache, see XoopsCache
- class: File, see XoopsFile
- class: Model, see XoopsModelFactory
- class: Calendar, see XoopsCalendar
- class: UserUtility, see XoopsUsertility
- class: XoopsMailer, see XoopsMultiMailer
- class: XoopsStory
- class: XoopsTopic
- class: XoopsTree, see XoopsObjectTree
- class: XoopsBlockInstance
- class: XoopsBlockInstanceHandler
- file: class/logger_render.php, see class/logger/render.php
- file: class/logger.php, see class/logger/xoopslogger.php
- file: class/mimetypes.inc.php, see /include/mimetypes.inc.php
- file: class/module.errorhandler.php
- file: class/xoopscommments.php, see kernel/comment.php
- file: class/module.php , see kernel/module.php
- file: class/object.php , see kernel/object.php
- file: class/user.php , see kernel/user.php
- file: Frameworks/art/functions.user.php, use XoopsUserUtility class
- file: include/functions.legacy.php
- file: include/old_functions.php
- file: include/old_theme_functions.php
- file: include/xoopscodes.php
- file: /kernel/blockinstance.php
- function: xoops_module_get_admin_menu() in include/cp_functions.php
- function: xoops_module_write_admin_menu() in include/cp_functions.php
- function: xoops_load_lang_file() in include/functions.legacy.php
- function: xoops_refcheck() in include/functions.legacy.php
- function: xoops_getLinkedUnameFromId() in include/functions.legacy.php
- function: showbanner() in include/functions.legacy.php
- function: getTheme() in include/functions.legacy.php
- function: getcss() in include/functions.legacy.php
- function: getMailer() in include/functions.legacy.php
- function: OpenWaitBox() in include/functions.legacy.php
- function: CloseWaitBox() in include/functions.legacy.php
- function: xoops_getOption() in include/functions.php
- function: xoops_getConfigOption() in include/functions.php
- function: xoops_setConfigOption() in include/functions.php
- function: xoops_getModuleOption() in include/functions.php
- function: xoops_getBaseDomain() in include/functions.php
- function: xoops_getUrlDomain() in include/functions.php
- function: make_sidebar() in include/old_functions.php
- function: make_cblock() in include/old_functions.php
- function: openThread() in include/old_functions.php
- function: showThread() in include/old_functions.php
- function: closeThread() in include/old_functions.php
- function: OpenTable() in include/old_theme_functions.php
- function: CloseTable() in include/old_theme_functions.php
- function: themecenterposts() in include/old_theme_functions.php
- function: xoopsCodeTarea() in include/xoopscodes.php
- function: xoopsSmilies() in include/xoopscodes.php
- function: getByModule() in kernel/block.php
- function: getAllByGroupModule() in kernel/block.php
- function: getAdminBlocks() in kernel/block.php
- function: assignBlocks() in kernel/block.php
- function: userCheck() in register.php, see XoopsUserUtility::validate()

22
Mamba
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2011/12/4 20:11

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Great list, Jim! Thank you!

I've created a Wiki page, so we can maintain it there.

The next steps would be to:

a) indicated what they need to be replaced with

b) set up a tool that could do a "search & replace" for those items that can be simply replaced with no extra changes needed.

One way would be create a "batch file" for InfoRapid's Search & Replace.

I've created once a tool to do something like this for Project JEDI VCL, that was using a dictionary of replacements, but it would need to be updated for XOOPS. Plus, it would replace strings blindly, without asking, which sometimes could be dangerous. I guess, batch files for InfoRapid's Search & Replace will be probably better.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

23
Mamba
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2011/12/4 21:59

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


@ Peekay
Quote:
The core team are very precise in their coding and we should all be celebrating their enhancements, but without documentation the changes just cause problems and kill more modules with every new release.


Trabis is doing a great job documenting in a consistent way the code in 2.6.0, so we can generate the documentation as much as possible directly from the code.

Documentation is very high on the list of things that the Core wants to make happen for XOOPS 2.6.0.

One of the aspects of the work we're doing on Basic Module Pack is to bring more consistency across the modules, in the code, as well as in the user GUI, so if you know one module, it will be easier to use another one, regardless of whether you're a developer or end user.

The challenge is also user documentation, and here we would need help from the community. To write a user documentation there is no need to know PHP or CSS - just the module itself.

So if there are people who care about XOOPS and would like to help, please join the documentation team, and help us.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

24
Yurdal
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2012/8/4 11:41

  • Yurdal

  • Friend of XOOPS

  • Posts: 386

  • Since: 2005/3/27


I have als this problem, i have downloaded the inforapid software and let it made a search for those lines in directory /modules/smartsection

Database::getInstance();

and

/class/xoopsobject.php

But he cant find it in any files in the directory !

Did a made a wrong seacrh in the wrong directory ?

Please help smartsection is a main module of my site and i want it fix it before xoops 2.6

25
Mamba
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2012/8/4 14:32

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
made a search for those lines in directory /modules/smartsection

It might be another module. Search in directory

/modules/

Quote:
Please help smartsection is a main module of my site and i want it fix it before xoops 2.6

SmartSection is not maintained anymore. Please switch to Publisher - we'll make sure that it works in XOOPS 2.6.0
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

26
nikita
Re: Deprecated since Xoops 2.5.4: how can solve this
  • 2013/1/16 12:51

  • nikita

  • Just popping in

  • Posts: 31

  • Since: 2007/9/21


Quote:

Mamba wrote:
Database::getInstance(); ==> XoopsDatabaseFactory::getDatabaseConnection();


Hello,

With Xoops 2.5.5, I made the change in all files DiffuAds 1.1 RC2, but the message is still on the "/modules/DiffuAds/admin/options.php"

Thank Google traduction

27
zyspec
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2013/1/16 17:23

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


It looks to me like this is probably due to the module using the XOOPS option functions, which have also been deprecated. If you can tell us the exact error message (including line number) we could confirm that this is the issue you are seeing.

You will get similar messages throughout the module because it uses the XoopsTree class which is also deprecated. The only way to eliminate these will be to either copy the XoopsTree class/methods to the module and use them or using the preferred method of implementing XoopsObjectTree class/methods instead.

I don't want to alarm you but you should be very careful using this module. The module uses an unsecure method of importing _GET and _POST variables. I personally would not be comfortable using this module on any of my sites as I believe it is a security risk.

28
nikita
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2013/1/16 20:36

  • nikita

  • Just popping in

  • Posts: 31

  • Since: 2007/9/21


Quote:

zyspec wrote:
I don't want to alarm you but you should be very careful using this module. The module uses an unsecure method of importing _GET and _POST variables. I personally would not be comfortable using this module on any of my sites as I believe it is a security risk.


when do you recommend as module classifieds ?

29
lionhell
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2014/3/6 23:25

  • lionhell

  • Just popping in

  • Posts: 20

  • Since: 2006/8/13


Hi Trabis, not sure to understand the way you describe dirty replacement of xoopsTree ... I got error message, can you be more accurate , Peut-ĂȘtre en français ?

Lionel

30
Mamba
Re: Deprecated since Xoops 2.5.4: how can I solve this
  • 2014/3/7 5:30

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
Quote:
- Copy class/xoopstree.php into your module/class folder and replace all file includes to use that new path.
- Open the file and rename 'class XoopsTree' into class 'ModulenameTree'
- Remove the xoopsLogger->addDeprecated line from the file.
- Rename XoopsTree calls into 'ModulenameTree'

Hi Trabis, not sure to understand the way you describe dirty replacement of xoopsTree ... I got error message, can you be more accurate

The instructions seem to be pretty straight forward.

What kind of error messages are you getting?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

Login

Who's Online

493 user(s) are online (329 user(s) are browsing Support Forums)


Members: 0


Guests: 493


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits