globalfunctions.php File Reference

Go to the source code of this file.

Enumerations

enum  _ARCHIVETYPE_MONTH

Functions

 intGetVar ($name)
 intRequestVar ($name)
 intCookieVar ($name)
 getNucleusVersion ()
 getNucleusPatchLevel ()
 sql_connect ()
 sql_table ($name)
 sendContentType ($contenttype, $pagetype= '', $charset=_CHARSET)
 startUpError ($msg, $title)
 sql_disconnect ()
 sql_query ($query)
 highlight ($text, $expression, $highlight)
 parseHighlight ($query)
 isValidMailAddress ($address)
 getBlogIDFromName ($name)
 getBlogNameFromID ($id)
 getBlogIDFromItemID ($itemid)
 getBlogIDFromCommentID ($commentid)
 getBlogIDFromCatID ($catid)
 getCatIDFromName ($name)
 quickQuery ($q)
 getPluginNameFromPid ($pid)
 selector ()
 doError ($msg, $skin= '')
 getConfig ()
 isValidShortName ($name)
 isValidDisplayName ($name)
 isValidCategoryName ($name)
 isValidTemplateName ($name)
 isValidSkinName ($name)
 addBreaks ($var)
 removeBreaks ($var)
 shorten ($text, $maxlength, $toadd)
 mysqldate ($timestamp)
 selectBlog ($shortname)
 selectSkin ($skinname)
 selectCategory ($cat)
 selectItem ($id)
 selectLanguage ($language)
 parseFile ($filename, $includeMode= 'normal', $includePrefix= '')
 debug ($msg)
 addToLog ($level, $msg)
 help ($id)
 helpHtml ($id)
 helplink ($id)
 getMailFooter ()
 getLanguageName ()
 includephp ($filename)
 checkLanguage ($lang)
 checkPlugin ($plug)
 createItemLink ($itemid, $extra= '')
 createMemberLink ($memberid, $extra= '')
 createCategoryLink ($catid, $extra= '')
 createArchiveListLink ($blogid= '', $extra= '')
 createArchiveLink ($blogid, $archive, $extra= '')
 createBlogidLink ($blogid, $params= '')
 createLink ($type, $params)
 createBlogLink ($url, $params)
 addLinkParams ($link, $params)
 alterQueryStr ($querystr, $param, $value)
 passVar ($key, $value)
 formatDate ($format, $timestamp, $defaultFormat, &$blog)
 checkVars ($aVars)
 sanitizeParams ()
 ticketForPlugin ()
 _addInputTags (&$keys, $prefix='')
 serverStringToArray ($str, &$array, &$frontParam)
 arrayToServerString ($array, $frontParam, &$str)
 sanitizeArray (&$array)
 convArrayForSanitizing ($src, &$array)
 revertArrayForSanitizing ($array, &$dst)
 redirect ($url)
 stringStripTags ($string)
 stringToAttribute ($string)
 stringToXML ($string)
 toAscii ($html)
 _links_init ()
 _links_add ($match)
 _links_list ()
 encode_desc (&$data)
 getBookmarklet ($blogid)
 ifset (&$var)
 numberOfEventSubscriber ($event)

Variables

global $nucleus
global $CONF
global $DIR_LIBS
global $DIR_LANG
global $manager = & MANAGER::instance()
global $member
 $nucleus ['version'] = 'v3.31SP1'
 $nucleus ['codename'] = ''
 $CONF ['debug'] = 0
 $CONF ['alertOnSecurityRisk'] = 1
 $CONF ['ItemURL'] = $CONF['Self']
 $CONF ['ArchiveURL'] = $CONF['Self']
 $CONF ['ArchiveListURL'] = $CONF['Self']
 $CONF ['MemberURL'] = $CONF['Self']
 $CONF ['SearchURL'] = $CONF['Self']
 $CONF ['BlogURL'] = $CONF['Self']
 $CONF ['CategoryURL'] = $CONF['Self']
 $bSanitizeAndContinue = 0
 $orgRequestURI = serverVar('REQUEST_URI')
 $blogid = requestVar('blogid')
 $itemid = intRequestVar('itemid')
 $catid = intRequestVar('catid')
 $skinid = requestVar('skinid')
 $memberid = requestVar('memberid')
 $archivelist = requestVar('archivelist')
 $imagepopup = requestVar('imagepopup')
 $archive = requestVar('archive')
 $query = requestVar('query')
 $highlight = requestVar('highlight')
 $amount = requestVar('amount')
 $action = requestVar('action')
 $nextaction = requestVar('nextaction')
 $maxresults = requestVar('maxresults')
 $startpos = intRequestVar('startpos')
 $errormessage = ''
 $error = ''
 $virtualpath = ((getVar('virtualpath') != null) ? getVar('virtualpath') : serverVar('PATH_INFO'))
 $SQLCount = 0
 $msg = $orgRequestURI . " -> " . serverVar('REQUEST_URI')
 break
case __pad0__
case __pad1__
case __pad2__
default __pad3__
 $pw = postVar('password')
 $shared = intPostVar('shared')
 exit
case $CONF ['ArchivesKey']
case $CONF ['ArchiveKey']
case $CONF ['CategoryKey']
case $CONF ['MemberKey']
case $CONF ['SpecialskinKey']


Enumeration Type Documentation

Definition at line 328 of file globalfunctions.php.


Function Documentation

_addInputTags ( &$  keys,
prefix = '' 
)

Definition at line 1708 of file globalfunctions.php.

Referenced by ticketForPlugin().

_links_add ( match  ) 

Definition at line 1918 of file globalfunctions.php.

_links_init (  ) 

Definition at line 1913 of file globalfunctions.php.

Referenced by toAscii().

_links_list (  ) 

Definition at line 1924 of file globalfunctions.php.

Referenced by toAscii().

addBreaks ( var  ) 

Definition at line 1057 of file globalfunctions.php.

Referenced by BLOG::additem(), COMMENT::prepareBody(), and ITEM::update().

addLinkParams ( link,
params 
)

Definition at line 1383 of file globalfunctions.php.

References $CONF.

Referenced by createBlogLink(), and createLink().

addToLog ( level,
msg 
)

Definition at line 1166 of file globalfunctions.php.

References $msg, and ACTIONLOG::add().

alterQueryStr ( querystr,
param,
value 
)

