Created
August 30, 2011 17:47
-
-
Save jeremyboggs/1181489 to your computer and use it in GitHub Desktop.
link_to controller Omeka diff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/application/helpers/LinkFunctions.php b/application/helpers/LinkFunctions.php | |
index 7316271..e83449c 100644 | |
--- a/application/helpers/LinkFunctions.php | |
+++ b/application/helpers/LinkFunctions.php | |
@@ -23,11 +23,11 @@ | |
* @param array $queryParams the parameters in the uri query | |
* @return string HTML | |
*/ | |
-function link_to($record, $action=null, $text='View', $props = array(), $queryParams=array()) | |
+function link_to($record, $action=null, $text='View', $props = array(), $queryParams=array(), $controller=null) | |
{ | |
// If we're linking directly to a record, use the URI for that record. | |
if($record instanceof Omeka_Record) { | |
- $url = record_uri($record, $action); | |
+ $url = record_uri($record, $action, $controller); | |
} | |
else { | |
// Otherwise $record is the name of the controller to link to. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment