Changeset 24815
- Timestamp:
- Oct 9, 2013, 3:18:02 PM (11 years ago)
- Location:
- extensions/flickr2piwigo
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/flickr2piwigo/admin/config.php
r16071 r24815 10 10 unset($_SESSION['phpFlickr_auth_token']); 11 11 conf_update_param('flickr2piwigo', serialize($conf['flickr2piwigo'])); 12 $page['infos'][] = l10n('Information data registered in database'); 12 13 } 13 14 -
extensions/flickr2piwigo/admin/import.php
r19537 r24815 171 171 if ($duplicates>0) 172 172 { 173 array_push($page['infos'], l10n_dec('One picture is not displayed because already existing in the database.', '%d pictures are not displayed because already existing in the database.', $duplicates)); 173 $page['infos'][] = '<a href="admin.php?page=batch_manager&prefilter=flickr">' 174 .l10n_dec('One picture is not displayed because already existing in the database.', '%d pictures are not displayed because already existing in the database.', $duplicates) 175 .'</a>'; 174 176 } 175 177 … … 266 268 if ($duplicates>0) 267 269 { 268 array_push($page['infos'], l10n_dec('%d picture is not displayed because already existing in the database.', '%d pictures are not displayed because already existing in the database.', $duplicates)); 270 $page['infos'][] = '<a href="admin.php?page=batch_manager&prefilter=flickr">' 271 .l10n_dec('%d picture is not displayed because already existing in the database.', '%d pictures are not displayed because already existing in the database.', $duplicates) 272 .'</a>'; 269 273 } 270 274 -
extensions/flickr2piwigo/include/ws_functions.inc.php
r24660 r24815 108 108 109 109 $updates = array(); 110 if (in_array('fill_name', $photo['fills'])) $updates['name'] = $photo['title'];110 if (in_array('fill_name', $photo['fills'])) $updates['name'] = pwg_db_real_escape_string($photo['title']); 111 111 if (in_array('fill_posted', $photo['fills'])) $updates['date_available'] = date('Y-m-d H:i:s', $photo['dates']['posted']); 112 112 if (in_array('fill_taken', $photo['fills'])) $updates['date_creation'] = $photo['dates']['taken']; 113 if (in_array('fill_author', $photo['fills'])) $updates['author'] = $photo['owner']['username'];113 if (in_array('fill_author', $photo['fills'])) $updates['author'] = pwg_db_real_escape_string($photo['owner']['username']); 114 114 115 115 if (count($updates)) -
extensions/flickr2piwigo/main.inc.php
r24660 r24815 21 21 { 22 22 add_event_handler('get_admin_plugin_menu_links', 'flickr_admin_menu'); 23 add_event_handler('get_batch_manager_prefilters', 'flickr_add_batch_manager_prefilters'); 24 add_event_handler('perform_batch_manager_prefilters', 'flickr_perform_batch_manager_prefilters', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 25 add_event_handler('loc_begin_admin_page', 'flickr_prefilter_from_url'); 23 26 24 27 function flickr_admin_menu($menu) … … 30 33 return $menu; 31 34 } 35 36 function flickr_add_batch_manager_prefilters($prefilters) 37 { 38 array_push($prefilters, array( 39 'ID' => 'flickr', 40 'NAME' => l10n('Imported from Flickr'), 41 )); 42 return $prefilters; 43 } 44 45 function flickr_perform_batch_manager_prefilters($filter_sets, $prefilter) 46 { 47 if ($prefilter == 'flickr') 48 { 49 $query = ' 50 SELECT id 51 FROM '.IMAGES_TABLE.' 52 WHERE file LIKE "flickr-%" 53 ;'; 54 $filter_sets[] = array_from_query($query, 'id'); 55 } 56 57 return $filter_sets; 58 } 59 60 function flickr_prefilter_from_url() 61 { 62 global $page; 63 if ($page['page'] == 'batch_manager' && @$_GET['prefilter'] == 'flickr') 64 { 65 $_SESSION['bulk_manager_filter'] = array('prefilter' => 'flickr'); 66 unset($_GET['prefilter']); 67 } 68 } 32 69 } 33 70 -
extensions/flickr2piwigo/maintain.inc.php
r19831 r24815 39 39 global $conf; 40 40 41 pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "flickr2piwigo" LIMIT 1;'); 41 pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "flickr2piwigo";'); 42 unset($conf['flickr2piwigo']); 42 43 43 44 rrmdir(PHPWG_ROOT_PATH . $conf['data_location'] . 'flickr_cache/');
Note: See TracChangeset
for help on using the changeset viewer.