equal
deleted
inserted
replaced
440 { |
440 { |
441 $url = $this->parse_url(); |
441 $url = $this->parse_url(); |
442 if ( substr($url, 0, strlen($this->nslist['Special'])) == $this->nslist['Special'] || |
442 if ( substr($url, 0, strlen($this->nslist['Special'])) == $this->nslist['Special'] || |
443 substr($url, 0, strlen($this->nslist['Admin'])) == $this->nslist['Admin']) |
443 substr($url, 0, strlen($this->nslist['Admin'])) == $this->nslist['Admin']) |
444 { |
444 { |
445 list($url) = explode('/', $url); |
445 list(, $ns) = RenderMan::strToPageID($url); |
|
446 $upart = substr($url, strlen($this->nslist[$ns])); |
|
447 list($upart) = explode('/', $upart); |
|
448 $url = $this->nslist[$ns] . $upart; |
446 } |
449 } |
447 return $url; |
450 return $url; |
448 } |
451 } |
449 // Parses a (very carefully formed) array into Javascript code compatible with the Tigra Tree Menu used in the admin menu |
452 // Parses a (very carefully formed) array into Javascript code compatible with the Tigra Tree Menu used in the admin menu |
450 function parseAdminTree() |
453 function parseAdminTree() |
490 ); |
493 ); |
491 } |
494 } |
492 function getParam($id = 0) |
495 function getParam($id = 0) |
493 { |
496 { |
494 $title = $this->parse_url(false); |
497 $title = $this->parse_url(false); |
|
498 list(, $ns) = RenderMan::strToPageID($title); |
|
499 $title = substr($title, strlen($this->nslist[$ns])); |
495 $regex = '/^' . str_replace('/', '\\/', preg_quote($this->nslist[$this->namespace])) . '\\/?/'; |
500 $regex = '/^' . str_replace('/', '\\/', preg_quote($this->nslist[$this->namespace])) . '\\/?/'; |
496 $title = preg_replace($regex, '', $title); |
501 $title = preg_replace($regex, '', $title); |
497 $title = explode('/', $title); |
502 $title = explode('/', $title); |
498 $id = $id + 1; |
503 $id = $id + 1; |
499 return ( isset($title[$id]) ) ? $title[$id] : false; |
504 return ( isset($title[$id]) ) ? $title[$id] : false; |