b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 1.8) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Procedural File: _misc.funcs.php

Source Location: /blogs/inc/_misc/_misc.funcs.php

Page Details

This file implements general purpose functions.

This file is part of the evoCore framework - http://evocore.net/ See also http://sourceforge.net/projects/evocms/.

Author:  fplanque: Francois PLANQUE.
Author:  blueyed: Daniel HAHLER.
Author:  cafelog (team)
Author:  sakichan: Nobuo SAKIYAMA.
Author:  jeffbearer: Jeff BEARER.
Author:  vegarg: Vegar BERG GULDAL.
Author:  mbruneau: Marc BRUNEAU / PROGIDISTRI
Version:  $Id: _misc.funcs.php,v 1.54.2.18 2006/11/02 16:29:44 blueyed Exp $
Copyright:  

(c)2003-2006 by Francois PLANQUE - http://fplanque.net/ Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - http://thequod.de/contact. Parts of this file are copyright (c)2005-2006 by PROGIDISTRI - http://progidistri.com/.

Todo:  

Refactor into smaller chunks/files. We should avoid using a "huge" misc early!

Filesource:  Source Code for this file
Includes
require_once ($model_path.'antispam/_antispam.funcs.php') [line 53]

Dependencies

[ Top ]

require_once ($model_path.'files/_file.funcs.php') [line 54]
[ Top ]


Functions
action_icon  [line 2226]

string action_icon( string $title, string $icon, string $url, [string $word = NULL], [integer $icon_weight = 4], [integer $word_weight = 1], [array $link_attribs = array( 'class'=>'action_icon' )]  )

Create IMG tag for an action icon.

Parameters:
string   $title:  TITLE text (IMG and A link)
string   $icon:  icon code for get_icon()
string   $url:  URL where the icon gets linked to (empty to not wrap the icon in a link)
string   $word:  word to be displayed after icon
integer   $icon_weight:  1-5: weight of the icon. the icon will be displayed only if its weight is >= than the user setting threshold
integer   $word_weight:  1-5: weight of the word. the word will be displayed only if its weight is >= than the user setting threshold
array   $link_attribs:  Additional attributes to the A tag. It may also contain these params: 'use_js_popup': if true, the link gets opened as JS popup. You must also pass an "id" attribute for this! 'use_js_size': use this to override the default popup size ("500, 400")

API Tags:
Return:  The generated action icon link.


[ Top ]
autobrize  [line 227]

void autobrize( $content  )
Parameters:
   $content: 


[ Top ]
autoquote  [line 1464]

void autoquote( &$string  )
Parameters:
   &$string: 


[ Top ]
bad_request_die  [line 1821]

void bad_request_die( [string $additional_info = '']  )

Outputs Bad request Error message. When in debug mode it also prints a backtrace.

This should be used when a bad user input is detected?

Parameters:
string   $additional_info:  Message to output


[ Top ]
balanceTags  [line 886]

void balanceTags( $text  )
Parameters:
   $text: 


[ Top ]
base_tag  [line 2959]

string base_tag( string $url  )

Returns a "<base />" tag and remembers that we've used it (regenerate_url() needs this).

Parameters:
string   $url:  URL to use (this gets used as base URL for all relative links on the HTML page)


[ Top ]
bullet  [line 2507]

void bullet( boolean $bool  )

Displays an empty or a full bullet based on boolean

Parameters:
boolean   $bool:  true for full bullet, false for empty bullet


[ Top ]
callback_on_non_matching_blocks  [line 320]

string callback_on_non_matching_blocks( string $text, string $pattern, callback $callback, [array $params = array()]  )

Split $text into blocks by using $pattern and call $callback on the non-matching blocks.

The non-matching block's text is the first param to $callback and additionally $params gets passed.

This gets used to make links clickable or replace smilies.

E.g., to replace only in non-HTML tags, call it like:

  1. callback_on_non_matching_blocks$text'~<[^>]*>~s''your_callback' );

Parameters:
string   $text:  Text to handle
string   $pattern:  Regular expression pattern that defines blocks to exclude.
callback   $callback:  Function name or object/method array to use as callback. Each non-matching block gets passed as first param, additional params may be passed with $params.
array   $params:  Of additional ("static") params to $callback.

API Tags:
Usedby:  make_clickable()
Usedby:  smilies_plugin::ReplaceTagSafe()


[ Top ]
compact_date  [line 2739]

void compact_date( string $date  )

Compact a date in a number keeping only integer value of the string

Parameters:
string   $date:  date


[ Top ]
convert_chars  [line 265]

void convert_chars( $content, [ $flag = 'html']  )

Convert all non ASCII chars (except if UTF-8, GB2312 or CP1251) to &#nnnn; unicode references.

Also convert entities to &#nnnn; unicode references if output is not HTML (eg XML)

Preserves < > and quotes.

fplanque: simplified sakichan: pregs instead of loop

Parameters:
   $content: 
   $flag: 


[ Top ]
date2mysql  [line 409]

void date2mysql( $ts  )

*** // Formatting functions ****

Parameters:
   $ts: 


[ Top ]
date_i18n  [line 473]

void date_i18n( string $dateformatstring, integer $unixtimestamp, [boolean $useGM = false]  )

Date internationalization: same as date() formatting but with i18n support

Parameters:
string   $dateformatstring:  enhanced format string
integer   $unixtimestamp:  UNIX timestamp
boolean   $useGM:  true to use GM time


[ Top ]
date_sprintf  [line 542]

void date_sprintf( $string, $timestamp  )

Format dates into a string in a way similar to sprintf()

Parameters:
   $string: 
   $timestamp: 


[ Top ]
date_sprintf_callback  [line 549]

void date_sprintf_callback( $matches  )
Parameters:
   $matches: 


[ Top ]
debug_die  [line 1778]

void debug_die( [string $additional_info = '']  )

Outputs Unexpected Error message. When in debug mode it also prints a backtrace.

This should be used instead of die() everywhere. This should NOT be used instead of exit() anywhere. Dying means the application has encontered and unexpected situation, i-e: something that should never occur during normal operation. Examples: database broken, user changed URL by hand...

Parameters:
string   $additional_info:  Message to output


[ Top ]
debug_fclose  [line 857]

void debug_fclose( $fp  )
Parameters:
   $fp: 


[ Top ]
debug_fopen  [line 837]

void debug_fopen( $filename, $mode  )
Parameters:
   $filename: 
   $mode: 


[ Top ]
debug_fwrite  [line 848]

void debug_fwrite( $fp, $string  )
Parameters:
   $fp: 
   $string: 


[ Top ]
debug_get_backtrace  [line 1584]

string debug_get_backtrace( [integer|NULL $limit_to_last = NULL], [array $ignore_from = array( 'function' =&gt; 'debug_get_backtrace' )], [integer $offset_ignore_from = 0]  )

Get a function trace from http://www.php.net/debug_backtrace as html table.

Adopted from http://us2.php.net/manual/de/function.debug-backtrace.php#47644.

Parameters:
integer|NULL   $limit_to_last:  Get the last x entries from the stack (after $ignore_from is applied). Anything non-numeric means "all".
array   $ignore_from:  After a key/value pair matches a stack entry, this and the rest is ignored. For example, array('class' => 'DB') would exclude everything after the stack "enters" class DB and everything that got called afterwards. You can also give an array of arrays which means that every condition in one of the given array must match.
integer   $offset_ignore_from:  Number of stack entries to include, after $ignore_from matches.

API Tags:
Return:  HTML table


[ Top ]
debug_info  [line 1860]

void debug_info( [boolean $force = false]  )

Outputs debug info, according to $debug or $force param. This gets called typically at the end of the page.

