summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2009-12-05 03:44:14 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2009-12-05 03:44:14 +0000
commit65684fa3a9f9ff5cea918b75ba31684a0049a9f9 (patch)
tree4ed939cd1f274f1416dbf6aacd0f26a420c1cb9e /controllers
Initial checkin.
Diffstat (limited to 'controllers')
-rw-r--r--controllers/randimg.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/controllers/randimg.php b/controllers/randimg.php
new file mode 100644
index 0000000..3045f22
--- /dev/null
+++ b/controllers/randimg.php
@@ -0,0 +1,29 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+class randimg_Controller extends REST_Controller {
+
+ protected $resource_type = "randimg";
+
+ public function _index() {
+ // Far from perfection, but at least require view permission for the root album
+ $album = ORM::factory("item", 1);
+ access::required("view", $album);
+ print randimg::randimg_link();
+ }
+
+}