don't ignore all config .php files in hatchery, we're moving to using them for defaul...
authorChuck Hagenbuch <chuck@horde.org>
Mon, 22 Dec 2008 01:57:39 +0000 (20:57 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Mon, 22 Dec 2008 01:57:39 +0000 (20:57 -0500)
.gitignore
content/config/.cvsignore [deleted file]
content/config/routes.php [new file with mode: 0644]
imp/config/.gitignore [new file with mode: 0644]
jeta/config/.gitignore [new file with mode: 0644]

index 19bb9c8..42d2434 100644 (file)
@@ -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 (file)
index 6f65f87..0000000
+++ /dev/null
@@ -1 +0,0 @@
-routes.local.php
diff --git a/content/config/routes.php b/content/config/routes.php
new file mode 100644 (file)
index 0000000..70b1ee6
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+
+$_root = ltrim(dirname($_SERVER['PHP_SELF']), '/');
+
+/**
+ * References:
+ * http://code.google.com/apis/gdata/docs/2.0/reference.html#Queries
+ */
+
+// List tags. With no parameters, lists all tags. With no file extension, uses
+// the default format. Available query parameters:
+//   q:         do a starts-with search on tag text
+//   typeId:    restrict matches to tags that have been applied to objects with type $typeId
+//   userId:    restrict matches to tags that have been applied by $userId
+//   objectId:  restrict matches to tags that have been applied to $objectId
+$mapper->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 (file)
index 0000000..cde8069
--- /dev/null
@@ -0,0 +1 @@
+*.php
diff --git a/jeta/config/.gitignore b/jeta/config/.gitignore
new file mode 100644 (file)
index 0000000..cde8069
--- /dev/null
@@ -0,0 +1 @@
+*.php