Parameters:
boolean   $force:  true to force output


[ Top ]
decompact_date  [line 2750]

void decompact_date( string $date  )

Decompact a date in a date format ( Y-m-d h:m:s )

Parameters:
string   $date:  date


[ Top ]
display_list  [line 3017]

void display_list( $items, [ $list_start = '&lt;ul&gt;'], [ $list_end = '&lt;/ul&gt;'], [ $item_separator = ''], [ $item_start = '&lt;li&gt;'], [ $item_end = '&lt;/li&gt;']  )

Display an array as a list:

Parameters:
   $items: 
   $list_start: 
   $list_end: 
   $item_separator: 
   $item_start: 
   $item_end: 


[ Top ]
disp_cond  [line 2189]

void disp_cond( mixed $var, string $disp_one, [string $disp_more = NULL], [string $disp_none = NULL]  )

If first parameter evaluates to true printf() gets called using the first parameter as args and the second parameter as print-pattern

Parameters:
mixed   $var:  variable to test and output if it's true or $disp_none is given
string   $disp_one:  printf-pattern to use (%s gets replaced by $var)
string   $disp_more:  printf-pattern to use, if $var is numeric and > 1 (%s gets replaced by $var)
string   $disp_none:  printf-pattern to use if $var evaluates to false (%s gets replaced by $var)


[ Top ]
forget_param  [line 1272]

void forget_param( $var  )

Forget a param so that is will not get included in subsequent regenerate_url() calls.

Parameters:
   $var: 


[ Top ]
format_french_phone  [line 2820]

void format_french_phone( string $phone  )

Format a string in a french phone number

Parameters:
string   $phone:  phone number


[ Top ]
format_phone  [line 2764]

void format_phone( string $phone, [ $hide_country_dialing_code_if_same_as_locale = true]  )

Check the format of the phone number param and format it in a french number if it is.

Parameters:
string   $phone:  phone number
   $hide_country_dialing_code_if_same_as_locale: 


[ Top ]
format_to_output  [line 75]

string format_to_output( string $content, [string $format = 'htmlbody']  )

Format a string/content for being output

Parameters:
string   $content:  raw text
string   $format:  format, can be one of the following
  • raw: do nothing
  • htmlbody: display in HTML page body: allow full HTML
  • entityencoded: Special mode for RSS 0.92: allow full HTML but escape it
  • htmlhead: strips out HTML (mainly for use in Title)
  • htmlattr: use as an attribute: escapes quotes, strip tags
  • formvalue: use as a form value: escapes quotes and < > but leaves code alone
  • xml: use in an XML file: strip HTML tags
  • xmlattr: use as an attribute: strips tags and escapes quotes

API Tags:
Return:  formatted text

Information Tags:
Author:  fplanque

[ Top ]
format_to_post  [line 152]

string format_to_post( string $content, [integer $autobr = 0], [integer $is_comment = 0], [string $encoding = NULL]  )

Format raw HTML input to cleaned up and validated HTML.

