Skip to content

Commit

Permalink
Fixed issue : Show actual default user template in default template view
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Jul 1, 2013
1 parent 170f122 commit 4b069ae
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions application/controllers/admin/templates.php
Expand Up @@ -313,8 +313,12 @@ protected function _strip_ext($name)
* @param string $templatename
* @return void
*/
public function index($editfile = 'startpage.pstpl', $screenname = 'welcome', $templatename = 'default')
public function index($editfile = 'startpage.pstpl', $screenname = 'welcome', $templatename = '')
{
if(!$templatename)
{
$templatename = Yii::app()->getConfig("defaulttemplate");
}
$aViewUrls = $this->_initialise($templatename, $screenname, $editfile);
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'templates.js');
App()->getClientScript()->registerPackage('ace');
Expand All @@ -338,8 +342,12 @@ public function index($editfile = 'startpage.pstpl', $screenname = 'welcome', $t
* @param string $screenname
* @return void
*/
public function screenredirect($editfile = 'startpage.pstpl', $templatename = 'default', $screenname = 'welcome')
public function screenredirect($editfile = 'startpage.pstpl', $templatename = '', $screenname = 'welcome')
{
if(!$templatename)
{
$templatename = Yii::app()->getConfig("defaulttemplate");
}
$this->getController()->redirect(array("admin/templates/sa/view/editfile/" . $editfile . "/screenname/" . $screenname . "/templatename/" . $templatename));
}

Expand All @@ -352,8 +360,12 @@ public function screenredirect($editfile = 'startpage.pstpl', $templatename = 'd
* @param string $editfile
* @return void
*/
public function fileredirect($templatename = 'default', $screenname = 'welcome', $editfile = 'startpage.pstpl')
public function fileredirect($templatename = '', $screenname = 'welcome', $editfile = 'startpage.pstpl')
{
if(!$templatename)
{
$templatename = Yii::app()->getConfig("defaulttemplate");
}
$this->getController()->redirect(array("admin/templates/sa/view/editfile/" . $editfile . "/screenname/" . $screenname . "/templatename/" . $templatename));
}

Expand Down

0 comments on commit 4b069ae

Please sign in to comment.