Ignore:
Timestamp:
Aug 8, 2012, 1:55:06 PM (12 years ago)
Author:
mistic100
Message:

some code corrections

Location:
extensions/flickr2piwigo/admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/flickr2piwigo/admin/import.php

    r17313 r17476  
    33
    44set_time_limit(600);
     5
     6include_once(PICASA_WA_PATH . 'include/functions.inc.php');
    57
    68// check API parameters and connect to flickr
     
    1012  $_GET['action'] = 'error';
    1113}
    12 else if ( !function_exists('curl_init') and !ini_get('allow_url_fopen') )
     14else if ( !test_remote_download() )
    1315{
    1416  array_push($page['errors'], l10n('No download method available'));
     
    154156;';
    155157    $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);
    157159   
    158160    // remove existing photos
     
    199201  FROM '.CATEGORIES_TABLE.'
    200202;';
    201     display_select_cat_wrapper($query, array(), 'associate_options');
    202203    display_select_cat_wrapper($query, array(), 'category_parent_options');
    203204   
     
    223224   
    224225    $all_photos = array();
    225     foreach ($all_albums as &$album)
     226    foreach ($all_albums as $album)
    226227    {
    227228      $album_photos = $flickr->photosets_getPhotos($album['id'], NULL, NULL, 500, NULL, 'photos');
    228229      $album_photos = $album_photos['photoset']['photo'];
    229230     
    230       foreach ($album_photos as &$photo)
     231      foreach ($album_photos as $photo)
    231232      {
    232233        $all_photos[ $photo['id'] ][] = $album['title'];
    233234      }
    234       unset($photo);
    235     }
    236     unset($album);
     235    }
    237236   
    238237    // get existing photos
     
    243242;';
    244243    $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);
    246245   
    247246    // remove existing photos
     
    281280  FROM '.CATEGORIES_TABLE.'
    282281;';
    283     display_select_cat_wrapper($query, array(), 'associate_options', true);
    284282    display_select_cat_wrapper($query, array(), 'category_parent_options');
    285283    break;
  • extensions/flickr2piwigo/admin/template/import.list_all.tpl

    r17313 r17476  
    5757    $("#loader_import").fadeIn();
    5858   
    59     if ($("input[name='album_mode']").val() == 'identical') {
     59    if ($("input[name='album_mode']:checked").val() == 'identical') {
    6060      var album = 0;
    6161    } else {
     
    115115    <p id="albumSelectWrapper" style="display:none;">
    116116      <select style="width:400px" name="associate" id="albumSelect" size="1">
    117         {html_options options=$associate_options}
     117        {html_options options=$category_parent_options}
    118118      </select>
    119119      {'... 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  
    405405      <label for="albumSelect"><b>{'Album'|@translate}:</b></label>
    406406      <select style="width:400px" name="associate" id="albumSelect" size="1">
    407         {html_options options=$associate_options}
     407        {html_options options=$category_parent_options}
    408408      </select>
    409409      {'... 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  
    66  margin-top:20px;
    77}
     8UL.thumbnails span.wrap2 {
     9  height: 128px;
     10  width: 128px;
     11}
Note: See TracChangeset for help on using the changeset viewer.