Changeset 26199 for extensions/instagram2piwigo/admin/import.php
- Timestamp:
- Dec 26, 2013, 12:48:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/instagram2piwigo/admin/import.php
r24817 r26199 1 1 <?php 2 if (!defined('INSTAG_PATH'))die('Hacking attempt!');2 defined('INSTAG_PATH') or die('Hacking attempt!'); 3 3 4 4 set_time_limit(600); … … 7 7 8 8 // check API parameters and connect to instagram 9 if ( empty($conf['Instagram2Piwigo']['api_key']) or empty($conf['Instagram2Piwigo']['secret_key']))10 { 11 array_push($page['warnings'], l10n('Please fill your API keys on the configuration tab'));9 if (empty($conf['Instagram2Piwigo']['api_key']) or empty($conf['Instagram2Piwigo']['secret_key'])) 10 { 11 $page['warnings'][] = l10n('Please fill your API keys on the configuration tab'); 12 12 $_GET['action'] = 'error'; 13 13 } 14 14 else if (!function_exists('curl_init')) 15 15 { 16 array_push($page['errors'], l10n('No download method available').' (cURL)');16 $page['errors'][] = l10n('No download method available').' (cURL)'; 17 17 $_GET['action'] = 'error'; 18 18 } … … 25 25 26 26 $auth_config = array( 27 'client_id'=> $conf['Instagram2Piwigo']['api_key'],28 'client_secret'=> $conf['Instagram2Piwigo']['secret_key'],29 'redirect_uri'=> get_absolute_root_url() . INSTAG_ADMIN . '-import',30 );27 'client_id' => $conf['Instagram2Piwigo']['api_key'], 28 'client_secret' => $conf['Instagram2Piwigo']['secret_key'], 29 'redirect_uri' => get_absolute_root_url() . INSTAG_ADMIN . '-import', 30 ); 31 31 32 32 $auth = new Instagram_Auth($auth_config); … … 57 57 58 58 59 if (!isset($_GET['action'])) $_GET['action'] = 'main'; 59 if (!isset($_GET['action'])) 60 { 61 $_GET['action'] = 'main'; 62 } 60 63 61 64 … … 142 145 if ($duplicates>0) 143 146 { 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) 147 $page['infos'][] = '<a href="admin.php?page=batch_manager&filter=prefilter-instagram">' 148 .l10n_dec( 149 'One picture is not displayed because already existing in the database.', 150 '%d pictures are not displayed because already existing in the database.', 151 $duplicates) 146 152 .'</a>'; 147 153 } … … 195 201 if (isset($_POST['done'])) 196 202 { 197 $_SESSION['page_infos'][] = sprintf(l10n('%d pictures imported'), $_POST['done']);203 $_SESSION['page_infos'][] = l10n('%d pictures imported', $_POST['done']); 198 204 } 199 205 redirect(INSTAG_ADMIN . '-import'); … … 204 210 $template->assign('ACTION', $_GET['action']); 205 211 206 $template->set_filename('Instagram2Piwigo', dirname(__FILE__) . '/template/import.tpl'); 207 208 ?> 212 $template->set_filename('Instagram2Piwigo', realpath(INSTAG_PATH . 'admin/template/import.tpl'));
Note: See TracChangeset
for help on using the changeset viewer.