public static function makeId() { $app = MFactory::getApplication(); if (!empty($app->registeredurlparams)) { $registeredurlparams = $app->registeredurlparams; } else { return md5(serialize(MRequest::getURI())); } $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} = MRequest::getVar($key, null, 'default', $value); } return md5(serialize($safeuriaddon)); }