XF handles all low-level including initialization, database connection and basic abstraction layers
Located in /class.root.php (line 27)
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. encrypted by default; not very tight, but (maybe) enough to beat junior black-hats ;) is automatically disabled, if suhosin is detected and it already encrypts cookies.
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 'system', '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'))
parse logging messages for (human readable) output
output maintenance message and end execution
reset all template vars except common one
scan through folders recursively
sanitize user inputs - very(!) important
available flags: okifempty,forcestr,enforce,stripspaces,restrict,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 cryptography
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'.
if we didn't make a mistake on calculation, this should be about 120-bit of randomness... 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: pub,rw,required,token=
start your engines :)
well, clean up after work and turn off the lights...
ANNOY_PROBABILITY_ON_AJAX
= 75
(line 75)
ANNOY_TIMESPAN
= '10,20'
(line 71)
DATABASE_VERSION
= 1
(line 39)
DATE_RFC822
= 'D, d M Y H:i:s O'
(line 87)
DEBUG
= false
(line 31)
ENABLE_SCRAMBLE
= true
(line 63)
POST_MAXLEN
= 20000
(line 67)
RSS_LAST
= 2147483638
(line 79)
RSS_MOD_UNAPPROVE
= 2147483639
(line 83)
TASK_INTERVAL
= 3
(line 59)
VAULT_PROTECTED
= 0x02
(line 51)
VAULT_PUBLIC
= 0x01
(line 55)
VAULT_RO
= 0x08
(line 43)
VAULT_RW
= 0x04
(line 47)
VERSION
= '0.9.11'
(line 35)
Documentation generated on Tue, 03 Mar 2009 17:58:07 +0100 by phpDocumentor 1.4.1