[Piwik-svn] r373 - in trunk: modules plugins/Dashboard

svnmaster at piwik.org svnmaster at piwik.org
Fri Mar 14 21:09:07 CET 2008


Author: matt
Date: 2008-03-14 21:09:06 +0100 (Fri, 14 Mar 2008)
New Revision: 373

Modified:
   trunk/modules/PluginsManager.php
   trunk/plugins/Dashboard/Controller.php
Log:
- Piwik_Fetch renamed in Piwik_FetchAll to match Zend notation

Modified: trunk/modules/PluginsManager.php
===================================================================
--- trunk/modules/PluginsManager.php	2008-03-14 20:04:56 UTC (rev 372)
+++ trunk/modules/PluginsManager.php	2008-03-14 20:09:06 UTC (rev 373)
@@ -432,7 +432,7 @@
 
 /**
  * Executes a SQL query on the DB and returns the Zend_Db_Statement object
- * If you want to fetch data from the DB you should use the function Piwik_Fetch()
+ * If you want to fetch data from the DB you should use the function Piwik_FetchAll()
  * 
  * See also http://framework.zend.com/manual/en/zend.db.statement.html
  *
@@ -452,7 +452,7 @@
  * @param array Parameters to bind in the query, array( param1 => value1, param2 => value2)
  * @return array (one row in the array per row fetched in the DB)
  */
-function Piwik_Fetch( $sqlQuery, $parameters = array())
+function Piwik_FetchAll( $sqlQuery, $parameters = array())
 {
 	return Zend_Registry::get('db')->fetchAll( $sqlQuery, $parameters );
 }

Modified: trunk/plugins/Dashboard/Controller.php
===================================================================
--- trunk/plugins/Dashboard/Controller.php	2008-03-14 20:04:56 UTC (rev 372)
+++ trunk/plugins/Dashboard/Controller.php	2008-03-14 20:09:06 UTC (rev 373)
@@ -91,7 +91,7 @@
 	protected function getLayoutForUser( $login, $idDashboard)
 	{
 		$paramsBind = array($login, $idDashboard);
-		$return = Piwik_Fetch('SELECT layout FROM '.Piwik::prefixTable('user_dashboard') .
+		$return = Piwik_FetchAll('SELECT layout FROM '.Piwik::prefixTable('user_dashboard') .
 					' WHERE login = ? AND iddashboard = ?', $paramsBind);
 		if(count($return) == 0)
 		{



More information about the Piwik-svn mailing list