Parameters:
$querystr querystring to alter (e.g. foo=1&bar=2&x=y)
$param name of parameter to change (e.g. 'foo')
$value New value for that parameter (e.g. 3)
Returns:
altered query string (for the examples above: foo=3&bar=2&x=y)

Definition at line 1416 of file globalfunctions.php.

Referenced by ACTIONS::_searchlink().

arrayToServerString ( array,
frontParam,
&$  str 
)

Convert array like array['blogid'] to server string such as $_SERVER['REQUEST_URI']

Definition at line 1753 of file globalfunctions.php.

Referenced by sanitizeParams().

checkLanguage ( lang  ) 

Checks if a certain language/plugin exists

Definition at line 1247 of file globalfunctions.php.

References $DIR_LANG.

Referenced by ADMIN::action_changemembersettings(), and getLanguageName().

checkPlugin ( plug  ) 

Definition at line 1252 of file globalfunctions.php.

References $DIR_PLUGINS.

Referenced by ADMIN::action_pluginadd().

checkVars ( aVars  ) 

convArrayForSanitizing ( src,
&$  array 
)

Convert array for sanitizeArray function

Definition at line 1815 of file globalfunctions.php.

Referenced by sanitizeParams().

createArchiveLink ( blogid,
archive,
extra = '' 
)

createArchiveListLink ( blogid = '',
extra = '' 
)

Definition at line 1272 of file globalfunctions.php.

References $blogid, and createLink().

Referenced by ACTIONS::parse_archivelink(), and BLOG::showCategoryList().

createBlogidLink ( blogid,
params = '' 
)

createBlogLink ( url,
params 
)

Definition at line 1368 of file globalfunctions.php.

References $CONF, and addLinkParams().

createCategoryLink ( catid,
extra = '' 
)

Definition at line 1268 of file globalfunctions.php.

References $catid, and createLink().

createItemLink ( itemid,
extra = '' 
)

Centralisation of the functions that generate links

Definition at line 1260 of file globalfunctions.php.

References $itemid, and createLink().

Referenced by ACTIONS::_itemlink(), COMMENTS::addComment(), ACTION::addComment(), selector(), and BLOG::sendNewItemNotification().

createLink ( type,
params 
)

createMemberLink ( memberid,
extra = '' 
)

Definition at line 1264 of file globalfunctions.php.

References $memberid, and createLink().

Referenced by ACTIONS::parse_membermailform(), and ACTION::sendMessage().

debug ( msg  ) 

doError ( msg,
skin = '' 
)

encode_desc ( &$  data  ) 

Todo:
document this

Definition at line 1940 of file globalfunctions.php.

Referenced by listplug_table_pluginlist().

formatDate ( format,
timestamp,
defaultFormat,
&$  blog 
)

Definition at line 1457 of file globalfunctions.php.

Referenced by ITEMACTIONS::parse_date(), and COMMENTACTIONS::parse_date().

getBlogIDFromCatID ( catid  ) 

getBlogIDFromCommentID ( commentid  ) 

Definition at line 698 of file globalfunctions.php.

References quickQuery(), and sql_table().

getBlogIDFromItemID ( itemid  ) 

getBlogIDFromName ( name  ) 

getBlogNameFromID ( id  ) 

Definition at line 690 of file globalfunctions.php.

References quickQuery(), and sql_table().

Referenced by ADMIN::action_manageteam(), and ADMIN::action_regfile().

getBookmarklet ( blogid  ) 

Returns the Javascript code for a bookmarklet that works on most modern browsers

Parameters:
blogid 

Definition at line 1956 of file globalfunctions.php.

References $CONF.

Referenced by ADMIN::action_bookmarklet().

getCatIDFromName ( name  ) 

Definition at line 706 of file globalfunctions.php.

References quickQuery(), and sql_table().

Referenced by selectCategory().

getConfig (  ) 

Definition at line 1024 of file globalfunctions.php.

References $CONF, $query, mysql_fetch_object(), sql_query(), and sql_table().

Referenced by ADMIN::action_settingsupdate().

getLanguageName (  ) 

Returns the name of the language to use preference priority: member - site defaults to english when no good language found

checks if file exists, etc...

Definition at line 1197 of file globalfunctions.php.

References $CONF, $member, and checkLanguage().

Referenced by NP_SkinFiles::init(), NP_Ping::init(), and ticketForPlugin().

getMailFooter (  ) 

getNucleusPatchLevel (  ) 

power users can install patches in between nucleus releases. These patches usually add new functionality in the plugin API and allow those to be tested without having to install CVS.

Definition at line 474 of file globalfunctions.php.

Referenced by ADMIN::action_pluginadd(), and ADMIN::pagehead().

getNucleusVersion (  ) 

returns the currently used version (100 = 1.00, 101 = 1.01, etc...)

Definition at line 465 of file globalfunctions.php.

Referenced by ADMIN::action_pluginadd(), and ADMIN::pagehead().

getPluginNameFromPid ( pid  ) 

Definition at line 716 of file globalfunctions.php.

References mysql_fetch_object(), sql_query(), and sql_table().

Referenced by ADMIN::action_pluginhelp().

help ( id  ) 

helpHtml ( id  ) 

Definition at line 1175 of file globalfunctions.php.

References helplink().

Referenced by help().

helplink ( id  ) 

Definition at line 1179 of file globalfunctions.php.

Referenced by ADMIN::action_skinedittype(), and helpHtml().

highlight ( text,
expression,
highlight 
)

Highlights a specific query in a given HTML text (not within HTML tags) and returns it

Parameters:
$text text to be highlighted
$expression regular expression to be matched (can be an array of expressions as well)
$highlight highlight to be used (use \0 to indicate the matched expression)

Definition at line 602 of file globalfunctions.php.

References $highlight.

ifset ( &$  var  ) 

Returns a variable or null if not set

Parameters:
mixed Variable
Returns:
mixed Variable

Definition at line 1975 of file globalfunctions.php.

Referenced by listplug_select().

includephp ( filename  ) 

Includes a PHP file. This method can be called while parsing templates and skins

Definition at line 1220 of file globalfunctions.php.

References $HTTP_COOKIE_VARS, $HTTP_ENV_VARS, $HTTP_GET_VARS, $HTTP_POST_FILES, $HTTP_POST_VARS, and $HTTP_SESSION_VARS.

Referenced by BaseActions::parse_phpinclude().

intCookieVar ( name  ) 

Definition at line 458 of file globalfunctions.php.

References cookieVar().

intGetVar ( name  ) 

Definition at line 450 of file globalfunctions.php.

References getVar().

Referenced by ADMIN::action_pluginhelp().

intRequestVar ( name  ) 

Definition at line 454 of file globalfunctions.php.

References requestVar().

Referenced by ADMIN::action_addnewlog2(), ADMIN::action_banlist(), ADMIN::action_banlistdelete(), ADMIN::action_banlistnew(), ADMIN::action_banlistnewfromitem(), ADMIN::action_batchcategory(), ADMIN::action_batchitem(), ADMIN::action_batchteam(), ADMIN::action_blogcommentlist(), ADMIN::action_blogsettings(), ADMIN::action_blogsettingsupdate(), ADMIN::action_bookmarklet(), ADMIN::action_categorydeleteconfirm(), ADMIN::action_categorynew(), ADMIN::action_changemembersettings(), ADMIN::action_commentdelete(), ADMIN::action_commentdeleteconfirm(), ADMIN::action_commentupdate(), ADMIN::action_createitem(), ADMIN::action_deleteblog(), ADMIN::action_deleteblogconfirm(), ADMIN::action_itemcommentlist(), ADMIN::action_itemdelete(), ADMIN::action_itemdeleteconfirm(), ADMIN::action_itemedit(), ADMIN::action_itemlist(), ADMIN::action_itemmove(), ADMIN::action_itemmoveto(), ADMIN::action_itemupdate(), ADMIN::action_manageteam(), ADMIN::action_memberdelete(), ADMIN::action_memberdeleteconfirm(), ADMIN::action_memberedit(), ADMIN::action_pluginoptionsupdate(), ADMIN::action_regfile(), ADMIN::action_sendping(), ADMIN::action_skinclone(), ADMIN::action_skindelete(), ADMIN::action_skindeleteconfirm(), ADMIN::action_skinedit(), ADMIN::action_skineditgeneral(), ADMIN::action_skinedittype(), ADMIN::action_skinremovetype(), ADMIN::action_skinremovetypeconfirm(), ADMIN::action_skinupdate(), ADMIN::action_teamchangeadmin(), ADMIN::action_teamdelete(), ADMIN::action_teamdeleteconfirm(), ADMIN::action_templateclone(), ADMIN::action_templatedelete(), ADMIN::action_templatedeleteconfirm(), ADMIN::action_templateedit(), ADMIN::action_templateupdate(), ADMIN::batchAskDeleteConfirmation(), bm_doEditForm(), bm_doEditItem(), bm_doShowForm(), bm_loginAndPassThrough(), ITEM::createFromRequest(), media_select(), ACTIONS::parse_image(), and BATCH::showOperationList().

isValidCategoryName ( name  ) 

Definition at line 1044 of file globalfunctions.php.

Referenced by ADMIN::action_categorynew().

isValidDisplayName ( name  ) 

Definition at line 1040 of file globalfunctions.php.

Referenced by ADMIN::action_changemembersettings(), and MEMBER::create().

isValidMailAddress ( address  ) 

isValidShortName ( name  ) 

isValidSkinName ( name  ) 

Definition at line 1052 of file globalfunctions.php.

Referenced by ADMIN::action_skineditgeneral(), and ADMIN::action_skinnew().

isValidTemplateName ( name  ) 

mysqldate ( timestamp  ) 

Converts a unix timestamp to a mysql DATETIME format, and places quotes around it.

Definition at line 1084 of file globalfunctions.php.

Referenced by ITEM::getitem(), BLOG::getSqlBlog(), BLOG::getSqlSearch(), selector(), BLOG::showArchive(), BLOG::showArchiveList(), ITEM::update(), and ADMIN::updateFuturePosted().

numberOfEventSubscriber ( event  ) 

Returns number of subscriber to an event

Parameters:
event 
Returns:
number of subscriber(s)

Definition at line 1989 of file globalfunctions.php.

References $query, mysql_fetch_object(), sql_query(), and sql_table().

Referenced by ADMIN::action_additem(), ADMIN::action_blogsettings(), and ADMIN::action_itemupdate().

parseFile ( filename,
includeMode = 'normal',
includePrefix = '' 
)

parseHighlight ( query  ) 

Parses a query into an array of expressions that can be passed on to the highlight method

Definition at line 646 of file globalfunctions.php.

References $query.

Referenced by BaseActions::setHighlight().

passVar ( key,
value 
)

Definition at line 1440 of file globalfunctions.php.

Referenced by passRequestVars().

quickQuery ( q  ) 

redirect ( url  ) 

Stops processing the request and redirects to the given URL.

  • no actual contents should have been sent to the output yet
  • the URL will be stripped of illegal or dangerous characters

Definition at line 1841 of file globalfunctions.php.

References exit.

Referenced by ADMIN::action_settingsupdate(), ACTION::addComment(), bm_doEditItem(), ACTION::createAccount(), ACTION::doKarma(), ACTION::forgotPassword(), selector(), and ACTION::sendMessage().

removeBreaks ( var  ) 

revertArrayForSanitizing ( array,
&$  dst 
)

Revert array after sanitizeArray function

Definition at line 1828 of file globalfunctions.php.

Referenced by sanitizeParams().

sanitizeArray ( &$  array  ) 

Sanitize array parameters. This function checks both key and value.

  • check key if it inclues " (double quote), remove from array
  • check value if it includes \ (escape sequece), remove remaining string

Definition at line 1771 of file globalfunctions.php.

Referenced by sanitizeParams().

sanitizeParams (  ) 

Sanitize parameters such as $_GET and $_SERVER['REQUEST_URI'] etc. to avoid XSS

Definition at line 1536 of file globalfunctions.php.

References arrayToServerString(), convArrayForSanitizing(), revertArrayForSanitizing(), sanitizeArray(), and serverStringToArray().

selectBlog ( shortname  ) 

functions for use in index.php

Definition at line 1091 of file globalfunctions.php.

References $archivelist, $blogid, and getBlogIDFromName().

selectCategory ( cat  ) 

Can take either a category ID or a category name (be aware that multiple categories can have the same name)

Definition at line 1110 of file globalfunctions.php.

References $catid, and getCatIDFromName().

selectItem ( id  ) 

Definition at line 1119 of file globalfunctions.php.

References $itemid.

selectLanguage ( language  ) 

Definition at line 1125 of file globalfunctions.php.

References $DIR_LANG, and $language.

selector (  ) 

selectSkin ( skinname  ) 

Definition at line 1101 of file globalfunctions.php.

References $skinid, and SKIN::getIdFromName().

Referenced by selector().

sendContentType ( contenttype,
pagetype = '',
charset = _CHARSET 
)

Definition at line 503 of file globalfunctions.php.

References $CONF, $manager, and serverVar().

Referenced by SKIN::parse().

serverStringToArray ( str,
&$  array,
&$  frontParam 
)

Convert the server string such as $_SERVER['REQUEST_URI'] to arry like arry['blogid']=1 and array['page']=2 etc.

Definition at line 1725 of file globalfunctions.php.

Referenced by sanitizeParams().

shorten ( text,
maxlength,
toadd 
)

sql_connect (  ) 

sql_disconnect (  ) 

disconnects from SQL server

Definition at line 576 of file globalfunctions.php.

References mysql_close().

sql_query ( query  ) 

executes an SQL query

Definition at line 583 of file globalfunctions.php.

References $query, $SQLCount, mysql_error(), and mysql_query().

Referenced by NucleusPlugin::_applyPluginOptions(), _categoryList(), MANAGER::_cleanUpExpiredTickets(), NucleusPlugin::_getOptionTop(), _getRecentItems(), _getRecentItemsBlogger(), _getRecentItemsMetaWeblog(), _getUsersBlogs(), MANAGER::_initCacheInfo(), ADMIN::_insertPluginOptions(), MANAGER::_loadSubscriptions(), _mt_categoryList(), _mt_getRecentPostTitles(), ADMIN::action_addnewlog(), ADMIN::action_batchmember(), ADMIN::action_batchteam(), ADMIN::action_blogsettings(), ADMIN::action_changemembersettings(), ADMIN::action_commentdeleteconfirm(), ADMIN::action_commentupdate(), ADMIN::action_deleteblogconfirm(), ADMIN::action_pluginadd(), ADMIN::action_pluginlist(), ADMIN::action_pluginupdate(), ADMIN::action_skinclone(), ADMIN::action_skindelete(), ADMIN::action_skindeleteconfirm(), ADMIN::action_skinedit(), ADMIN::action_skinieoverview(), ADMIN::action_skinremovetypeconfirm(), ADMIN::action_teamchangeadmin(), ADMIN::action_templateclone(), ADMIN::action_templatedeleteconfirm(), ADMIN::action_templateupdate(), ACTIONLOG::add(), BAN::addBan(), COMMENTS::addComment(), BLOG::additem(), BLOG::addTeamMember(), ADMIN::addToTemplate(), COMMENTS::amountComments(), MEMBER::canAlterComment(), MEMBER::canAlterItem(), MEMBER::canBeDeleted(), BLOG::checkJustPosted(), MEMBER::cleanupActivationTable(), ACTIONLOG::clear(), BLOG::clearFuturePost(), MEMBER::create(), TEMPLATE::createNew(), SKIN::createNew(), BLOG::createNewCategory(), ITEM::delete(), TEMPLATE::deleteAllParts(), SKIN::deleteAllParts(), ADMIN::deleteOneCategory(), ADMIN::deleteOneComment(), ADMIN::deleteOneMember(), ADMIN::deleteOneTeamMember(), do_backup(), TEMPLATE::exists(), MEMBER::exists(), ITEM::exists(), BLOG::exists(), TEMPLATE::existsID(), MEMBER::existsID(), BLOG::existsID(), SKINEXPORT::export(), MEMBER::generateActivationEntry(), MEMBER::getActivationInfo(), MEMBER::getAdminBlogs(), BLOG::getCategoryDesc(), BLOG::getCategoryIdFromName(), BLOG::getCategoryName(), COMMENT::getComment(), getConfig(), SKIN::getContent(), TEMPLATE::getDesc(), SKIN::getFriendlyNames(), TEMPLATE::getIdFromName(), SKIN::getIdFromName(), ITEM::getitem(), NucleusPlugin::getOption(), getPluginNameFromPid(), BAN::isBanned(), MEMBER::isBlogAdmin(), MEMBER::isTeamMember(), BLOG::isValidCategory(), KARMA::isVoteAllowed(), ITEM::move(), ADMIN::moveOneCategory(), numberOfEventSubscriber(), quickQuery(), TEMPLATE::read(), MEMBER::read(), KARMA::readFromDatabase(), BLOG::readSettings(), BAN::removeBan(), KARMA::saveIP(), SEARCH::SEARCH(), ADMIN::selectBlog(), selector(), BLOG::setFuturePost(), BLOG::showArchiveList(), BLOG::showBlogList(), BLOG::showCategoryList(), COMMENTS::showComments(), showlist(), BLOG::showUsingQuery(), SKIN::SKIN(), ADMIN::skinclonetype(), NucleusPlugin::subscribtionListIsUptodate(), ticketForPlugin(), ACTIONLOG::trimLog(), TEMPLATE::update(), SKIN::update(), ITEM::update(), ADMIN::updateConfig(), ADMIN::updateFuturePosted(), TEMPLATE::updateGeneralInfo(), SKIN::updateGeneralInfo(), MEMBER::write(), BLOG::writeSettings(), and KARMA::writeToDatabase().

sql_table ( name  ) 

returns a prefixed nucleus table name

Definition at line 493 of file globalfunctions.php.

References $MYSQL_PREFIX.

Referenced by NucleusPlugin::_applyPluginOptions(), MANAGER::_cleanUpExpiredTickets(), NucleusPlugin::_createOption(), MANAGER::_generateTicket(), _getRecentItems(), _getRecentItemsBlogger(), _getRecentItemsMetaWeblog(), _getUsersBlogs(), MANAGER::_initCacheInfo(), ADMIN::_insertPluginOptions(), MANAGER::_loadSubscriptions(), _mt_getRecentPostTitles(), ADMIN::action_addnewlog(), ADMIN::action_batchmember(), ADMIN::action_batchteam(), ADMIN::action_blogcommentlist(), ADMIN::action_blogsettings(), ADMIN::action_browseowncomments(), ADMIN::action_browseownitems(), ADMIN::action_changemembersettings(), ADMIN::action_commentdeleteconfirm(), ADMIN::action_commentupdate(), ADMIN::action_itemcommentlist(), ADMIN::action_itemlist(), ADMIN::action_manageteam(), ADMIN::action_overview(), ADMIN::action_pluginadd(), ADMIN::action_pluginlist(), ADMIN::action_pluginupdate(), ADMIN::action_skinclone(), ADMIN::action_skindeleteconfirm(), ADMIN::action_skinedit(), ADMIN::action_skinieoverview(), ADMIN::action_skinremovetypeconfirm(), ADMIN::action_teamchangeadmin(), ADMIN::action_templateclone(), ADMIN::action_templatedeleteconfirm(), ACTIONLOG::add(), MEMBER::canAlterComment(), MEMBER::canBeDeleted(), MEMBER::canUpdateItem(), BLOG::checkJustPosted(), MANAGER::checkTicket(), MEMBER::cleanupActivationTable(), ACTIONLOG::clear(), TEMPLATE::createNew(), SKIN::createNew(), BLOG::createNewCategory(), TEMPLATE::deleteAllParts(), SKIN::deleteAllParts(), ADMIN::deleteOneMember(), do_backup(), TEMPLATE::exists(), SKIN::exists(), MEMBER::exists(), BLOG::exists(), MANAGER::existsCategory(), TEMPLATE::existsID(), SKIN::existsID(), MEMBER::existsID(), BLOG::existsID(), SKINEXPORT::export(), MEMBER::generateActivationEntry(), MEMBER::getActivationInfo(), getBlogIDFromCatID(), getBlogIDFromCommentID(), getBlogIDFromItemID(), getBlogIDFromName(), getBlogNameFromID(), BLOG::getCategoryDesc(), BLOG::getCategoryIdFromName(), BLOG::getCategoryName(), getCatIDFromName(), COMMENT::getComment(), getConfig(), SKIN::getFriendlyNames(), ITEM::getitem(), TEMPLATE::getNameFromId(), SKIN::getNameFromId(), NucleusPlugin::getOption(), getPluginNameFromPid(), BLOG::getSqlBlog(), BLOG::getSqlSearch(), listplug_table_pluginlist(), ADMIN::moveOneCategory(), numberOfEventSubscriber(), ADMIN::pagefoot(), TEMPLATE::read(), SEARCH::SEARCH(), ADMIN::selectBlog(), selector(), SKIN::SKIN(), NucleusPlugin::subscribtionListIsUptodate(), ACTIONLOG::trimLog(), TEMPLATE::update(), SKIN::update(), and ADMIN::updateFuturePosted().

startUpError ( msg,
title 
)

Errors before the database connection has been made

Definition at line 560 of file globalfunctions.php.

References $msg, exit, and head.

Referenced by selector(), and sql_connect().

stringStripTags ( string  ) 

Strip HTML tags from a string This function is a bit more intelligent than a regular call to strip_tags(), because it also deletes the contents of certain tags and cleans up any unneeded whitespace.

Definition at line 1853 of file globalfunctions.php.

Referenced by stringToAttribute(), and stringToXML().

stringToAttribute ( string  ) 

Make a string containing HTML safe for use in a HTML attribute Tags are stripped and entities are normalized

Definition at line 1869 of file globalfunctions.php.

References entity::named_to_numeric(), entity::normalize_numeric(), entity::numeric_to_named(), entity::numeric_to_utf8(), entity::specialchars(), and stringStripTags().

Referenced by ACTIONS::parse_itemtitle(), ACTIONS::parse_nextitemtitle(), ACTIONS::parse_previtemtitle(), and ITEMACTIONS::parse_title().

stringToXML ( string  ) 

Make a string containing HTML safe for use in a XML document Tags are stripped, entities are normalized and named entities are converted to numeric entities.

Definition at line 1888 of file globalfunctions.php.

References entity::named_to_numeric(), entity::normalize_numeric(), entity::numeric_to_utf8(), entity::specialchars(), and stringStripTags().

Referenced by COMMENTACTIONS::parse_excerpt(), ACTIONS::parse_itemtitle(), ACTIONS::parse_nextitemtitle(), ACTIONS::parse_previtemtitle(), and ITEMACTIONS::parse_title().

ticketForPlugin (  ) 

Check ticket when not checked in plugin's admin page to avoid CSRF. Also avoid the access to plugin/index.php by guest user.

Definition at line 1586 of file globalfunctions.php.

References $CONF, $DIR_LANG, $DIR_LIBS, $DIR_PLUGINS, $HTTP_GET_VARS, $HTTP_POST_VARS, $language, $manager, $mbemu_internals, $member, $oPluginAdmin, $query, _addInputTags(), exit, getLanguageName(), mysql_fetch_row(), mysql_free_result(), serverVar(), and sql_query().

toAscii ( html  ) 

Definition at line 1903 of file globalfunctions.php.

References _links_init(), and _links_list().

Referenced by BLOG::sendNewItemNotification().


Variable Documentation

$action = requestVar('action')

Definition at line 107 of file globalfunctions.php.

$amount = requestVar('amount')

$archive = requestVar('archive')

$archivelist = requestVar('archivelist')

Definition at line 101 of file globalfunctions.php.

Referenced by selectBlog(), selector(), and BLOG::showCategoryList().

$blogid = requestVar('blogid')

Definition at line 96 of file globalfunctions.php.

