Created
October 9, 2012 09:52
-
-
Save victorstanciu/3857702 to your computer and use it in GitHub Desktop.
This file contains 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 function getURL() | |
{ | |
if (Nip_Request::instance()->module == 'admin') { | |
$arguments = func_get_args(); | |
return parent::__call('getURL', $arguments); | |
} | |
return $this->getPublicURL(); | |
} | |
public function getPublicURL() | |
{ | |
return Articles::instance()->getViewURL(array( | |
"module" => "default", | |
"id" => $this->id, | |
"show" => $this->URL()->encode($this->getShow()->name), | |
"slug" => substr($this->URL()->encode(html_entity_decode($this->title, ENT_QUOTES, 'UTF-8')), 0, 255) | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment