Changeset 17476 for extensions/flickr2piwigo/admin
- Timestamp:
- Aug 8, 2012, 1:55:06 PM (12 years ago)
- Location:
- extensions/flickr2piwigo/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/flickr2piwigo/admin/import.php
r17313 r17476 3 3 4 4 set_time_limit(600); 5 6 include_once(PICASA_WA_PATH . 'include/functions.inc.php'); 5 7 6 8 // check API parameters and connect to flickr … … 10 12 $_GET['action'] = 'error'; 11 13 } 12 else if ( ! function_exists('curl_init') and !ini_get('allow_url_fopen') )14 else if ( !test_remote_download() ) 13 15 { 14 16 array_push($page['errors'], l10n('No download method available')); … … 154 156 ;'; 155 157 $existing_photos = simple_hash_from_query($query, 'id', 'file'); 156 $existing_photos = array_map(create_function('$p', ' $p=preg_replace("#^'.$flickr_prefix.'([0-9]+)\.([a-z]{3,4})$#i", "$1", $p); return $p;'), $existing_photos);158 $existing_photos = array_map(create_function('$p', 'return preg_replace("#^'.$flickr_prefix.'([0-9]+)\.([a-z]{3,4})$#i", "$1", $p);'), $existing_photos); 157 159 158 160 // remove existing photos … … 199 201 FROM '.CATEGORIES_TABLE.' 200 202 ;'; 201 display_select_cat_wrapper($query, array(), 'associate_options');202 203 display_select_cat_wrapper($query, array(), 'category_parent_options'); 203 204 … … 223 224 224 225 $all_photos = array(); 225 foreach ($all_albums as &$album)226 foreach ($all_albums as $album) 226 227 { 227 228 $album_photos = $flickr->photosets_getPhotos($album['id'], NULL, NULL, 500, NULL, 'photos'); 228 229 $album_photos = $album_photos['photoset']['photo']; 229 230 230 foreach ($album_photos as &$photo)231 foreach ($album_photos as $photo) 231 232 { 232 233 $all_photos[ $photo['id'] ][] = $album['title']; 233 234 } 234 unset($photo); 235 } 236 unset($album); 235 } 237 236 238 237 // get existing photos … … 243 242 ;'; 244 243 $existing_photos = simple_hash_from_query($query, 'id', 'file'); 245 $existing_photos = array_map(create_function('$p', ' $p=preg_replace("#^'.$flickr_prefix.'([0-9]+)\.([a-z]{3,4})$#i", "$1", $p); return $p;'), $existing_photos);244 $existing_photos = array_map(create_function('$p', 'return preg_replace("#^'.$flickr_prefix.'([0-9]+)\.([a-z]{3,4})$#i", "$1", $p);'), $existing_photos); 246 245 247 246 // remove existing photos … … 281 280 FROM '.CATEGORIES_TABLE.' 282 281 ;'; 283 display_select_cat_wrapper($query, array(), 'associate_options', true);284 282 display_select_cat_wrapper($query, array(), 'category_parent_options'); 285 283 break; -
extensions/flickr2piwigo/admin/template/import.list_all.tpl
r17313 r17476 57 57 $("#loader_import").fadeIn(); 58 58 59 if ($("input[name='album_mode'] ").val() == 'identical') {59 if ($("input[name='album_mode']:checked").val() == 'identical') { 60 60 var album = 0; 61 61 } else { … … 115 115 <p id="albumSelectWrapper" style="display:none;"> 116 116 <select style="width:400px" name="associate" id="albumSelect" size="1"> 117 {html_options options=$ associate_options}117 {html_options options=$category_parent_options} 118 118 </select> 119 119 {'... or '|@translate}<a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> -
extensions/flickr2piwigo/admin/template/import.list_photos.tpl
r17313 r17476 405 405 <label for="albumSelect"><b>{'Album'|@translate}:</b></label> 406 406 <select style="width:400px" name="associate" id="albumSelect" size="1"> 407 {html_options options=$ associate_options}407 {html_options options=$category_parent_options} 408 408 </select> 409 409 {'... or '|@translate}<a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> -
extensions/flickr2piwigo/admin/template/style.css
r16064 r17476 6 6 margin-top:20px; 7 7 } 8 UL.thumbnails span.wrap2 { 9 height: 128px; 10 width: 128px; 11 }
Note: See TracChangeset
for help on using the changeset viewer.