Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions share/pnp/application/controllers/special.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@
* @author Joerg Linge
* @license GPL
*/
class Special_Controller extends System_Controller {

class Special_Controller extends System_Controller {

// Explicitly declare the dynamic properties
public $templates;
public $url;
public $template;
public $tpl;
public $data;
public $view;

public function __construct()
{
Expand All @@ -15,15 +24,16 @@ public function __construct()
$this->template->graph = $this->add_view('graph');
$this->templates = $this->data->getSpecialTemplates();
$this->data->GRAPH_TYPE = 'special';
if($this->tpl == ''){
if($this->templates)
if ($this->tpl == '') {
if ($this->templates)
$this->tpl = $this->templates[0];
url::redirect('special?tpl='.$this->tpl, 302);
url::redirect('special?tpl=' . $this->tpl, 302);
}
}

public function index(){
$this->url = "?tpl=".$this->tpl;
public function index()
{
$this->url = "?tpl=" . $this->tpl;
$this->template->zoom_header = $this->add_view('zoom_header');
$this->template->zoom_header->graph_width = ($this->config->conf['zgraph_width'] + 140);
$this->template->zoom_header->graph_height = ($this->config->conf['zgraph_height'] + 230);
Expand All @@ -38,7 +48,7 @@ public function index(){
$this->template->graph->widget_menu = $this->add_view('widget_menu');
$this->template->graph->graph_content->widget_graph = $this->add_view('widget_graph');
#print Kohana::debug($services);
$this->data->buildDataStruct('__special',$this->tpl,$this->view);
$this->data->buildDataStruct('__special', $this->tpl, $this->view);
$this->template->graph->icon_box = $this->add_view('icon_box');
$this->template->graph->icon_box->position = "special";
$this->template->graph->logo_box = $this->add_view('logo_box');
Expand All @@ -48,5 +58,4 @@ public function index(){
$this->template->graph->header->title = $this->data->MACRO['TITLE'];
//print Kohana::debug($this->data);
}

}
2 changes: 1 addition & 1 deletion share/pnp/application/helpers/pnp.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static function addToUri($fields = array(),$base = True){
if($value === ''){
continue;
}
$uri .= $key."=".urlencode($value)."&";
$uri .= $key."=".urlencode($value ?? '')."&";
}
return rtrim($uri,"&");
}
Expand Down