Permalink
Browse files

Minor Bugfixes.

  • Loading branch information...
1 parent d8c6b1f commit 92ca31827ed92ec345a8312e986bc984d954bbd0 @rWatcher rWatcher committed Feb 3, 2011
@@ -32,7 +32,7 @@ public function map($map_type, $type_id) {
->order_by("exif_coordinates.latitude", "ASC")
->descendants();
$curr_album = ORM::factory("item")->where("id", "=", $type_id)->find_all();
- $map_title = $curr_album[0]->name;
+ $map_title = $curr_album[0]->title;
} elseif ($map_type == "user") {
// Generate an array of all items uploaded by the current user that
// have exif gps coordinates and order by latitude (to group items
@@ -50,16 +50,18 @@ static function update_gps_index($task) {
$completed = $task->get("completed");
// Generate an array of the next 100 photos to check.
- $all_photos = ORM::factory("item")
- ->where("id", ">", $last_id)
- ->where("type", "=", "photo")
- ->find_all(100);
+ //$all_photos = ORM::factory("item")
+ // ->where("id", ">", $last_id)
+ // ->where("type", "=", "photo")
+ // ->order_by("id")
+ // ->find_all(100);
// Check each photo in the array to see if it already has exif gps data associated with it.
// If it doesn't, attempt to extract gps coordinates.
foreach (ORM::factory("item")
->where("id", ">", $last_id)
->where("type", "=", "photo")
+ ->order_by("id")
->find_all(100) as $item) {
$record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find();
@@ -32,7 +32,7 @@ public function map($map_type, $type_id) {
->order_by("exif_coordinates.latitude", "ASC")
->descendants();
$curr_album = ORM::factory("item")->where("id", "=", $type_id)->find_all();
- $map_title = $curr_album[0]->name;
+ $map_title = $curr_album[0]->title;
} elseif ($map_type == "user") {
// Generate an array of all items uploaded by the current user that
// have exif gps coordinates and order by latitude (to group items
@@ -50,16 +50,18 @@ static function update_gps_index($task) {
$completed = $task->get("completed");
// Generate an array of the next 100 photos to check.
- $all_photos = ORM::factory("item")
- ->where("id", ">", $last_id)
- ->where("type", "=", "photo")
- ->find_all(100);
+ //$all_photos = ORM::factory("item")
+ // ->where("id", ">", $last_id)
+ // ->where("type", "=", "photo")
+ // ->order_by("id")
+ // ->find_all(100);
// Check each photo in the array to see if it already has exif gps data associated with it.
// If it doesn't, attempt to extract gps coordinates.
foreach (ORM::factory("item")
->where("id", ">", $last_id)
->where("type", "=", "photo")
+ ->order_by("id")
->find_all(100) as $item) {
$record = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find();

0 comments on commit 92ca318

Please sign in to comment.