From 978a09c44c9d58d72a06e5c4093bf2208465688e Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sun, 21 Dec 2008 20:57:39 -0500 Subject: [PATCH] don't ignore all config .php files in hatchery, we're moving to using them for defaults. ignore local files instead. re-add content default routes. --- .gitignore | 2 +- content/config/.cvsignore | 1 - content/config/routes.php | 42 ++++++++++++++++++++++++++++++++++++++++++ imp/config/.gitignore | 1 + jeta/config/.gitignore | 1 + 5 files changed, 45 insertions(+), 2 deletions(-) delete mode 100644 content/config/.cvsignore create mode 100644 content/config/routes.php create mode 100644 imp/config/.gitignore create mode 100644 jeta/config/.gitignore diff --git a/.gitignore b/.gitignore index 19bb9c81a..42d243447 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -*/config/*.php +*/config/*.local.php .DS_Store libs .cache diff --git a/content/config/.cvsignore b/content/config/.cvsignore deleted file mode 100644 index 6f65f87c9..000000000 --- a/content/config/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -routes.local.php diff --git a/content/config/routes.php b/content/config/routes.php new file mode 100644 index 000000000..70b1ee61a --- /dev/null +++ b/content/config/routes.php @@ -0,0 +1,42 @@ +connect($_root . '/tags', array('controller' => 'tag', 'action' => 'searchTags')); +$mapper->connect($_root . '/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')); + +// 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')); + + +// 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')); + +// 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')); + + +// Local route overrides +if (file_exists($CONTENT_DIR . '/config/routes.local.php')) { + include $CONTENT_DIR . '/config/routes.local.php'; +} diff --git a/imp/config/.gitignore b/imp/config/.gitignore new file mode 100644 index 000000000..cde8069e1 --- /dev/null +++ b/imp/config/.gitignore @@ -0,0 +1 @@ +*.php diff --git a/jeta/config/.gitignore b/jeta/config/.gitignore new file mode 100644 index 000000000..cde8069e1 --- /dev/null +++ b/jeta/config/.gitignore @@ -0,0 +1 @@ +*.php -- 2.11.0