Created
October 23, 2012 01:48
-
-
Save mbriceno/3936194 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function makeId() | |
{ | |
$app = JFactory::getApplication(); | |
// Get url parameters set by plugins | |
if(!empty($app->registeredurlparams)) | |
{ | |
$registeredurlparams = $app->registeredurlparams; | |
} | |
// Platform defaults | |
$registeredurlparams->format = 'WORD'; | |
$registeredurlparams->option = 'WORD'; | |
$registeredurlparams->view = 'WORD'; | |
$registeredurlparams->layout = 'WORD'; | |
$registeredurlparams->tpl = 'CMD'; | |
$registeredurlparams->id = 'INT'; | |
$safeuriaddon = new stdClass; | |
foreach ($registeredurlparams as $key => $value) | |
{ | |
$safeuriaddon->$key = JRequest::getVar($key, null, 'default', $value); | |
} | |
return md5(serialize($safeuriaddon)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment