mr_arrayValue (line
718)
Returns value of an array key (assoziative or indexed).
Shortcut function for some ways to access to arrays:
// old way
if (is_array($foo) && isset
($foo['bar']) &&
$foo['bar'] ==
'yieeha') {
// do something
}
// new, more readable way:
// do something
}
// old way
if (is_array($foo) && isset
($foo['bar'])) {
$jep = $foo['bar'];
} else {
$jep = 'yummy';
}
// new way
mixed
mr_arrayValue
(array $array, mixed $key, [mixed $default = null])
-
array
$array: The array
-
mixed
$key: Position of an indexed array or key of an assoziative array
-
mixed
$default: Default value to return
mr_buildGeneratedCode (line
434)
Replaces existing ancors inside passed code, while rebuilding the urls.
Will be called by chain 'Contenido.Content.conGenerateCode' or 'Contenido.Frontend.HTMLCodeOutput' depening on mod_rewrite settings.
string
mr_buildGeneratedCode
(string $code)
-
string
$code: Code to prepare
mr_buildNewUrl (line
398)
Works as a wrapper for Contenido_Url.
Will also be called by chain 'Contenido.Frontend.CreateURL'.
string
mr_buildNewUrl
(string $url)
-
string
$url: URL to rebuild
mr_conCopyArtLang (line
322)
Processes mod_rewrite related job for duplicated articles.
Will be called by chain 'Contenido.Article.conCopyArtLang_AfterInsert'.
array
mr_conCopyArtLang
(array $data)
-
array
$data: Assoziative array with record entries
mr_conMoveArticles (line
293)
Processes mod_rewrite related job for articles beeing moved.
Will be called by chain 'Contenido.Article.conMoveArticles_Loop'.
array
mr_conMoveArticles
(array $data)
-
array
$data: Assoziative array with record entries
mr_conSaveArticle (line
249)
Processes mod_rewrite related job for saved articles (new or modified article).
Will be called by chain 'Contenido.Action.con_saveart.AfterCall'.
array
mr_conSaveArticle
( $data)
-
array
$data: Assoziative array with some article properties
mr_conSyncArticle (line
357)
Processes mod_rewrite related job for synchronized articles.
Will be called by chain 'Contenido.Article.conSyncArticle_AfterInsert'.
array
mr_conSyncArticle
(array $data)
-
array
$data: Assoziative array with record entries as follows:
array(
'src_art_lang' => Recordset (assoziative array) of source item from con_art_lang table
'dest_art_lang' => Recordset (assoziative array) of inserted destination item from con_art_lang table
);
mr_debugOutput (line
803)
Debug output only during development
void
mr_debugOutput
([ $print = true])
mr_header (line
786)
Replaces calling of header method for redirects in front_content.php, used during development.
void
mr_header
($header $header)
-
$header
$header: Header value for redirect
mr_i18n (line
644)
Returns amr related translation text
string
mr_i18n
(string $key)
-
string
$key: The message id as string
mr_loadConfiguration (line
564)
Loads Advanced Mod Rewrite configuration for passed client using serialized file containing the settings.
File is placed in /contenido/mod_rewrite/includes/and is named like config.mod_rewrite_{client_id}.php.
void
mr_loadConfiguration
(int $clientId, [bool $forceReload = false])
-
int
$clientId: Id of client
-
bool
$forceReload: Flag to force to reload configuration, e. g. after done changes on it
mr_queryAndNextRecord (line
675)
Database query helper. Used to execute a select statement and to return the result of first recordset.
Minimizes following code:
// default way
$db = new DB_Contenido();
$sql = "SELECT * FROM foo WHERE bar='foobar'";
$db->query($sql);
$db->next_record();
$data = $db->Record;
// new way
$sql = "SELECT * FROM foo WHERE bar='foobar'";
mixed
mr_queryAndNextRecord
(string $query)
-
string
$query: Query to execute
mr_removeMultipleChars (line
630)
Cleanups passed string from characters beeing repeated two or more times
string
mr_removeMultipleChars
(string $char, string $string)
-
string
$char: Character to remove
-
string
$string: String to clean from character
mr_requestCleanup (line
753)
Request cleanup function. Request data is allways tainted and must be filtered.
Pass the array to cleanup using several options. Emulates array_walk_recursive().
mixed
mr_requestCleanup
( &$data, [array $options = null], mixed $data)
-
mixed
$data: Data to cleanup
-
array
$options: Default options array, provides only 'filter' key with several filter functions which are to execute as follows:
$options['filter'] = array('trim', 'myFilterFunc');
If no filter functions are set, 'trim', 'strip_tags' and 'stripslashes' will be used by default. A userdefined function must accept the value as a parameter and must return the filtered parameter, e. g. function myFilter($data) {
// do what you want with the data, e. g. cleanup of xss content
return $data;
}
-
&$data
mr_runFrontendController (line
605)
Includes the frontend controller script which parses the url and extacts needed data like idcat, idart, lang and client from it.
Will be called by chain 'Contenido.Frontend.AfterLoadPlugins' at front_content.php.
bool
mr_runFrontendController
()
mr_setClientLanguageId (line
522)
Sets language of client, like done in front_content.php
void
mr_setClientLanguageId
(int $client)
mr_strCopyCategory (line
220)
Processes mod_rewrite related job after copying a category subtree.
Will be called by chain 'Contenido.Category.strCopyCategory'.
array
mr_strCopyCategory
( $data)
-
array
$data: Assoziative array with some values
mr_strMovedownCategory (line
146)
Processes mod_rewrite related job after moving a category down.
Will be called by chain 'Contenido.Action.str_movedowncat.AfterCall'.
int
mr_strMovedownCategory
(int $idcat)
-
int
$idcat: Id of category beeing moved down
mr_strMoveSubtree (line
177)
Processes mod_rewrite related job after moving a category subtree.
Will be called by chain 'Contenido.Action.str_movesubtree.AfterCall'.
array
mr_strMoveSubtree
( $data)
-
array
$data: Assoziative array with some values
mr_strMoveUpCategory (line
111)
Processes mod_rewrite related job after moving a category up.
Will be called by chain 'Contenido.Action.str_moveupcat.AfterCall'.
int
mr_strMoveUpCategory
(int $idcat)
mr_strNewCategory (line
63)
Processes mod_rewrite related job for created new category.
Will be called by chain 'Contenido.Action.str_newcat.AfterCall'.
array
mr_strNewCategory
( $data)
-
array
$data: Assoziative array with some values
mr_strNewTree (line
39)
Processes mod_rewrite related job for created new tree.
Will be called by chain 'Contenido.Action.str_newtree.AfterCall'.
array
mr_strNewTree
( $data)
-
array
$data: Assoziative array with some values
mr_strRenameCategory (line
86)
Processes mod_rewrite related job for renamed category.
Will be called by chain 'Contenido.Action.str_renamecat.AfterCall'.
array
mr_strRenameCategory
( $data)
-
array
$data: Assoziative array with some values