Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/gallery/gallery3
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Almdal committed Aug 29, 2009
2 parents 6de10a5 + 1527f14 commit 08d7fda
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 373 deletions.
21 changes: 14 additions & 7 deletions modules/gallery/helpers/album.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,7 @@ static function get_edit_form($parent) {

$sort_order->dropdown("column", array("id" => "gAlbumSortColumn"))
->label(t("Sort by"))
->options(array("weight" => t("Manual"),
"captured" => t("Date captured"),
"created" => t("Date uploaded"),
"title" => t("Title"),
"updated" => t("Date modified"),
"view_count" => t("Number of views"),
"rand_key" => t("Random")))
->options(album::get_sort_order_options())
->selected($parent->sort_column);
$sort_order->dropdown("direction", array("id" => "gAlbumSortDirection"))
->label(t("Order"))
Expand All @@ -137,4 +131,17 @@ static function get_edit_form($parent) {
$form->add_rules_from(ORM::factory("item"));
return $form;
}

/**
* Return a structured set of all the possible sort orders.
*/
static function get_sort_order_options() {
return array("weight" => t("Manual"),
"captured" => t("Date captured"),
"created" => t("Date uploaded"),
"title" => t("Title"),
"updated" => t("Date modified"),
"view_count" => t("Number of views"),
"rand_key" => t("Random"));
}
}
7 changes: 7 additions & 0 deletions modules/notification/helpers/notification_event.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ static function item_updated($original, $new) {
notification::send_item_updated($new);
} catch (Exception $e) {
Kohana::log("error", "@todo notification_event::item_updated() failed");
Kohana::Log("error", $e->getMessage() . "\n" . $e->getTraceAsString());
}
}

Expand All @@ -34,6 +35,7 @@ static function item_created($item) {
notification::send_item_add($item);
} catch (Exception $e) {
Kohana::log("error", "@todo notification_event::item_created() failed");
Kohana::Log("error", $e->getMessage() . "\n" . $e->getTraceAsString());
}
}

Expand All @@ -46,6 +48,7 @@ static function item_deleted($item) {
}
} catch (Exception $e) {
Kohana::log("error", "@todo notification_event::item_deleted() failed");
Kohana::Log("error", $e->getMessage() . "\n" . $e->getTraceAsString());
}
}

Expand All @@ -56,6 +59,7 @@ static function comment_created($comment) {
}
} catch (Exception $e) {
Kohana::log("error", "@todo notification_event::comment_created() failed");
Kohana::Log("error", $e->getMessage() . "\n" . $e->getTraceAsString());
}
}

Expand All @@ -66,6 +70,7 @@ static function comment_updated($original, $new) {
}
} catch (Exception $e) {
Kohana::log("error", "@todo notification_event::comment_updated() failed");
Kohana::Log("error", $e->getMessage() . "\n" . $e->getTraceAsString());
}
}

Expand All @@ -76,6 +81,7 @@ static function user_before_delete($user) {
->delete_all();
} catch (Exception $e) {
Kohana::log("error", "@todo notification_event::user_before_delete() failed");
Kohana::Log("error", $e->getMessage() . "\n" . $e->getTraceAsString());
}
}

Expand All @@ -84,6 +90,7 @@ static function batch_complete() {
notification::send_pending_notifications();
} catch (Exception $e) {
Kohana::log("error", "@todo notification_event::batch_complete() failed");
Kohana::Log("error", $e->getMessage() . "\n" . $e->getTraceAsString());
}
}

Expand Down
Loading

0 comments on commit 08d7fda

Please sign in to comment.