Skip to content
This repository
Browse code

MINOR Redirecting page links in CMSPagesController to CMSPageEditCont…

…roller (admin/pages/show/99 to admin/page/show/99)
  • Loading branch information...
commit c4a99dfc095d85ec639d7e9523a2cf683c6cbcbb 1 parent c4c3d21
Ingo Schommer authored July 04, 2011
9  code/controller/CMSPagesController.php
@@ -21,4 +21,13 @@ function show($request) {
21 21
 		}
22 22
 	}
23 23
 	
  24
+	function Link($action = null) {
  25
+		// Special case: All show links should redirect to the page edit interface instead (mostly from tree nodes)
  26
+		if(preg_match('/^show/', $action)) {
  27
+			return singleton('CMSPageEditController')->Link($action);
  28
+		} else {
  29
+			return parent::Link($action);
  30
+		}
  31
+	}
  32
+	
24 33
 }
7  javascript/CMSPagesController.Tree.js
... ...
@@ -1,7 +0,0 @@
1  
-(function($) {
2  
-	$('.cms-tree').bind('select_node.jstree', function(e, data) {
3  
-		var node = data.rslt.obj, url = $(node).find('a:first').attr('href');
4  
-		if(url && url != '#') document.location.href = url;
5  
-		return false;
6  
-	});
7  
-}(jQuery));

0 notes on commit c4a99df

Please sign in to comment.
Something went wrong with that request. Please try again.