Avoid unnecessary assignement.

This commit is contained in:
Loic d'Anterroches 2009-10-06 21:33:58 +02:00
parent 06668db697
commit ec8ff4f76b
2 changed files with 3 additions and 6 deletions

View File

@ -240,8 +240,7 @@ class IDF_Views_Wiki
$dep = Pluf_Model_InArray($dtag, $tags);
$title = $page->title;
$revision = $page->get_current_revision();
$db = $page->getDbConnection();
$false = Pluf_DB_BooleanToDb(false, $db);
$false = Pluf_DB_BooleanToDb(false, $page->getDbConnection());
$revs = $page->get_revisions_list(array('order' => 'creation_dtime DESC',
'filter' => 'is_head='.$false));
return Pluf_Shortcuts_RenderToResponse('idf/wiki/view.html',
@ -281,8 +280,7 @@ class IDF_Views_Wiki
$title = sprintf(__('Delete Old Revision of %s'), $page->title);
$revision = $page->get_current_revision();
$db = $page->getDbConnection();
$false = Pluf_DB_BooleanToDb(false, $db);
$false = Pluf_DB_BooleanToDb(false, $page->getDbConnection());
$revs = $page->get_revisions_list(array('order' => 'creation_dtime DESC',
'filter' => 'is_head='.$false));
return Pluf_Shortcuts_RenderToResponse('idf/wiki/delete.html',

View File

@ -146,8 +146,7 @@ class IDF_WikiPage extends Pluf_Model
function get_current_revision()
{
$db = $this->getDbConnection();
$true = Pluf_DB_BooleanToDb(true, $db);
$true = Pluf_DB_BooleanToDb(true, $this->getDbConnection());
$rev = $this->get_revisions_list(array('filter' => 'is_head='.$true,
'nb' => 1));
return ($rev->count() == 1) ? $rev[0] : null;