From b1dfe5bd509b8fd674feb37f95c4a556db986f9a Mon Sep 17 00:00:00 2001 From: abijah Date: Tue, 11 Aug 2009 17:30:12 +0000 Subject: [PATCH] Added ability to customize the action on grid links git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@537 97e9348a-65ac-dc4b-aefc-98561f571b83 --- app_controller.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app_controller.php b/app_controller.php index e0fd16d..e2e7dba 100644 --- a/app_controller.php +++ b/app_controller.php @@ -696,8 +696,9 @@ class AppController extends Controller { return; foreach ($links AS $table => $fields) { - $special = array('controller', 'id'); + $special = array('controller', 'action', 'id'); $controller = Inflector::pluralize(Inflector::underscore($table)); + $action = 'view'; $id = 'id'; extract(array_intersect_key($fields, array_flip($special))); foreach ($records AS &$record) { @@ -713,7 +714,7 @@ class AppController extends Controller { $record[$table][$field] = '' . $record[$table][$field] .