User Login    
 + Register
  • Main navigation
Login
Username:

Password:


Lost Password?

Register now!
Documentation
Who's Online
81 user(s) are online (6 user(s) are browsing XoopsWiki)

Members: 2
Guests: 79

meezs, zedetona, more...
[Main Page]

Dev:Kernel Deprecated Functions

From XOOPS Project

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://www.xoops.org/modules/mediawiki/index.php/Dev:Kernel_Deprecated_Functions"

This page has been accessed 356 times. This page was last modified 01:40, 16 December 2007. Content is available under XOOPS Project.


Local Support Sites
Powered by
XOOPS Code hosted on SourceForge

Powered by PHP



Powered by MySQL

Powered by Smarty

OSI certified

All content on this site is subject to the Creative Commons License
Developers for Hire