includes/AjaxFunctions.php File Reference

Go to the source code of this file.

Functions

if(!defined( 'MEDIAWIKI')) js_unescape ($source, $iconv_to= 'UTF-8')
 Function converts an Javascript escaped string back into a string with specified charset (default is UTF-8).
 code2utf ($num)
 Function coverts number of utf char into that character.
 wfAjaxWatch ($pagename="", $watch="")
 Called for AJAX watch/unwatch requests.
 wfAjaxGetThumbnailUrl ($file, $width, $height)
 Called in some places (currently just extensions) to get the thumbnail URL for a given file at a given resolution.
 wfAjaxGetFileUrl ($file)
 Called in some places (currently just extensions) to get the URL for a given file.


Detailed Description

Definition in file AjaxFunctions.php.


Function Documentation

code2utf ( num  ) 

Function coverts number of utf char into that character.

Function taken from: http://www.php.net/manual/en/function.utf8-encode.php#49336

Parameters:
$num Integer
Returns:
utf8char

Definition at line 64 of file AjaxFunctions.php.

Referenced by js_unescape().

if (!defined( 'MEDIAWIKI')) js_unescape ( source,
iconv_to = 'UTF-8' 
)

Function converts an Javascript escaped string back into a string with specified charset (default is UTF-8).

Modified function from http://pure-essence.net/stuff/code/utf8RawUrlDecode.phps

Parameters:
$source String escaped with Javascript's escape() function
$iconv_to String destination character set will be used as second parameter in the iconv function. Default is UTF-8.
Returns:
string

Definition at line 21 of file AjaxFunctions.php.

References $source, and code2utf().

wfAjaxGetFileUrl ( file  ) 

Called in some places (currently just extensions) to get the URL for a given file.

Definition at line 149 of file AjaxFunctions.php.

References $file, $url, and wfFindFile().

wfAjaxGetThumbnailUrl ( file,
width,
height 
)

Called in some places (currently just extensions) to get the thumbnail URL for a given file at a given resolution.

Definition at line 134 of file AjaxFunctions.php.

References $file, $url, and wfFindFile().

wfAjaxWatch ( pagename = "",
watch = "" 
)

Called for AJAX watch/unwatch requests.

Parameters:
$pagename Prefixed title string for page to watch/unwatch
$watch String 'w' to watch, 'u' to unwatch
Returns:
String '<w#>' or '<u#>' on successful watch or unwatch, respectively, followed by an HTML message to display in the alert box; or '<err#>' on error

Definition at line 84 of file AjaxFunctions.php.

References $dbw, $ok, $title, Title::newFromDBkey(), wfGetDB(), and wfReadOnly().


Generated on Sat Sep 5 02:08:04 2009 for MediaWiki by  doxygen 1.5.9