XF handles all low-level including initialization, database connection and basic abstraction layers
Located in /class.root.php (line 41)
check if selected user can access an 'action'
narrows an array to string
transforms a bool to 'yes' or 'no'
store a checksum locally and compare it, if requested
set a cookie
format a date output
all-purpose file handler - abstracts common php code snippets
flags: read,write,delete,noroot,local,remote,append,verify,compression=[none|auto|gz|bz2]
get a configuration value
get current supported configuration values
get vars from 'vault'
get group data
count set bits in input and returns them as hex
fetch a list of all tables currently stored in database
get user data - return data, if found, and caches it in class vars
fetches user group from database and store them in class vars
hash a bitstream e.g. plaintext password - 256-bit requires php extension (usually available)
calculate the hash from input - usuable on non-scalar values
returns value if is set otherwise a default
well, prepare some fun for inconvenient users *haha*
initialize basics: check php settings and prepare user input arrays
initialize caching system
process configuration
initialize database connection
set 'action' to run, access checks and set basic template vars
intialize common variables and prepare database table array
fetch core language file and detect preferred language by browser settings
run a scheduled task, if enabled.
prepare smarty template engine handing html outputs
initialize user data and cache group data
parse a link
forward an entry to log system deliver input as args: first is level 'info' or 'error'. any following are combined as message.
odd [1,3,5,...] become a 'description' for an entry. even [2,4,6,...] are its message. you may also pass all args in an array as first argument. example: logger('info','foo','bar','userid',3,'select','false') or logger(array('info','foo','bar','userid',3,'select','false'))
output maintenance message and end execution
reset all template vars except common one
sanitize user inputs - very(!) important
available flags: okifempty,forcestr,enforce,stripspaces,restrict,nosymlink,fullascii,hex,oct,length=,range=,o= 'str,strwbr,path,file' are *sanitizing* (strip illegal chars), others are *validating* (return 'false' on illegal chars) normally we do not allow empty input (zero strlen), use 'okifempty' flag to change this! hex|oct (currently) not support 'range='
(de)scramble a string using blowfish algorithm
return last inserted id after sql query
perform a sql query
first char can be a flag: ?=debug selects, -=just simulate and !=only output query params === '-' -> do not log query in debug trace AND no check before execution if table exists
transaction abstraction layer
mysql gets a simulation by locking because it (still/actually) lacks transactions *sigh* you should not use nested transactions to allow using databases not support them
increase statistic counter by one
strips trailing slashes
store a transaction number to session for using in forms
returns a valid database table name for usage in sql queries
terminate script execution and output error message
create a token - useful on creating passwords or digests
rewire template engine cache to 'pool' when required
update the local caches like self::$user with new values
create an 'universal unique identifier'
output example: 550e8400-e29b-11d4-a716-446655440000 (not really strict RFC!)
validates input array for rejected 'false' data
our 'vault': values can be stored here for class-wide reference
flags: public,protected,ro,rw,required,token=
start your engines :)
well, clean up after work and turn off the lights...
ANNOY_PROBABILITY_ON_AJAX
= 75
(line 97)
ANNOY_TIMESPAN
= '10,20'
(line 93)
DATABASE_VERSION
= 1
(line 53)
DATE_RFC822
= 'D, d M Y H:i:s T'
(line 81)
DEBUG
= false
(line 45)
ENABLE_SCRAMBLE
= true
(line 85)
POST_MAXLEN
= 20000
(line 89)
RSS_LAST
= 2147483638
(line 101)
RSS_MOD_UNAPPROVE
= 2147483639
(line 105)
TASK_INTERVAL
= 3
(line 73)
TASK_RUN
= ''
(line 77)
VAULT_PROTECTED
= 0x02
(line 65)
VAULT_PUBLIC
= 0x01
(line 69)
VAULT_RO
= 0x08
(line 57)
VAULT_RW
= 0x04
(line 61)
VERSION
= '0.8.36'
(line 49)
Documentation generated on Tue, 21 Oct 2008 20:58:14 +0200 by phpDocumentor 1.4.1