Permalink
Browse files

Working on Navi K3.1

  • Loading branch information...
1 parent 7746a1d commit 3fb266c35d052541013a2886f59dd1ab7e491df9 @deepwinter deepwinter committed Apr 29, 2011
Showing with 13 additions and 12 deletions.
  1. +5 −5 modules/mopcms/classes/model/page.php
  2. +8 −7 modules/navigation/classes/controller/navigation.php
@@ -116,7 +116,7 @@ public function save(Validation $validation = NULL) {
} else {
$content = ORM::Factory($this->template->contenttable);
}
- if(!$content->where('page_id', '=', $this->id)->find()->loaded){
+ if(!$content->where('page_id', '=', $this->id)->find()->loaded()){
$content = ORM::Factory('content');
$content->page_id = $this->id;
$content->save();
@@ -251,7 +251,7 @@ public function getNextPublishedPeer(){
->where('sortorder', '>', $this->sortorder)
->limit(1)
->find();
- if($next->loaded){
+ if($next->loaded()){
return $next;
} else{
return null;
@@ -267,7 +267,7 @@ public function getPrevPublishedPeer(){
->where('sortorder', '<', $this->sortorder)
->limit(1)
->find();
- if($next->loaded){
+ if($next->loaded()){
return $next;
} else{
return null;
@@ -282,7 +282,7 @@ public function getFirstPublishedPeer(){
->order_by('sortorder', 'ASC')
->limit(1)
->find();
- if($first->loaded){
+ if($first->loaded()){
return $first;
} else{
return null;
@@ -297,7 +297,7 @@ public function getLastPublishedPeer(){
->order_by('sortorder', 'DESC')
->limit(1)
->find();
- if($last->loaded){
+ if($last->loaded()){
return $last;
} else{
return null;
@@ -229,22 +229,23 @@ public function action_getTier($parentid, $deeplink=NULL, &$follow=false){
$parent = ORM::Factory($this->objectModel, $parentid);
$items = ORM::factory($this->objectModel);
- $items->where('parentid', 'AND', $parentid);
+ $items->where('parentid', '=', $parentid);
// $items->where('activity IS NULL');
$items->order_by('sortorder');
- if($iitems = $items->find_all()){
- $sendItemContainers = array(); //these will go first
+ $iitems = $items->find_all();
+ if($iitems){
+ $sendItemContainers = array(); //these will go first
$sendItemObjects = array();
foreach($iitems as $child){
- if(strtolower($child->template->nodeType) == 'container'){
+ if(strtolower($child->template->nodeType) == 'container'){
//we might be skipping this node
//echo sprintf('//template[@name="%s"]/elements/list[@family="%s"]', $parent->template->templatename, $child->template->templatename);
$display = mop::config('objects', sprintf('//template[@name="%s"]/elements/list[@family="%s"]',
$parent->template->templatename,
$child->template->templatename))
->item(0)
- ->getAttribute('display');
+ ->getAttribute('display');
if($display == 'inline'){
continue;
}
@@ -275,10 +276,10 @@ public function action_getTier($parentid, $deeplink=NULL, &$follow=false){
}
//this puts the folders first
$sendItemObjects = array_merge($sendItemContainers, $sendItemObjects);
-
+
//add in any objects
- if(!$parent->loaded){
+ if(!$parent->loaded()){
$cmsModules = mop::config('cmsModules', '//module');
foreach($cmsModules as $m){

0 comments on commit 3fb266c

Please sign in to comment.