From 1326b8c744395a1a9fc7dd0e02054da195ff2873 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Wed, 24 Dec 2008 14:19:52 -0500 Subject: [PATCH] routes can be relative to the app now, since we set the mapper prefix appropriately in rampage.php --- content/config/routes.php | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/content/config/routes.php b/content/config/routes.php index 70b1ee61a..4fa5cf4a0 100644 --- a/content/config/routes.php +++ b/content/config/routes.php @@ -1,7 +1,4 @@ connect($_root . '/tags', array('controller' => 'tag', 'action' => 'searchTags')); -$mapper->connect($_root . '/tags.:(format)', array('controller' => 'tag', 'action' => 'searchTags')); +$mapper->connect('tags', array('controller' => 'tag', 'action' => 'searchTags')); +$mapper->connect('tags.:(format)', array('controller' => 'tag', 'action' => 'searchTags')); // List objects. At least a content type, or more specific parameters, are // required; listing all objects is not allowed. -$mapper->connect($_root . '/objects', array('controller' => 'tag', 'action' => 'searchObjects')); -$mapper->connect($_root . '/objects.:(format)', array('controller' => 'tag', 'action' => 'searchObjects')); +$mapper->connect('objects', array('controller' => 'tag', 'action' => 'searchObjects')); +$mapper->connect('objects.:(format)', array('controller' => 'tag', 'action' => 'searchObjects')); // List users. Specific parameters are required as listing all users is not // allowed. -$mapper->connect($_root . '/users', array('controller' => 'tag', 'action' => 'searchUsers')); -$mapper->connect($_root . '/users.:(format)', array('controller' => 'tag', 'action' => 'searchUsers')); +$mapper->connect('users', array('controller' => 'tag', 'action' => 'searchUsers')); +$mapper->connect('users.:(format)', array('controller' => 'tag', 'action' => 'searchUsers')); // Tag an object. Required POST parameters are: tags (array or string list) and // objectId. userId is inferred from the authenticated user: -$mapper->connect($_root . '/tag', array('controller' => 'tag', 'action' => 'tag')); +$mapper->connect('tag', array('controller' => 'tag', 'action' => 'tag')); // Untag an object. Required POST parameters are: tags (array or string list) // and objectId. userId is inferred from the authenticated user: -$mapper->connect($_root . '/untag', array('controller' => 'tag', 'action' => 'untag')); +$mapper->connect('untag', array('controller' => 'tag', 'action' => 'untag')); // Local route overrides -if (file_exists($CONTENT_DIR . '/config/routes.local.php')) { - include $CONTENT_DIR . '/config/routes.local.php'; +if (file_exists(dirname(__FILE__) . '/routes.local.php')) { + include dirname(__FILE__) . '/routes.local.php'; } -- 2.11.0