Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules

Search

Donate to XOOPS!

Please select an amount to donate


Do you want your username revealed with your donation?
Yes - List me as a Generous Donor
No - List my donation as from an Anonymous Donor


Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

admin Arabic banner block Christmas comments cumulus DayDawn dhsoft e-Commerce E-Learning Git Google GUI hacks instant-zero jQuery module mygalleries news Nordic Olédrion oxygen PageRank PHP rmcommon security SEO simple-XOOPS Smarty sport tag Theme tutorial wiki xoops XoopsEngine ZendFramework

Top Tags

module (1) rmcommon (1)

New Users

Registering user

# 133032

lsfx2000

Welcome to XOOPS!
[Main Page]

Dev:Kernel Deprecated Functions

From XOOPS Web Application System

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy
Category: Development

Here comes a list of all the methods / functions that are deprecated (and will be removed in the next release). Feel free to add other ones to the list as you encounter them. Text sanitizer

Almost everything is deprecated except:

   * function &smiley($message)
   * function &makeClickable(&$text)
   * function &xoopsCodeDecode(&$text, $allowimage = 1)
   * function &nl2Br($text)
   * function &addSlashes($text)
   * function &htmlSpecialChars($text)
   * function &undoHtmlSpecialChars(&$text)
   * function &displayTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
   * function &previewTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)

Now the old ones, with the correct equivalent:

   * function makeTboxData4Save($text)
   * function makeTareaData4Save($text)

--> $ts->addSlashes($text);

   * function makeTboxData4Show($text, $smiley=0)
   * function makeTboxData4Edit($text)
   * function makeTareaData4InsideQuotes($text)
   * function makeTareaData4Edit($text)

-->$ts->htmlSpecialChars($text);

   * function makeTboxData4Preview($text, $smiley=0)
   * function makeTboxData4PreviewInForm($text)
   * function makeTareaData4PreviewInForm($text)

-->$ts->htmlSpecialChars( $ts->stripSlashesGPC($text) );

   * function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1)

-->$ts->displayTarea($text, $html, $smiley, $xcode);

   * function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1)

-->$ts->previewTarea($text, $html, $smiley, $xcode);

Skalpa


Warning, addSlashes, makeTboxData4Save, makeTareaData4Save and oopsAddSlashes will only add slashes to your datas when they are coming from a form or a cookie. This example will not be sanitized :

$data="that's good";

$sandata=$myts->addSlashes($data);

As a result, you will have an error when you will try to insert a such data in the database because the quote will not be escaped.

Hervé

Back to the dev:Main Page

Retrieved from "http://xoops.org/modules/mediawiki/index.php/Dev:Kernel_Deprecated_Functions"

This page has been accessed 2,623 times. This page was last modified 01:40, 16 December 2007. Content is available under XOOPS Web Application System.