Changeset 24817
- Timestamp:
- Oct 9, 2013, 3:47:53 PM (11 years ago)
- Location:
- extensions/instagram2piwigo
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/instagram2piwigo/admin/config.php
r19561 r24817 10 10 unset($_SESSION['phpinstagram_auth_token']); 11 11 conf_update_param('Instagram2Piwigo', serialize($conf['Instagram2Piwigo'])); 12 $page['infos'][] = l10n('Information data registered in database'); 12 13 } 13 14 -
extensions/instagram2piwigo/admin/import.php
r19711 r24817 142 142 if ($duplicates>0) 143 143 { 144 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)); 144 $page['infos'][] = '<a href="admin.php?page=batch_manager&prefilter=instagram">' 145 .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) 146 .'</a>'; 145 147 } 146 148 -
extensions/instagram2piwigo/main.inc.php
r19561 r24817 3 3 Plugin Name: Instagram2Piwigo 4 4 Version: auto 5 Description: Import pictures from your Flickraccount6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=6125 Description: Import pictures from your instagram account 6 Plugin URI: auto 7 7 Author: Mistic 8 8 Author URI: http://www.strangeplanet.fr … … 21 21 { 22 22 add_event_handler('get_admin_plugin_menu_links', 'instagram_admin_menu'); 23 add_event_handler('get_batch_manager_prefilters', 'instagram_add_batch_manager_prefilters'); 24 add_event_handler('perform_batch_manager_prefilters', 'instagram_perform_batch_manager_prefilters', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 25 add_event_handler('loc_begin_admin_page', 'instagram_prefilter_from_url'); 23 26 24 27 function instagram_admin_menu($menu) … … 30 33 return $menu; 31 34 } 35 36 function instagram_add_batch_manager_prefilters($prefilters) 37 { 38 array_push($prefilters, array( 39 'ID' => 'instagram', 40 'NAME' => l10n('Imported from Instagram'), 41 )); 42 return $prefilters; 43 } 44 45 function instagram_perform_batch_manager_prefilters($filter_sets, $prefilter) 46 { 47 if ($prefilter == 'instagram') 48 { 49 $query = ' 50 SELECT id 51 FROM '.IMAGES_TABLE.' 52 WHERE file LIKE "instagram-%" 53 ;'; 54 $filter_sets[] = array_from_query($query, 'id'); 55 } 56 57 return $filter_sets; 58 } 59 60 function instagram_prefilter_from_url() 61 { 62 global $page; 63 if ($page['page'] == 'batch_manager' && @$_GET['prefilter'] == 'instagram') 64 { 65 $_SESSION['bulk_manager_filter'] = array('prefilter' => 'instagram'); 66 unset($_GET['prefilter']); 67 } 68 } 32 69 } 33 70 -
extensions/instagram2piwigo/maintain.inc.php
r19561 r24817 39 39 global $conf; 40 40 41 pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "Instagram2Piwigo" LIMIT 1;'); 41 pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "Instagram2Piwigo";'); 42 unset($conf['Instagram2Piwigo']); 42 43 43 44 rrmdir($conf['data_location'].'instagram_cache/');
Note: See TracChangeset
for help on using the changeset viewer.