[Piwik-svn] r172 - in trunk: . modules

svnmaster at piwik.org svnmaster at piwik.org
Tue Jan 15 01:05:49 CET 2008


Author: julien
Date: 2008-01-15 01:05:48 +0100 (Tue, 15 Jan 2008)
New Revision: 172

Modified:
   trunk/
   trunk/modules/FrontController.php
   trunk/modules/ViewDataTable.php
Log:
Two small changes made by Matt on my computer...


Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
   - documentation
logs
tmp
tmp/*
.metadata

   + documentation
logs
tmp
tmp/*
.metadata
.cache
.settings
.project


Modified: trunk/modules/FrontController.php
===================================================================
--- trunk/modules/FrontController.php	2008-01-14 05:55:07 UTC (rev 171)
+++ trunk/modules/FrontController.php	2008-01-15 00:05:48 UTC (rev 172)
@@ -68,13 +68,20 @@
 				
 				$defaultAction = $controller->getDefaultAction();
 				$action = Piwik_Common::getRequestVar('action', $defaultAction, 'string');
-				
-				try{
-					$controller->$action();
-				} catch(Piwik_Access_NoAccessException $e) {
-//					Piwik::log("NO ACCESS EXCEPTION =>");
-					
-					Piwik_PostEvent('FrontController.NoAccessException', $e);					
+				
+				if(method_exists($controller, $action))
+				{
+					try{
+						$controller->$action();
+					} catch(Piwik_Access_NoAccessException $e) {
+	//					Piwik::log("NO ACCESS EXCEPTION =>");
+						
+						Piwik_PostEvent('FrontController.NoAccessException', $e);					
+					}
+				}
+				else
+				{
+					throw new Exception("Action $action not found in the controller $controllerClassName.");				
 				}
 			}
 			else

Modified: trunk/modules/ViewDataTable.php
===================================================================
--- trunk/modules/ViewDataTable.php	2008-01-14 05:55:07 UTC (rev 171)
+++ trunk/modules/ViewDataTable.php	2008-01-15 00:05:48 UTC (rev 172)
@@ -39,7 +39,11 @@
 	protected $variablesDefault = array();
 	
 	protected $idSubtable = false;
-	
+	
+	/**
+	 * 
+	 * @return Piwik_ViewDataTable Data table
+	 */
 	static public function factory( $type = null )
 	{
 		if(is_null($type))



More information about the Piwik-svn mailing list