diff options
author | Bharat Mediratta <bharat@menalto.com> | 2013-01-13 13:21:48 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2013-01-13 13:21:48 -0800 |
commit | 2d010c07d3a0c1491f4e2fe0ee370f0d0116fdef (patch) | |
tree | 30865f2ded9311d95fec6d6e73e3765b2f084134 /modules/g2_import | |
parent | 3a3c21dfc42b94a5340634d9c0b19acf83b1fedb (diff) | |
parent | f92982c59c0db3d86a6a05231c720a39bbbb3d2d (diff) |
Merge pull request #86 from mikeage/tag_name
Tags by name (includes a G2 mapping)
Fixes #1940.
Diffstat (limited to 'modules/g2_import')
-rw-r--r-- | modules/g2_import/controllers/g2.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/g2_import/controllers/g2.php b/modules/g2_import/controllers/g2.php index 6c960893..98eb57f1 100644 --- a/modules/g2_import/controllers/g2.php +++ b/modules/g2_import/controllers/g2.php @@ -34,6 +34,11 @@ class G2_Controller extends Controller { $path = $input->get("path"); $id = $input->get("g2_itemId"); + /* Tags are handled specially, since there's no mapping for them */ + if (($path && 0 === strpos($path, "tag/"))) { + url::redirect("tag_name/" . substr($path, 4)); + } + if (($path && $path != 'index.php' && $path != 'main.php') || $id) { if ($id) { // Requests by id are either core.DownloadItem or core.ShowItem requests. Later versions of @@ -94,4 +99,4 @@ class G2_Controller extends Controller { throw new Kohana_404_Exception(); } } -}
\ No newline at end of file +} |