Parameters:
string   $content:  The content to format
integer   $autobr:  Create automated
tags? (Deprecated??!)
integer   $is_comment:  Is this a comment? (Used for balanceTags(), SafeHtmlChecker()'s URI scheme, styling restrictions)
string   $encoding:  Encoding (used for SafeHtmlChecker() only!); defaults to $io_charset


[ Top ]
form_date  [line 2496]

void form_date( string $date, [string $time = '']  )
Parameters:
string   $date:  date
string   $time:  time


[ Top ]
generate_random_key  [line 2584]

string generate_random_key( [integer $length = NULL]  )

Generate a valid key of size $length.

Parameters:
integer   $length:  length of key (defaults to minimal password length)

API Tags:
Return:  key


[ Top ]
get_base_domain  [line 2568]

string get_base_domain( string $url  )

Get the base domain (without protocol and "www.") of an URL.

We only strip "www." here (and not any/all subdomain(s))!

Parameters:
string   $url:  URL

API Tags:
Return:  the base domain


[ Top ]
get_field_attribs_as_string  [line 2869]

string get_field_attribs_as_string( array $field_attribs, [boolean $format_to_output = true]  )

Build a string out of $field_attribs, with each attribute prefixed by a space character.

Parameters:
array   $field_attribs:  Array of field attributes.
boolean   $format_to_output:  Use format_to_output() for the attributes?


[ Top ]
get_icon  [line 2332]

void get_icon( string $iconKey, [string $what = 'imgtag'], [array $params = NULL], [boolean $include_in_legend = false]  )

Get properties of an icon.

Note: to get a file type icon, use File::get_icon() instead.

Parameters:
string   $iconKey:  icon for what? (key)
string   $what:  what to return for that icon ('imgtag', 'alt', 'legend', 'file', 'url', 'size' imgsize())
array   $params:  additional params ( 'class' => class name when getting 'imgtag', 'size' => param for 'size', 'title' => title attribute for 'imgtag')
boolean   $include_in_legend:  true to include this icon into the legend at the bottom of the page (works for 'imgtag' only)

API Tags:
Uses:  $map_iconfiles


[ Top ]
get_ip_list  [line 2523]

array|string get_ip_list( [boolean $firstOnly = false]  )

Get list of client IP addresses from REMOTE_ADDR and HTTP_X_FORWARDED_FOR, in this order. '' is used when no IP could be found.

Parameters:
boolean   $firstOnly:  True, to get only the first IP (probably REMOTE_ADDR)

API Tags:
Return:  Depends on first param.


[ Top ]
get_link_showhide  [line 2724]

string get_link_showhide( string $link_id, string $target_id, $text_when_displayed, $text_when_hidden, [ $display_hidden = true]  )

Generate a link that toggles display of an element on clicking.

Parameters:
string   $link_id:  ID (html) of the link
string   $target_id:  ID (html) of the target to toggle displaying
   $text_when_displayed: 
   $text_when_hidden: 
   $display_hidden: 

API Tags:
Uses:  toggle_display_by_id() - (JS)

Information Tags:
Todo:  Provide functionality to make those links accessible without JS (using GET parameter)

[ Top ]
get_memorized  [line 1411]

void get_memorized( [mixed $ignore = '']  )

Construct an array of memorized params which are not in the ignore list

Parameters:
mixed   $ignore:  string or array of ignore params


[ Top ]
get_path  [line 1447]

void get_path( [ $which = '']  )

get_path(-)

Parameters:
   $which: 


[ Top ]
get_start_date_for_week  [line 564]

void get_start_date_for_week( integer $year, integer $week, integer $startofweek  )
Parameters:
integer   $year:  year
integer   $week:  month (0-53)
integer   $startofweek:  0 for sunday, 1 for monday


[ Top ]
get_web_help_link  [line 2840]

string get_web_help_link( string $topic  )

Generate a link to a online help resource.

testing the concept of online help (aka webhelp). this function should be relocated somewhere better if it is taken onboard by the project

Parameters:
string   $topic:  Topic The topic should be in a format like [\w]+(/[\w]+)*, e.g features/online_help.

Information Tags:
Todo:  replace [?] with icon,
Todo:  

write url suffix dynamically based on topic and language

QUESTION: launch new window with javascript maybe?


[ Top ]
get_weekstartend  [line 598]

void get_weekstartend( date $date, integer $startOfWeek  )

Get start and end day of a week, based on week number and start-of-week

Used by Calendar

fp>> I'd really like someone to comment the magic of that thing...

Parameters:
date   $date: 
integer   $startOfWeek:  0 for Sunday, 1 for Monday


[ Top ]
header_nocache  [line 2615]

void header_nocache( )

Sends HTTP headers to avoid caching of the page.



[ Top ]
header_redirect  [line 2634]

void header_redirect( [string $redirect_to = NULL]  )

Sends HTTP header to redirect to the previous location (which can be given as function parameter, GET parameter (redirect_to), is taken from Hit::referer or $baseurl).

NOTE: This function exit() the php script execution.

Parameters:
string   $redirect_to:  Override detection of where we redirect to.


[ Top ]
implode_with_and  [line 2929]

string implode_with_and( $arr, [ $implode_by = ', '], [ $implode_last = NULL]  )

Implode array( 'x', 'y', 'z' ) to something like 'x, y and z'. Useful for displaying list to the end user.

If there's one element in the table, it is returned. If there are at least two elements, the last one is concatenated using $implode_last, while the ones before are imploded using $implode_by.

Parameters:
   $arr: 
   $implode_by: 
   $implode_last: 

Information Tags:
Todo:  Support for locales that have a different kind of enumeration?!

[ Top ]
is_admin_page  [line 2912]

boolean is_admin_page( )

Is the current page an admin/backoffice page?



[ Top ]
is_create_action  [line 2690]

void is_create_action( $action  )
Parameters:
   $action: 


[ Top ]
is_email  [line 633]

bool|array is_email( string $email, [string $format = 'simple'], [boolean $return_match = false]  )

Check that email address looks valid.

Parameters:
string   $email:  email address to check
string   $format:  Format to use ('simple', 'rfc') 'simple': Single email address. 'rfc': Full email address, may include name (RFC2822)
  • example@example.org
  • Me <example@example.org>
  • "Me" <example@example.org>
boolean   $return_match:  Return the match or boolean

API Tags:
Return:  Either true/false or the match (see $return_match)


[ Top ]
is_regexp  [line 2144]

boolean is_regexp( string $reg_exp, [boolean $includes_delim = false]  )

Checks if a given regular expression is valid.

It changes the error_handler and restores it.

Parameters:
string   $reg_exp:  the regular expression to test
boolean   $includes_delim:  does the regular expression includes delimiters (and optionally modifiers)?

Information Tags:
Author:  plenque at hotmail dot com http://php.net/manual/en/function.preg-match.php

[ Top ]
is_windows  [line 697]

void is_windows( )

Are we running on a Windows server?



[ Top ]
make_clickable  [line 367]

string make_clickable( $text, [ $moredelim = '&amp;amp;']  )

Make links clickable in a given text.

It replaces only text which is not between <a> tags already.

Parameters:
   $text: 
   $moredelim: 

API Tags:
Uses:  callback_on_non_matching_blocks()


[ Top ]
make_clickable_callback  [line 386]

string make_clickable_callback( &$text, [ $moredelim = '&amp;amp;']  )

Callback function for make_clickable().

Parameters:
   &$text: 
   $moredelim: 

API Tags:
Return:  The clickable text.

Information Tags:
Todo:  

IMHO it would be better to use "\b" (word boundary) to match the beginning of links..

original function: phpBB, extended here for AIM & ICQ fplanque restricted :// to http:// and mailto:// Fixed to not include trailing dot and comma.


[ Top ]
memorize_param  [line 1238]

void memorize_param( string $var, string $type, mixed $default, [mixed $value = NULL]  )

Memorize a parameter for automatic future use in regenerate_url()

Parameters:
string   $var:  Variable to memorize
string   $type:  Type of the variable
mixed   $default:  Default value to compare to when regenerating url
mixed   $value:  Value to set


[ Top ]
mysql2date  [line 453]

void mysql2date( string $dateformatstring, string $mysqlstring, [boolean $useGM = false]  )

Format a MYSQL date.

Parameters:
string   $dateformatstring:  enhanced format string
string   $mysqlstring:  MYSQL date YYYY-MM-DD HH:MM:SS
boolean   $useGM:  true to use GM time


[ Top ]
mysql2datestamp  [line 425]

void mysql2datestamp( $m  )

Convert a MYSQL date -- WITHOUT the time -- to a UNIX timestamp

Parameters:
   $m: 


[ Top ]
mysql2localedate  [line 435]

void mysql2localedate( string $mysqlstring  )

Format a MYSQL date to current locale date format.

Parameters:
string   $mysqlstring:  MYSQL date YYYY-MM-DD HH:MM:SS


[ Top ]
mysql2localedatetime  [line 440]

void mysql2localedatetime( $mysqlstring  )
Parameters:
   $mysqlstring: 


[ Top ]
mysql2timestamp  [line 417]

void mysql2timestamp( $m  )

Convert a MYSQL date to a UNIX timestamp

Parameters:
   $m: 


[ Top ]
param  [line 1070]

mixed param( string $var, [string $type = ''], [mixed $default = ''], [boolean $memorize = false], [boolean $override = false], [boolean $use_default = true], [mixed $strict_typing = 'allow_empty']  )

Sets a parameter with values from the request or to provided default, except if param is already set!

Also removes magic quotes if they are set automatically by PHP. Also forces type. Priority order: POST, GET, COOKIE, DEFAULT.

Parameters:
string   $var:  Variable to set
string   $type:  Force value type to one of:
  • integer
  • float, double
  • string (strips (HTML-)Tags, trims whitespace)
  • array (TODO: array/integer , array/array/string )
  • html (does nothing)
  • '' (does nothing)
  • '/^...$/' check regexp pattern match (string)
  • boolean (will force type to boolean, but you can't use 'true' as a default since it has special meaning. There is no real reason to pass booleans on a URL though. Passing 0 and 1 as integers seems to be best practice).
Value type will be forced only if resulting value (probably from default then) is !== NULL
mixed   $default:  Default value or TRUE if user input required
boolean   $memorize:  Do we need to memorize this to regenerate the URL for this page?
boolean   $override:  Override if variable already set
boolean   $use_default:  Force setting of variable to default if no param is sent and var wasn't set before
mixed   $strict_typing:  true will refuse illegal values, false will try to convert illegal to legal values, 'allow_empty' will refuse illegal values but will always accept empty values (This helps blocking dirty spambots or borked index bots. Saves a lot of processor time by killing invalid requests)

API Tags:
Return:  Final value of Variable, or false if we don't force setting and did not set


[ Top ]
pre_dump  [line 1546]

void pre_dump( $var__var__var__var__  )

Wrap pre tag around http://www.php.net/var_dump for better debugging.

Parameters:
   $var__var__var__var__: 


[ Top ]
regenerate_url  [line 1292]

void regenerate_url( [mixed $ignore = ''], [mixed $set = ''], [mixed $pagefileurl = '']  )

Regenerate current URL from parameters This may clean it up But it is also useful when generating static pages: you cannot rely on $_REQUEST[]

Parameters:
mixed   $ignore:  string (delimited by commas) or array of params to ignore (can be regexps in /.../)
mixed   $set:  string or array of param(s) to set
mixed   $pagefileurl:  string Alternative URL we want to point to if not the current URL (may be absolute if BASE tag gets used)


[ Top ]
remove_magic_quotes  [line 1013]

void remove_magic_quotes( $mixed  )
Parameters:
   $mixed: 


[ Top ]
send_mail  [line 2047]

boolean send_mail( string $to, string $subject, string $message, [string $from = NULL], [array $headers = array()]  )

Sends a mail, wrapping PHP's mail() function.

$current_locale will be used to set the charset.

Note: we use a single \n as line ending, though it does not comply to RFC2822, but seems to be safer, because some mail transfer agents replace \n by \r\n automatically.

Parameters:
string   $to:  Recipient, either email only or in "Name <example@example.com>" format (RFC2822). Can be multiple comma-separated addresses.
string   $subject:  Subject of the mail
string   $message:  The message text
string   $from:  From address, being added to headers (we'll prevent injections); see http://securephp.damonkohler.com/index.php/Email_Injection. Might be just an email address or of the same form as $to. $notify_from gets used as default (if NULL).
array   $headers:  Additional headers ( headername => value ). Take care of injection!

API Tags:
Return:  True if mail could be sent (not necessarily delivered!), false if not - (return value of http://www.php.net/mail)


[ Top ]
set_param  [line 1262]

void set_param( $var, $value  )

Set the value of a param (by force! :P)

Parameters:
   $var: 
   $value: 


[ Top ]
unautobrize  [line 237]

void unautobrize( $content  )
Parameters:
   $content: 


[ Top ]
unserialize_callback  [line 2979]

boolean unserialize_callback( $classname  )

This gets used as a http://www.php.net/unserialize callback function, which is responsible to load the requested class.

Parameters:
   $classname: 

API Tags:
Return:  True, if the required class could be loaded; false, if not

Information Tags:
Todo:  

Once we require PHP5, we should think about using this as __autoload function.

Currently, this just gets used by the Session class and includes the Comment class and its dependencies.


[ Top ]
url_add_param  [line 1988]

void url_add_param( string $url, string $param, [string $moredelim = '&amp;amp;']  )

Add param(s) at the end of an URL, using either "?" or "&amp;" depending on existing url

Parameters:
string   $url:  existing url
string   $param:  params to add
string   $moredelim:  delimiter to use for more params


[ Top ]
url_add_tail  [line 2011]

void url_add_tail( string $url, string $tail  )

Add a tail (starting with "/") at the end of an URL before any params (starting with "?")

Parameters:
string   $url:  existing url
string   $tail:  tail to add


[ Top ]
validate_url  [line 1488]

mixed validate_url( string $url, array &$allowed_uri_scheme  )

Check the validity of a given URL

Checks allowed URI schemes and URL ban list. URL can be empty.

Note: We have a problem when trying to "antispam" a keyword which is already blacklisted If that keyword appears in the URL... then the next page has a bad referer! :/

Parameters:
string   $url:  Url to validate
array   &$allowed_uri_scheme:  Allowed URI schemes (see /conf/_formatting.php)

API Tags:
Return:  false (which means OK) or error message


[ Top ]
xmlrpc_displayresult  [line 752]

void xmlrpc_displayresult( object XMLRPC $result, [boolean $display = true], [mixed $log = '']  )

Echo the XML-RPC call Result and optionally log into file

Parameters:
object XMLRPC   $result:  response object
boolean   $display:  true to echo
mixed   $log:  File resource or == '' for no file logging.


[ Top ]
xmlrpc_getpostcategory  [line 722]

void xmlrpc_getpostcategory( $content  )

Also used by post by mail

Parameters:
   $content: 


[ Top ]
xmlrpc_getposttitle  [line 704]

void xmlrpc_getposttitle( $content  )
Parameters:
   $content: 


[ Top ]
xmlrpc_logresult  [line 799]

boolean xmlrpc_logresult( object XMLRPC $result, Log &$message_Log  )

Log the XML-RPC call Result into LOG object

Parameters:
object XMLRPC   $result:  response object
Log   &$message_Log:  object to add messages to

API Tags:
Return:  true = success, false = error


[ Top ]
xmlrpc_removepostdata  [line 736]

void xmlrpc_removepostdata( $content  )
Parameters:
   $content: 


[ Top ]
zeroise  [line 247]

void zeroise( $number, $threshold  )
Parameters:
   $number: 
   $threshold: 


[ Top ]
_trapError  [line 2163]

integer _trapError( [ $reset = 1]  )

Meant to replace error handler temporarily.

Parameters:
   $reset: 

API Tags:
Return:  number of errors


[ Top ]


Documentation generated on Tue, 18 Dec 2007 23:19:35 +0100 by phpDocumentor 1.4.0