diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-17 10:21:37 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-17 10:21:37 -0700 |
commit | 070db2a97ab3e508456780639faa643934081966 (patch) | |
tree | 0be1bcb185cc5afa0f45012964d8f6a542cea07a /modules/organize/controllers | |
parent | 359235182ebb14c75b495a889a2298d1e0130d77 (diff) |
Rearrange the adding of fields to the template so that they match the order of appearance in the template. Also remove the @todo's
Diffstat (limited to 'modules/organize/controllers')
-rw-r--r-- | modules/organize/controllers/organize.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/modules/organize/controllers/organize.php b/modules/organize/controllers/organize.php index 488f1eb1..1d188ade 100644 --- a/modules/organize/controllers/organize.php +++ b/modules/organize/controllers/organize.php @@ -27,26 +27,31 @@ class Organize_Controller extends Controller { $v = new View("organize_dialog.html"); $v->album = $album; - // @todo turn this into an api call. + + $v->domain = $input->server("SERVER_NAME"); + + $user = identity::active_user(); + $v->access_key = rest::get_access_key($user->id)->access_key; + + $v->protocol = (empty($_SERVER["HTTPS"]) OR $_SERVER["HTTPS"] === "off") ? "http" : "https"; + $v->file_filter = addslashes(json_encode( array("photo" => array("label" => "Images", "types" => array("*.jpg", "*.jpeg", "*.png", "*.gif")), "movie" => array("label" => "Movies", "types" => array("*.flv", "*.mp4"))))); - $v->domain = $input->server("SERVER_NAME"); - // @todo figure out how to connect this w/o a dependency - $v->base_url = url::abs_site("rest") . "/"; - $v->sort_order = addslashes(json_encode(array("ASC" => (string)t("Ascending"), "DESC" => (string)t("Descending")))); + $v->sort_order = addslashes( + json_encode(array("ASC" => (string)t("Ascending"), "DESC" => (string)t("Descending")))); $sort_fields = array(); foreach (album::get_sort_order_options() as $field => $description) { $sort_fields[$field] = (string)$description; } $v->sort_fields = addslashes(json_encode($sort_fields)); - $user = identity::active_user(); - $v->access_key = rest::get_access_key($user->id)->access_key; + $v->rest_uri = url::site("rest") . "/"; + + $v->controller_uri = url::site("organize") . "/"; - $v->protocol = (empty($_SERVER["HTTPS"]) OR $_SERVER["HTTPS"] === "off") ? "http" : "https"; $v->swf_url = url::file("modules/organize/lib/Gallery3WebClient.swf?") . filemtime(MODPATH . "organize/lib/Gallery3WebClient.swf"); print $v; |