From f4cbf8455907ed7f6a39d594f9c7bdc9951b2417 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Fri, 5 Sep 2008 14:38:50 +0200 Subject: [PATCH] Added more fixes for PHP 5.2.0. --- src/IDF/Project.php | 4 ++-- src/IDF/Views/Source.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IDF/Project.php b/src/IDF/Project.php index 4bc6f87..f4b856c 100644 --- a/src/IDF/Project.php +++ b/src/IDF/Project.php @@ -233,7 +233,7 @@ class IDF_Project extends Pluf_Model $false = Pluf_DB_BooleanToDb(false, $db); $sql = new Pluf_SQL('model_class=%s AND model_id=%s AND owner_class=%s AND permission=%s AND negative='.$false, array('IDF_Project', $this->id, 'Pluf_User', $operm->id)); - $owners = array(); + $owners = new Pluf_Template_ContextVars(array()); foreach ($grow->getList(array('filter' => $sql->gen())) as $row) { if ($fmt == 'objects') { $owners[] = Pluf::factory('Pluf_User', $row->owner_id); @@ -243,7 +243,7 @@ class IDF_Project extends Pluf_Model } $sql = new Pluf_SQL('model_class=%s AND model_id=%s AND owner_class=%s AND permission=%s AND negative='.$false, array('IDF_Project', $this->id, 'Pluf_User', $mperm->id)); - $members = array(); + $members = new Pluf_Template_ContextVars(array()); foreach ($grow->getList(array('filter' => $sql->gen())) as $row) { if ($fmt == 'objects') { $members[] = Pluf::factory('Pluf_User', $row->owner_id); diff --git a/src/IDF/Views/Source.php b/src/IDF/Views/Source.php index eabb585..04e6a6a 100644 --- a/src/IDF/Views/Source.php +++ b/src/IDF/Views/Source.php @@ -133,7 +133,7 @@ class IDF_Views_Source $page_title = $bc.' - '.$title; $cobject = $scm->getCommit($commit); $tree_in = in_array($commit, $branches); - $res = $scm->filesAtCommit($commit, $request_file); + $res = new Pluf_Template_ContextVars($scm->filesAtCommit($commit, $request_file)); // try to find the previous level if it exists. $prev = split('/', $request_file); $l = array_pop($prev);