Referenced by _addDatedItem(), _addItem(), _categoryList(), _deleteItem(), _getItem(), _getItemBlogger(), _getRecentItems(), _getRecentItemsBlogger(), _getRecentItemsMetaWeblog(), _getSkinPart(), ACTIONS::_ifAdmin(), ACTIONS::_ifOnTeam(), _mt_categoryList(), _mt_getPostCategories(), _mt_getRecentPostTitles(), _mt_publishPost(), _mt_setPostCategories(), _mw_getPost(), _newMediaObject(), _setSkinPart(), ADMIN::action_additem(), ADMIN::action_addnewlog(), ADMIN::action_addnewlog2(), ADMIN::action_banlist(), ADMIN::action_banlistadd(), ADMIN::action_banlistdelete(), ADMIN::action_banlistdeleteconfirm(), ADMIN::action_banlistnew(), ADMIN::action_batchteam(), ADMIN::action_blogcommentlist(), ADMIN::action_blogsettings(), ADMIN::action_blogsettingsupdate(), ADMIN::action_bookmarklet(), ADMIN::action_categorydeleteconfirm(), ADMIN::action_categorynew(), ADMIN::action_createitem(), ADMIN::action_deleteblog(), ADMIN::action_deleteblogconfirm(), ADMIN::action_itemcommentlist(), ADMIN::action_itemdeleteconfirm(), ADMIN::action_itemlist(), ADMIN::action_itemmoveto(), ADMIN::action_itemupdate(), ADMIN::action_manageteam(), ADMIN::action_regfile(), ADMIN::action_sendping(), ADMIN::action_teamaddmember(), ADMIN::action_teamchangeadmin(), ADMIN::action_teamdelete(), ADMIN::action_teamdeleteconfirm(), BAN::addBan(), COMMENTS::addComment(), ACTION::addComment(), MEMBER::blogAdminRights(), bm_doAddItem(), bm_doEditItem(), bm_doShowForm(), bm_loginAndPassThrough(), MEMBER::canAddItem(), MEMBER::canUpdateItem(), ACTION::checkban(), createArchiveLink(), createArchiveListLink(), createBlogidLink(), ADMIN::deleteOneCategory(), ADMIN::deleteOneItem(), ADMIN::deleteOneTeamMember(), doError(), ACTION::doKarma(), f_blogger_editPost(), f_blogger_getRecentPosts(), f_blogger_getTemplate(), f_blogger_newPost(), f_blogger_setTemplate(), f_metaWeblog_editPost(), f_metaWeblog_getCategories(), f_metaWeblog_getRecentPosts(), f_metaWeblog_newMediaObject(), f_metaWeblog_newPost(), f_mt_getCategoryList(), f_mt_getRecentPostTitles(), f_nucleus_addDatedItem(), f_nucleus_addItem(), f_nucleus_getRecentItems(), SKIN::getAllowedActionsForType(), MANAGER::getBlog(), NucleusPlugin::getBlogOption(), BAN::isBanned(), MEMBER::isBlogAdmin(), MEMBER::isTeamMember(), ADMIN::moveOneCategory(), NAVLIST::NAVLIST(), PAGEFACTORY::PAGEFACTORY(), COMMENTACTIONS::parse_blogurl(), BAN::removeBan(), SEARCH::SEARCH(), selectBlog(), selector(), NucleusPlugin::setBlogOption(), NAVLIST::showNavigation(), MEMBER::teamRights(), and ADMIN::updateFuturePosted().

$bSanitizeAndContinue = 0

Definition at line 90 of file globalfunctions.php.

$catid = intRequestVar('catid')

case $CONF['SpecialskinKey']

Definition at line 432 of file globalfunctions.php.

case $CONF['MemberKey']

Definition at line 424 of file globalfunctions.php.

case $CONF['CategoryKey']

Definition at line 416 of file globalfunctions.php.

case $CONF['ArchiveKey']

Definition at line 394 of file globalfunctions.php.

case $CONF['ArchivesKey']

Definition at line 386 of file globalfunctions.php.

$CONF['CategoryURL'] = $CONF['Self']

Definition at line 62 of file globalfunctions.php.

$CONF['BlogURL'] = $CONF['Self']

Definition at line 61 of file globalfunctions.php.

$CONF['SearchURL'] = $CONF['Self']

Definition at line 60 of file globalfunctions.php.

$CONF['MemberURL'] = $CONF['Self']

Definition at line 59 of file globalfunctions.php.

$CONF['ArchiveListURL'] = $CONF['Self']

Definition at line 58 of file globalfunctions.php.

$CONF['ArchiveURL'] = $CONF['Self']

Definition at line 57 of file globalfunctions.php.

$CONF['ItemURL'] = $CONF['Self']

Definition at line 56 of file globalfunctions.php.

$CONF['alertOnSecurityRisk'] = 1

Definition at line 55 of file globalfunctions.php.

$CONF['debug'] = 0

Definition at line 28 of file globalfunctions.php.

global $CONF

Definition at line 21 of file globalfunctions.php.

global $DIR_LANG

Definition at line 21 of file globalfunctions.php.

global $DIR_LIBS

Definition at line 21 of file globalfunctions.php.

$error = ''

$errormessage = ''

$highlight = requestVar('highlight')

$imagepopup = requestVar('imagepopup')

Definition at line 102 of file globalfunctions.php.

Referenced by ACTIONS::parse_image(), and selector().

$itemid = intRequestVar('itemid')

$manager = & MANAGER::instance()

Definition at line 21 of file globalfunctions.php.

Referenced by NucleusPlugin::_applyPluginOptions(), _deleteItem(), _edititem(), _getItem(), _getItemBlogger(), ACTIONS::_ifAdmin(), ACTIONS::_ifHasPlugin(), ACTIONS::_ifOnTeam(), ACTIONS::_ifPlugin(), _mt_getPostCategories(), _mt_publishPost(), _mt_setPostCategories(), _mw_getPost(), ACTIONS::_postBlogContent(), ACTIONS::_preBlogContent(), ADMIN::_showActivationPage(), _skinfiles_deldir(), _skinfiles_deldir_process(), _skinfiles_delfile(), _skinfiles_delfile_process(), _skinfiles_download(), _skinfiles_editfile(), _skinfiles_emptydir(), _skinfiles_emptydir_process(), _skinfiles_rendir(), _skinfiles_rendir_process(), _skinfiles_renfile(), _skinfiles_renfile_process(), _skinfiles_uploadfile(), _skinfiles_viewfile(), ADMIN::action(), ADMIN::action_activatesetpwd(), ADMIN::action_additem(), ADMIN::action_batchcategory(), ADMIN::action_batchitem(), ADMIN::action_blogcommentlist(), ADMIN::action_blogsettings(), ADMIN::action_browseowncomments(), ADMIN::action_browseownitems(), ADMIN::action_categorynew(), ADMIN::action_changemembersettings(), ADMIN::action_commentdelete(), ADMIN::action_commentupdate(), ADMIN::action_createitem(), ADMIN::action_editmembersettings(), ADMIN::action_itemcommentlist(), ADMIN::action_itemdelete(), ADMIN::action_itemedit(), ADMIN::action_itemlist(), ADMIN::action_itemmove(), ADMIN::action_itemmoveto(), ADMIN::action_itemupdate(), ADMIN::action_manageteam(), ADMIN::action_memberadd(), ADMIN::action_sendping(), ADMIN::action_teamaddmember(), ADMIN::action_teamdelete(), ADMIN::action_usermanagement(), BAN::addBan(), COMMENTS::addComment(), ACTION::addComment(), BLOG::additem(), MEDIA::addMediaObject(), BLOG::addTeamMember(), ACTION::autoDraft(), ADMIN::batchAskDeleteConfirmation(), ADMIN::batchMoveCategorySelectDestination(), ADMIN::batchMoveSelectDestination(), bm_doAddItem(), bm_doEditForm(), bm_doEditItem(), ACTION::callPlugin(), MEMBER::canAddItem(), MEMBER::canUpdateItem(), ACTIONS::checkCondition(), BLOG::checkJustPosted(), ACTIONLOG::clear(), ACTION::createAccount(), PAGEFACTORY::createAddForm(), ITEM::createDraftFromRequest(), ITEM::createFromRequest(), createLink(), TEMPLATE::createNew(), SKIN::createNew(), BLOG::createNewCategory(), ITEM::delete(), ADMIN::deleteOneComment(), ADMIN::deleteOneItem(), ADMIN::deleteOneTeamMember(), do_backup(), PARSER::doAction(), doError(), ACTION::doKarma(), ITEM::exists(), f_blogger_editPost(), f_metaWeblog_editPost(), f_metaWeblog_newPost(), f_mt_getTrackbackPings(), f_nucleus_editItem(), ITEM::getitem(), PARSER::getProperty(), COMMENTS::isValidComment(), listplug_table_pluginlist(), listplug_table_plugoptionlist(), listplug_table_skinlist(), listplug_table_teamlist(), listplug_table_templatelist(), media_choose(), media_select(), ITEM::move(), PAGEFACTORY::PAGEFACTORY(), SKIN::parse(), COMMENTACTIONS::parse_blogurl(), ACTIONS::parse_callback(), ACTIONS::parse_categorylist(), ACTIONS::parse_commentform(), ACTIONS::parse_comments(), PAGEFACTORY::parse_extrahead(), ACTIONS::parse_itemtitle(), ITEMACTIONS::parse_karma(), ACTIONS::parse_otherarchive(), ACTIONS::parse_otherarchivedaylist(), ACTIONS::parse_otherarchivelist(), ACTIONS::parse_otherblog(), ACTIONS::parse_othersearchresults(), ITEMACTIONS::parse_plugin(), COMMENTACTIONS::parse_plugin(), BODYACTIONS::parse_plugin(), ACTIONS::parse_plugin(), PAGEFACTORY::parse_pluginextras(), ACTIONS::parse_preview(), ACTIONS::parse_searchform(), PAGEFACTORY::parse_ticket(), ACTIONS::parse_ticket(), COMMENTACTIONS::parse_user(), COMMENTACTIONS::parse_useremail(), PluginAdmin::PluginAdmin(), BAN::removeBan(), BLOG::search(), selector(), sendContentType(), COMMENTACTIONS::setCurrentComment(), PARSER::setProperty(), sfShowDirectory(), BLOG::showArchiveList(), BLOG::showBlogList(), BLOG::showCategoryList(), COMMENTS::showComments(), BATCH::showOperationList(), BLOG::showUsingQuery(), ticketForPlugin(), ITEM::update(), ADMIN::updateFuturePosted(), ACTION::updateTicket(), and ACTION::validateMessage().

$maxresults = requestVar('maxresults')

global $member

Definition at line 21 of file globalfunctions.php.

Referenced by MANAGER::_generateTicket(), ACTIONS::_ifAdmin(), ACTIONS::_ifOnTeam(), ADMIN::action_additem(), ADMIN::action_batchcategory(), ADMIN::action_batchcomment(), ADMIN::action_batchitem(), ADMIN::action_batchmember(), ADMIN::action_batchteam(), ADMIN::action_blogcommentlist(), ADMIN::action_blogsettings(), ADMIN::action_browseowncomments(), ADMIN::action_browseownitems(), ADMIN::action_categorynew(), ADMIN::action_changemembersettings(), ADMIN::action_commentdelete(), ADMIN::action_commentdeleteconfirm(), ADMIN::action_commentupdate(), ADMIN::action_createitem(), ADMIN::action_editmembersettings(), ADMIN::action_itemcommentlist(), ADMIN::action_itemdelete(), ADMIN::action_itemdeleteconfirm(), ADMIN::action_itemedit(), ADMIN::action_itemlist(), ADMIN::action_itemmove(), ADMIN::action_itemmoveto(), ADMIN::action_itemupdate(), ADMIN::action_login(), ADMIN::action_manage(), ADMIN::action_manageteam(), ADMIN::action_memberadd(), ADMIN::action_overview(), ADMIN::action_sendping(), ADMIN::action_teamaddmember(), ADMIN::action_teamchangeadmin(), ADMIN::action_teamdelete(), ADMIN::action_teamdeleteconfirm(), ADMIN::action_usermanagement(), ACTIONLOG::add(), COMMENTS::addComment(), bm_doAddItem(), bm_doEditForm(), bm_doEditItem(), bm_doShowForm(), ACTIONS::checkCondition(), MANAGER::checkTicket(), ITEM::createDraftFromRequest(), ITEM::createFromRequest(), BLOG::createNewCategory(), ADMIN::deleteOneComment(), ADMIN::deleteOneItem(), ADMIN::deleteOneTeamMember(), ACTION::doKarma(), NP_SkinFiles::event_QuickMenu(), MEDIA::getCollectionList(), getLanguageName(), BLOG::insertJavaScriptInfo(), MEDIA::isValidCollection(), COMMENTS::isValidComment(), ITEMACTIONS::ITEMACTIONS(), media_choose(), media_select(), media_upload(), ADMIN::moveOneItem(), NOTIFICATION::notify(), PAGEFACTORY::parse_authorname(), ACTIONS::parse_commentform(), ITEMACTIONS::parse_edit(), ACTIONS::parse_loginform(), ACTIONS::parse_member(), ACTIONS::parse_membermailform(), COMMENTACTIONS::parse_user(), COMMENTACTIONS::parse_useremail(), ADMIN::selectBlog(), selector(), ACTION::sendMessage(), BLOG::sendNewItemNotification(), ticketForPlugin(), and ACTION::validateMessage().

$memberid = requestVar('memberid')

$msg = $orgRequestURI . " -> " . serverVar('REQUEST_URI')

$nextaction = requestVar('nextaction')

Definition at line 108 of file globalfunctions.php.

$nucleus['codename'] = ''

Definition at line 24 of file globalfunctions.php.

$nucleus['version'] = 'v3.31SP1'

Definition at line 23 of file globalfunctions.php.

global $nucleus

http://nucleuscms.org/license.txt GNU General Public License Copyright (C) 2002-2007 The Nucleus Group

Version:
Id
globalfunctions.php 1211 2007-10-21 17:43:27Z kaigreve
NucleusJP
globalfunctions.php,v 1.23.2.7 2008/02/05 08:30:08 kimitake Exp

Definition at line 21 of file globalfunctions.php.

Referenced by do_backup(), ADMIN::pagehead(), and ACTIONS::parse_version().

$orgRequestURI = serverVar('REQUEST_URI')

Definition at line 92 of file globalfunctions.php.

$pw = postVar('password')

Definition at line 195 of file globalfunctions.php.

Referenced by MEMBER::checkPassword().

$query = requestVar('query')

Definition at line 104 of file globalfunctions.php.

Referenced by NucleusPlugin::_applyPluginOptions(), _categoryList(), MANAGER::_cleanUpExpiredTickets(), NucleusPlugin::_createOption(), MANAGER::_generateTicket(), NucleusPlugin::_getOptionTop(), _getRecentItems(), _getRecentItemsBlogger(), _getRecentItemsMetaWeblog(), _getUsersBlogs(), ADMIN::_insertPluginOptions(), _mt_categoryList(), _mt_getRecentPostTitles(), ACTIONS::_searchlink(), ADMIN::action_actionlog(), ADMIN::action_addnewlog(), ADMIN::action_banlist(), ADMIN::action_blogcommentlist(), ADMIN::action_blogsettings(), ADMIN::action_browseowncomments(), ADMIN::action_browseownitems(), ADMIN::action_categorynew(), ADMIN::action_commentupdate(), ADMIN::action_createnewlog(), ADMIN::action_deleteblogconfirm(), ADMIN::action_itemcommentlist(), ADMIN::action_itemlist(), ADMIN::action_manageteam(), ADMIN::action_overview(), ADMIN::action_pluginadd(), ADMIN::action_pluginlist(), ADMIN::action_settingsedit(), ADMIN::action_skinclone(), ADMIN::action_skindelete(), ADMIN::action_skindeleteconfirm(), ADMIN::action_skinedit(), ADMIN::action_skinedittype(), ADMIN::action_skinoverview(), ADMIN::action_teamchangeadmin(), ADMIN::action_templateoverview(), ADMIN::action_templateupdate(), ADMIN::action_usermanagement(), ACTIONLOG::add(), BAN::addBan(), COMMENTS::addComment(), BLOG::additem(), BLOG::addTeamMember(), ADMIN::addToTemplate(), COMMENTS::amountComments(), MEMBER::canAlterComment(), MEMBER::canAlterItem(), MANAGER::checkTicket(), ACTIONLOG::clear(), BLOG::clearFuturePost(), MEMBER::create(), BLOG::createNewCategory(), ITEM::delete(), ADMIN::deleteOneCategory(), ADMIN::deleteOneComment(), ADMIN::deleteOneMember(), ADMIN::deleteOneTeamMember(), MEMBER::generateActivationEntry(), MEMBER::getActivationInfo(), MEMBER::getAdminBlogs(), COMMENT::getComment(), getConfig(), SKIN::getContent(), TEMPLATE::getDesc(), SKIN::getFriendlyNames(), TEMPLATE::getIdFromName(), SKIN::getIdFromName(), ITEM::getitem(), NucleusPlugin::getOption(), BLOG::getSqlBlog(), BLOG::getSqlSearch(), BAN::isBanned(), MEMBER::isBlogAdmin(), MEMBER::isTeamMember(), BLOG::isValidCategory(), KARMA::isVoteAllowed(), ITEM::move(), ADMIN::moveOneCategory(), mysql_query(), numberOfEventSubscriber(), ADMIN::pagefoot(), ACTIONS::parse_othersearchresults(), ACTIONS::parse_query(), ACTIONS::parse_searchresults(), parseHighlight(), TEMPLATE::read(), MEMBER::read(), KARMA::readFromDatabase(), BLOG::readLogAmount(), BLOG::readSettings(), BAN::removeBan(), KARMA::saveIP(), BLOG::search(), selector(), BLOG::setFuturePost(), BLOG::showArchiveList(), NAVLIST::showBatchList(), BLOG::showBlogList(), BLOG::showCategoryList(), COMMENTS::showComments(), showlist(), BATCH::showList(), BLOG::showUsingQuery(), ADMIN::skinclonetype(), sql_query(), ticketForPlugin(), ITEM::update(), ADMIN::updateConfig(), TEMPLATE::updateGeneralInfo(), SKIN::updateGeneralInfo(), MEMBER::write(), BLOG::writeSettings(), and KARMA::writeToDatabase().

$shared = intPostVar('shared')

Definition at line 196 of file globalfunctions.php.

Referenced by MEMBER::setCookies().

$skinid = requestVar('skinid')

$SQLCount = 0

Definition at line 144 of file globalfunctions.php.

Referenced by sql_query().

$startpos = intRequestVar('startpos')

$virtualpath = ((getVar('virtualpath') != null) ? getVar('virtualpath') : serverVar('PATH_INFO'))

Definition at line 113 of file globalfunctions.php.

case __pad0__

Definition at line 179 of file globalfunctions.php.

case __pad1__

Definition at line 182 of file globalfunctions.php.

case __pad2__

Definition at line 185 of file globalfunctions.php.

default __pad3__

Definition at line 188 of file globalfunctions.php.

Definition at line 177 of file globalfunctions.php.

Definition at line 278 of file globalfunctions.php.



Generated on Wed Jun 25 17:26:00 2008 by  doxygen 1.5.5