Changeset 4795
- Timestamp:
- 12/19/06 14:42:39 (2 years ago)
- Files:
-
- trunk/src/org.routamc.gallery/config/manifest.inc (modified) (1 diff)
- trunk/src/org.routamc.gallery/documentation/TODO (modified) (1 diff)
- trunk/src/org.routamc.gallery/gallery_helper.php (modified) (5 diffs)
- trunk/src/org.routamc.gallery/handler/configuration.php (modified) (5 diffs)
- trunk/src/org.routamc.gallery/handler/index.php (modified) (11 diffs)
- trunk/src/org.routamc.gallery/handler/view.php (modified) (7 diffs)
- trunk/src/org.routamc.gallery/midcom/interfaces.php (modified) (2 diffs)
- trunk/src/org.routamc.gallery/navigation.php (modified) (2 diffs)
- trunk/src/org.routamc.gallery/photolink.php (modified) (1 diff)
- trunk/src/org.routamc.gallery/style/show_photo.php (modified) (3 diffs)
- trunk/src/org.routamc.gallery/viewer.php (modified) (8 diffs)
- trunk/src/org.routamc.photostream/config/mgdschema.xml (modified) (3 diffs)
- trunk/src/org.routamc.photostream/config/schemadb_default.inc (modified) (8 diffs)
- trunk/src/org.routamc.photostream/documentation/TODO (modified) (2 diffs)
- trunk/src/org.routamc.photostream/exec/convert_nsphotos.php (modified) (6 diffs)
- trunk/src/org.routamc.photostream/handler/admin.php (modified) (2 diffs)
- trunk/src/org.routamc.photostream/handler/index.php (modified) (6 diffs)
- trunk/src/org.routamc.photostream/handler/list.php (modified) (22 diffs)
- trunk/src/org.routamc.photostream/handler/upload.php (modified) (5 diffs)
- trunk/src/org.routamc.photostream/handler/view.php (modified) (9 diffs)
- trunk/src/org.routamc.photostream/midcom/interfaces.php (modified) (2 diffs)
- trunk/src/org.routamc.photostream/navigation.php (modified) (1 diff)
- trunk/src/org.routamc.photostream/photo.php (modified) (2 diffs)
- trunk/src/org.routamc.photostream/static/photos.css (modified) (1 diff)
- trunk/src/org.routamc.photostream/style/photo_upload.php (modified) (1 diff)
- trunk/src/org.routamc.photostream/style/show_photo.php (modified) (3 diffs)
- trunk/src/org.routamc.photostream/viewer.php (modified) (20 diffs)
- trunk/src/org.routamc.positioning/city.php (modified) (1 diff)
- trunk/src/org.routamc.positioning/config/mgdschema.xml (modified) (13 diffs)
- trunk/src/org.routamc.positioning/cron/fetchgeorss.php (modified) (1 diff)
- trunk/src/org.routamc.positioning/cron/fetchicbm.php (modified) (1 diff)
- trunk/src/org.routamc.positioning/cron/fetchplazes.php (modified) (1 diff)
- trunk/src/org.routamc.positioning/exec/import-cities.php (modified) (8 diffs)
- trunk/src/org.routamc.positioning/exec/manual-position.php (modified) (11 diffs)
- trunk/src/org.routamc.positioning/exec/test-distance.php (modified) (4 diffs)
- trunk/src/org.routamc.positioning/importer.php (modified) (5 diffs)
- trunk/src/org.routamc.positioning/importer/georss.php (modified) (11 diffs)
- trunk/src/org.routamc.positioning/importer/html.php (modified) (7 diffs)
- trunk/src/org.routamc.positioning/importer/manual.php (modified) (12 diffs)
- trunk/src/org.routamc.positioning/importer/plazes.php (modified) (5 diffs)
- trunk/src/org.routamc.positioning/location.php (modified) (2 diffs)
- trunk/src/org.routamc.positioning/log.php (modified) (6 diffs)
- trunk/src/org.routamc.positioning/midcom/interfaces.php (modified) (3 diffs)
- trunk/src/org.routamc.positioning/object.php (modified) (12 diffs)
- trunk/src/org.routamc.positioning/person.php (modified) (11 diffs)
- trunk/src/org.routamc.positioning/utils.php (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/org.routamc.gallery/config/manifest.inc
r4596 r4795 50 50 ), 51 51 ), 52 53 trunk/src/org.routamc.gallery/documentation/TODO
r4598 r4795 7 7 - photos by event participants 8 8 - taken during the event 9 trunk/src/org.routamc.gallery/gallery_helper.php
r4427 r4795 72 72 } 73 73 } 74 74 75 75 /** 76 76 * Determines which photolinks should be in gallery (based on gallery type) … … 90 90 return $this->$method(); 91 91 } 92 92 93 93 /** 94 94 * Sync handler for tag based gallery … … 100 100 // Populate $this->photos by tag information 101 101 $tags = net_nemein_tag_handler::get_object_tags($this->_node); 102 102 103 103 if ($tags) 104 104 { … … 133 133 } 134 134 } 135 // Sync 135 // Sync 136 136 return $this->_sync_photos(); 137 137 } … … 169 169 $this->photos[$photo->id] = true; 170 170 } 171 // Sync 171 // Sync 172 172 return $this->_sync_photos(); 173 173 } trunk/src/org.routamc.gallery/handler/configuration.php
r4427 r4795 35 35 parent::midcom_baseclasses_components_handler(); 36 36 } 37 37 38 38 /** 39 39 * Simple helper which references all important members to the request data listing … … 53 53 function _load_controller() 54 54 { 55 $this->_schemadb = midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_config')); 56 55 $this->_schemadb = midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_config')); 56 57 57 $this->_controller =& midcom_helper_datamanager2_controller::create('simple'); 58 58 $this->_controller->schemadb =& $this->_schemadb; … … 64 64 } 65 65 } 66 66 67 67 /** 68 68 * Helper, updates the context so that we get a complete breadcrum line towards the current … … 83 83 $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $tmp); 84 84 } 85 85 86 86 /** 87 87 * Displays a config edit view. … … 100 100 $synchronizer = new org_routamc_gallery_helper($this->_topic); 101 101 $synchronizer->sync(); 102 102 103 103 // Fall-through to relocate 104 104 105 105 case 'cancel': 106 106 $_MIDCOM->relocate(''); trunk/src/org.routamc.gallery/handler/index.php
r4455 r4795 13 13 * @package org.routamc.gallery 14 14 */ 15 class org_routamc_gallery_handler_index extends midcom_baseclasses_components_handler 15 class org_routamc_gallery_handler_index extends midcom_baseclasses_components_handler 16 16 { 17 17 /* … … 19 19 * See: http://www.midgard-project.org/api-docs/midcom/dev/midcom.baseclasses/midcom_baseclasses_components_handler.html 20 20 */ 21 21 22 22 /** 23 23 * Simple default constructor. … … 27 27 parent::midcom_baseclasses_components_handler(); 28 28 } 29 29 30 30 function _prepare_ajax_controllers() 31 31 { … … 40 40 } 41 41 } 42 42 43 43 /** 44 44 * The handler displaying photos … … 54 54 // This will exit 55 55 } 56 56 57 57 $data['node'] =& $this->_topic; 58 58 59 59 $qb = new org_openpsa_qbpager('org_routamc_gallery_photolink_dba', 'org_routamc_gallery_photolink'); 60 60 $qb->results_per_page = $this->_config->get('photos_per_page'); 61 61 $qb->add_constraint('node', '=', $this->_topic->id); 62 62 63 63 // FIXME: This property should be rethought 64 64 $qb->add_constraint('cencored', '=', 0); 65 65 66 66 $this->_request_data['qb'] =& $qb; 67 67 68 68 // TODO: Sort in 1.8 69 69 70 70 $photolinks = $qb->execute(); 71 71 $data['photos'] = array(); … … 78 78 } 79 79 } 80 80 81 81 $data['galleries'] = array(); 82 82 $nap = new midcom_helper_nav(); … … 90 90 } 91 91 } 92 92 93 93 // Make photos AJAX-editable 94 94 $this->_prepare_ajax_controllers(); 95 95 96 96 return true; 97 97 } 98 98 99 99 /** 100 100 * This function does the output. 101 * 101 * 102 102 */ 103 103 function _show_index($handler_id, &$data) 104 104 { 105 105 midcom_show_style('show_index_header'); 106 106 107 107 $data['datamanager'] = new midcom_helper_datamanager2_datamanager($data['schemadb']); 108 108 109 109 foreach ($data['galleries'] as $gallery) 110 110 { … … 113 113 $qb->set_limit(1); 114 114 $qb->add_constraint('node', '=', $gallery[MIDCOM_NAV_ID]); 115 115 116 116 // FIXME: This property should be rethought 117 117 $qb->add_constraint('cencored', '=', 0); 118 118 119 119 $photolinks = $qb->execute(); 120 120 if (count($photolinks) == 0) … … 123 123 continue; 124 124 } 125 125 126 126 $data['photo'] = new org_routamc_photostream_photo_dba($photolinks[0]->photo); 127 127 if (!$data['photo']) … … 130 130 continue; 131 131 } 132 132 133 133 if (! $data['datamanager']->autoset_storage($data['photo'])) 134 134 { … … 140 140 } 141 141 $data['photo_view'] = $data['datamanager']->get_content_html(); 142 142 143 143 midcom_show_style('show_index_gallery'); 144 144 } 145 145 146 146 foreach ($data['photos'] as $photo) 147 147 { 148 148 $data['photo'] = $photo; 149 149 150 150 $data['photo_view'] = $data['controllers'][$photo->id]->get_content_html(); 151 151 $data['datamanager'] =& $data['controllers'][$photo->id]->datamanager; 152 152 153 153 midcom_show_style('show_index_item'); 154 154 } 155 155 156 156 midcom_show_style('show_index_footer'); 157 157 } trunk/src/org.routamc.gallery/handler/view.php
r4595 r4795 6 6 * @copyright The Midgard Project, http://www.midgard-project.org 7 7 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 8 * 8 * 9 9 */ 10 class org_routamc_gallery_handler_view extends midcom_baseclasses_components_handler 10 class org_routamc_gallery_handler_view extends midcom_baseclasses_components_handler 11 11 { 12 12 /** … … 17 17 parent::midcom_baseclasses_components_handler(); 18 18 } 19 19 20 20 function _load_photo($id) 21 21 { … … 42 42 } 43 43 44 44 45 45 /** 46 46 * The handler for displaying a single photo … … 77 77 ); 78 78 /* 79 // PONDER: should this be just delete from this gallery (ie, use the censored property) ?? 79 // PONDER: should this be just delete from this gallery (ie, use the censored property) ?? 80 80 $this->_view_toolbar->add_item 81 81 ( … … 92 92 */ 93 93 } 94 94 95 95 $_MIDCOM->bind_view_to_object($data['photo'], $data['datamanager']->schema->name); 96 96 97 97 $data['view_title'] = $data['photo']->title; 98 98 … … 109 109 110 110 $_MIDCOM->set_pagetitle("{$this->_topic->extra}: {$data['view_title']}"); 111 111 112 112 $this->_update_breadcrumb_line($handler_id); 113 113 114 114 return true; 115 115 } … … 121 121 { 122 122 $data['photo_view'] = $data['datamanager']->get_content_html(); 123 123 124 124 midcom_show_style('show_photo'); 125 125 } 126 126 127 127 /** 128 128 * Helper, updates the context so that we get a complete breadcrum line towards the current trunk/src/org.routamc.gallery/midcom/interfaces.php
r4456 r4795 2 2 3 3 /** 4 * @package org.routamc.gallery 4 * @package org.routamc.gallery 5 5 * @author The Midgard Project, http://www.midgard-project.org 6 6 * @copyright The Midgard Project, http://www.midgard-project.org … … 34 34 ); 35 35 } 36 36 37 37 function _on_initialize() 38 38 { trunk/src/org.routamc.gallery/navigation.php
r4386 r4795 1 1 <?php 2 2 /** 3 * @package org.routamc.gallery 3 * @package org.routamc.gallery 4 4 * @author The Midgard Project, http://www.midgard-project.org 5 5 * @version $Id: navigation.php 3757 2006-07-27 14:32:42Z bergie $ … … 57 57 function get_node() 58 58 { 59 59 60 60 $hidden = false; 61 61 trunk/src/org.routamc.gallery/photolink.php
r4427 r4795 20 20 return parent::__org_routamc_gallery_photolink_dba($id); 21 21 } 22 22 23 23 function _on_creating() 24 24 { trunk/src/org.routamc.gallery/style/show_photo.php
r4595 r4795 10 10 &(view['photo']:h); 11 11 </div> 12 12 13 13 <div class="taken location"> 14 14 <?php … … 25 25 ?> 26 26 </div> 27 27 28 28 <div class="description"> 29 29 &(view['description']:h); 30 30 </div> 31 31 32 32 <div class="rating"> 33 33 <?php … … 36 36 ?> 37 37 </div> 38 38 39 39 <?php 40 // List tags used in this wiki page 40 // List tags used in this wiki page 41 41 $tags_by_context = net_nemein_tag_handler::get_object_tags_by_contexts($data['photo']); 42 42 if (count($tags_by_context) > 0) trunk/src/org.routamc.gallery/viewer.php
r4595 r4795 8 8 9 9 /** 10 * This is the class that defines which url's should be handled by this module. 11 * 10 * This is the class that defines which url's should be handled by this module. 11 * 12 12 * @package org.routamc.gallery 13 13 */ … … 31 31 'handler' => array 32 32 ( 33 'org_routamc_gallery_handler_configuration', 33 'org_routamc_gallery_handler_configuration', 34 34 'config' 35 35 ), … … 47 47 'variable_args' => 1, 48 48 ); 49 49 50 50 // Handle / 51 51 $this->_request_switch['index'] = array … … 54 54 ); 55 55 } 56 56 57 57 function _seek_photostream() 58 58 { … … 67 67 68 68 // We got a topic. Make it a NAP node 69 $nap = new midcom_helper_nav(); 69 $nap = new midcom_helper_nav(); 70 70 $photostream_node = $nap->get_node($photostream->id); 71 71 return $photostream_node; 72 72 } 73 73 74 74 // No photostream specified, autoprobe 75 75 $photostream_node = midcom_helper_find_node_by_component('org.routamc.photostream'); 76 76 77 77 // Cache the data 78 // TODO: sudo here? 78 // TODO: sudo here? 79 79 $this->_topic->parameter('org.routamc.gallery', 'photostream', $photostream_node[MIDCOM_NAV_GUID]); 80 80 81 81 return $photostream_node; 82 82 } … … 88 88 */ 89 89 function _populate_node_toolbar() 90 { 90 { 91 91 $this->_node_toolbar->add_item 92 92 ( … … 129 129 // This will exit. 130 130 } 131 131 132 132 $this->_request_data['schemadb'] = midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb')); 133 133 134 134 $this->_populate_node_toolbar(); 135 135 … … 143 143 ) 144 144 ); 145 145 146 146 return true; 147 147 } trunk/src/org.routamc.photostream/config/mgdschema.xml
r4345 r4795 4 4 <property name="id" type="integer" primaryfield="id"/> 5 5 <property name="node" link="midgard_topic:id" reverse="no" type="integer"/> 6 6 7 7 <!-- Photographer is always a person in DB. If you want to store extra attribution data use parameters --> 8 8 <property name="photographer" link="midgard_person:id" reverse="no" type="integer"/> … … 18 18 <property name="lang" multilang="yes" table="org_routamc_photostream_photo_i" type="integer" /> 19 19 <property name="sid" multilang="yes" table="org_routamc_photostream_photo_i" type="integer" /> 20 20 21 21 <!-- Timestamp when taken --> 22 22 <property name="taken" type="integer"/> 23 23 24 24 <!-- Integer for rating, typically of the "1-5 stars" variety --> 25 25 <property name="rating" type="integer"/> 26 26 27 27 <!-- required 1.7 metadata --> 28 28 <property name="revised" type="string"/> … … 30 30 <property name="creator" link="midgard_person:id" reverse="no" type="integer"/> 31 31 <property name="revisor" link="midgard_person:id" reverse="no" type="integer"/> 32 <!-- /required metadata --> 32 <!-- /required metadata --> 33 33 </type> 34 34 </Schema> trunk/src/org.routamc.photostream/config/schemadb_default.inc
r4592 r4795 19 19 'widget' => 'textarea', 20 20 ), 21 'photographer' => array21 'photographer' => array 22 22 ( 23 23 'title' => 'photographer', … … 47 47 'orders' => array 48 48 ( 49 array('lastname' => 'ASC'), 50 array('firstname' => 'ASC'), 51 ), 52 ), 49 array('lastname' => 'ASC'), 50 array('firstname' => 'ASC'), 51 ), 52 ), 53 53 ), 54 54 'taken' => Array … … 57 57 'storage' => 'taken', 58 58 'type' => 'date', 59 'type_config' => Array 60 ( 61 'storage_type' => 'UNIXTIME' 59 'type_config' => Array 60 ( 61 'storage_type' => 'UNIXTIME' 62 62 ), 63 63 'widget' => 'jsdate', … … 89 89 'widget' => 'select', 90 90 ), 91 /* NOTE: You *will* want to migrate all changes made here to the same 91 /* NOTE: You *will* want to migrate all changes made here to the same 92 92 field in the upload schema as well */ 93 93 'photo' => Array … … 99 99 'filter_chain' => 'exifrotate()', 100 100 'auto_thumbnail' => Array(200,200), 101 'derived_images' => array 101 'derived_images' => array 102 102 ( 103 103 // Intentionally this way, so that portraits can be taller … … 143 143 'widget' => 'textarea', 144 144 ), 145 'photographer' => array145 'photographer' => array 146 146 ( 147 147 'title' => 'photographer', … … 171 171 'orders' => array 172 172 ( 173 array('lastname' => 'ASC'), 174 array('firstname' => 'ASC'), 173 array('lastname' => 'ASC'), 174 array('firstname' => 'ASC'), 175 175 ), 176 176 ), … … 183 183 'widget' => 'text', 184 184 ), 185 /* NOTE: You *will* want to migrate all changes made here to the same 185 /* NOTE: You *will* want to migrate all changes made here to the same 186 186 field in the photo schema as well */ 187 187 'photo' => Array trunk/src/org.routamc.photostream/documentation/TODO
r4597 r4795 7 7 * better photographer resolve to person 8 8 * Check if any wiki pages on the site refer to the images using the 9 `[photo: GUID]` format and change the GUID to point to the 9 `[photo: GUID]` format and change the GUID to point to the 10 10 org_routamc_photostream_photo objects 11 11 … … 25 25 - Alternatively (the simpler way must also be supported for moblogging 26 26 purposes) check email's GPG signature 27 trunk/src/org.routamc.photostream/exec/convert_nsphotos.php
r4459 r4795 155 155 unlink($tmpfile); 156 156 $tmpfile .= '_' . $basename; 157 157 158 158 /* 159 159 // DEBUG: Break here for a moment … … 161 161 continue; 162 162 */ 163 163 164 164 // Create working copy 165 165 $dst = fopen($tmpfile, 'w'); … … 182 182 fclose($src); 183 183 fclose($dst); 184 184 185 185 // TODO: Figure out photographer person from the string, now we just store it for later and use the uploader 186 186 $photo = new org_routamc_photostream_photo_dba(); … … 200 200 $photo->taken = strtotime($nsphoto->article->created); 201 201 } 202 202 203 203 $photo->photographer = $nsphoto->article->author; // Technically uploader but good enough for now 204 204 if (!$photo->create()) … … 211 211 $photo->parameter('org.routamc.photostream', 'attribution', $nsphoto->photographer); 212 212 $photo->parameter('org.routamc.photostream', 'net.siriux.photos:guid', $original_guid); 213 213 214 214 // Load datamanager 215 215 $datamanager = new midcom_helper_datamanager2_datamanager($schemadb); … … 264 264 $node->parameter('midcom', 'component', 'org.routamc.gallery'); 265 265 $node->parameter('org.routamc.gallery', 'gallery_type', ORG_ROUTAMC_GALLERY_TYPE_HANDPICKED); 266 266 267 267 } 268 268 echo "All done.</p>\n"; trunk/src/org.routamc.photostream/handler/admin.php
r4597 r4795 286 286 { 287 287 $data['photo_view'] = $this->_datamanager->get_content_html(); 288 288 289 289 // Figure out how URLs to photo lists should be constructed 290 290 $data['photographer'] = new midcom_db_person($data['photo']->photographer); … … 297 297 $data['user_url'] = $data['photographer']->guid; 298 298 } 299 299 300 300 midcom_show_style('admin_delete'); 301 301 } trunk/src/org.routamc.photostream/handler/index.php
r4401 r4795 5 5 * @copyright The Midgard Project, http://www.midgard-project.org 6 6 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 7 * 7 * 8 8 */ 9 class org_routamc_photostream_handler_index extends midcom_baseclasses_components_handler 10 { 9 class org_routamc_photostream_handler_index extends midcom_baseclasses_components_handler 10 { 11 11 /** 12 12 * Simple default constructor. … … 16 16 parent::midcom_baseclasses_components_handler(); 17 17 } 18 18 19 19 /** 20 20 * The handler for displaying index to different photo streams … … 26 26 // Populate different photostreams here 27 27 $data['photostreams'] = array(); 28 28 29 29 if ($_MIDCOM->auth->is_valid_user()) 30 30 { … … 37 37 ); 38 38 } 39 39 40 40 // Show "all" options 41 41 $data['photostreams'][] = array … … 55 55 */ 56 56 function _show_index($handler_id, &$data) 57 { 57 { 58 58 midcom_show_style('show_index_header'); 59 59 60 60 foreach ($data['photostreams'] as $photostream) 61 61 { … … 63 63 midcom_show_style('show_index_item'); 64 64 } 65 65 66 66 midcom_show_style('show_index_footer'); 67 67 } trunk/src/org.routamc.photostream/handler/list.php
r4438 r4795 5 5 * @copyright The Midgard Project, http://www.midgard-project.org 6 6 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License 7 * 7 * 8 8 */ 9 class org_routamc_photostream_handler_list extends midcom_baseclasses_components_handler 10 { 9 class org_routamc_photostream_handler_list extends midcom_baseclasses_components_handler 10 { 11 11 /** 12 12 * Simple default constructor. … … 16 16 parent::midcom_baseclasses_components_handler(); 17 17 } 18 18 19 19 /** 20 20 * Resolve username or person GUID to a midcom_db_person object … … 32 32 return $users[0]; 33 33 } 34 34 35 35 if (mgd_is_guid($username)) 36 36 { … … 39 39 return $user; 40 40 } 41 41 42 42 return null; 43 43 } 44 44 45 45 /** 46 46 * Prepare a paged query builder for listing photos … … 54 54 return $qb; 55 55 } 56 56 57 57 function _prepare_ajax_controllers() 58 58 { … … 67 67 } 68 68 } 69 69 70 70 /** 71 71 * The handler for displaying a photographer's photostream … … 82 82 return false; 83 83 } 84 84 85 85 $data['view_title'] = sprintf($this->_l10n->get('photos of %s'), $data['user']->name); 86 86 $data['user_url'] = $args[0]; … … 91 91 $data['user_url'] = 'all'; 92 92 } 93 93 94 94 // List photos 95 95 $qb =& $this->_prepare_photo_qb(); 96 96 97 97 if ($handler_id == 'photostream_list') 98 98 { … … 100 100 $qb->add_constraint('photographer', '=', $data['user']->id); 101 101 } 102 102 103 103 $qb->add_order('taken', 'DESC'); 104 104 $data['photos'] = $qb->execute(); 105 105 106 106 // Make photos AJAX-editable 107 107 $this->_prepare_ajax_controllers(); … … 109 109 $_MIDCOM->set_pagetitle("{$this->_topic->extra}: {$data['view_title']}"); 110 110 $this->_update_breadcrumb_line($handler_id); 111 111 112 112 return true; 113 113 } 114 114 115 115 function _show_photostream_list($handler_id, &$data) 116 116 { … … 154 154 $_MIDCOM->set_pagetitle("{$this->_topic->extra}: {$data['view_title']}"); 155 155 $this->_update_breadcrumb_line($handler_id); 156 156 157 157 return true; 158 158 } … … 178 178 return false; 179 179 } 180 180 181 181 $data['view_title'] = sprintf($this->_l10n->get('photos of %s tagged with %s'), $data['user']->name, $data['tag']); 182 182 $data['user_url'] = $args[0]; … … 189 189 } 190 190 $data['photos'] = array(); 191 191 192 192 // Get photo GUIDs from tags 193 193 // TODO: Use MidgardCollector for this … … 201 201 // List photos 202 202 $qb =& $this->_prepare_photo_qb(); 203 203 204 204 $qb->begin_group('OR'); 205 205 foreach ($tags as $tag) … … 208 208 } 209 209 $qb->end_group(); 210 210 211 211 if ($handler_id == 'photostream_tag') 212 212 { … … 214 214 $qb->add_constraint('photographer', '=', $data['user']->id); 215 215 } 216 216 217 217 $qb->add_order('taken', 'DESC'); 218 218 $data['photos'] = $qb->execute(); 219 219 } 220 220 221 221 // Make photos AJAX-editable 222 222 $this->_prepare_ajax_controllers(); … … 224 224 $_MIDCOM->set_pagetitle("{$this->_topic->extra}: {$data['view_title']}"); 225 225 $this->_update_breadcrumb_line($handler_id); 226 226 227 227 return true; 228 228 } 229 229 230 230 function _show_photostream_tag($handler_id, &$data) 231 231 { 232 232 $this->_show_photostream($handler_id, &$data); 233 233 } 234 234 235 235 236 236 /** … … 249 249 return false; 250 250 } 251 251 252 252 &n
