diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/organize/controllers/organize.php | 21 | ||||
-rw-r--r-- | modules/organize/views/organize_dialog.html.php | 4 |
2 files changed, 15 insertions, 10 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; diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index d68534cf..a4fdc071 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -96,8 +96,8 @@ sortOrder: "<?= $sort_order ?>", sortFields: "<?= $sort_fields ?>", albumId: "<?= $album->id ?>", - restUri: "<?= url::site("rest") ?>/", - controllerUri: "<?= url::site("organize") ?>/" + restUri: "<?= $rest_uri ?>", + controllerUri: "<?= $controller_uri ?>/" }; }; /* |