get rid of the pre-comanche widget placement and wgl code

This commit is contained in:
redmatrix
2015-11-09 19:42:37 -08:00
parent c0260ff701
commit e6de9bfa4e
4 changed files with 0 additions and 48 deletions

View File

@@ -937,26 +937,6 @@ class App {
return $this->groups;
}
function set_widget($title,$html, $location = 'aside') {
$this->widgets[] = array('title' => $title, 'html' => $html, 'location' => $location);
}
function get_widgets($location = '') {
if($location && count($this->widgets)) {
$ret = array();
foreach($this->widgets as $w) {
if ($w['location'] == $location)
$ret[] = $w;
}
$arr = array('location' => $location, 'widgets' => $ret);
call_hooks('get_widgets', $arr);
return $arr['widgets'];
}
$arr = array('location' => $location, 'widgets' => $this->widgets);
call_hooks('get_widgets', $arr);
return $arr['widgets'];
}
function set_pager_total($n) {
$this->pager['total'] = intval($n);
}
@@ -2076,17 +2056,6 @@ function construct_page(&$a) {
$a->build_pagehead();
$arr = $a->get_widgets();
ksort($arr, SORT_NUMERIC);
if(count($arr)) {
foreach($arr as $x) {
if(! array_key_exists($x['location'], $a->page))
$a->page[$x['location']] = '';
$a->page[$x['location']] .= $x['html'];
}
}
// Let's say we have a comanche declaration '[region=nav][/region][region=content]$nav $content[/region]'.
// The text 'region=' identifies a section of the layout by that name. So what we want to do here is leave
// $a->page['nav'] empty and put the default content from $a->page['nav'] and $a->page['section']