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

some code corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/flickr2piwigo/include/ws_functions.inc.php

    r17312 r17476  
    1010    'ws_images_addFlickr',
    1111    array(
    12       'category' => array('default' => null),   
    13       'id' => array('default' => null),
     12      'id' => array(),
     13      'category' => array(),
    1414      'fills' => array('default' =>null),
    1515      ),
    16     'Used by Flickr2Piwigo, fills € (fill_name,fill_posted,fill_taken,fill_author,fill_tags)'
     16    'Used by Flickr2Piwigo'
    1717    );
    1818}
     
    3030  if ( empty($conf['flickr2piwigo']['api_key']) or empty($conf['flickr2piwigo']['secret_key']) )
    3131  {
    32     return new PwgError(500, l10n('Please fill your API keys on the configuration tab'));
     32    return new PwgError(null, l10n('Please fill your API keys on the configuration tab'));
    3333  }
    3434 
     
    3636  include_once(PHPWG_ROOT_PATH . 'admin/include/functions_upload.inc.php');
    3737  include_once(FLICKR_PATH . 'include/functions.inc.php');
     38 
     39  if (test_remote_download() === false)
     40  {
     41    return new PwgError(null, l10n('No download method available'));
     42  }
    3843 
    3944  // init flickr API
     
    5863  if (download_remote_file($photo['url'], $photo['path']) == false)
    5964  {
    60     return new PwgError(500, l10n('No download method available'));
     65    return new PwgError(null, l10n('Can\'t download file'));
    6166  }
    6267 
     
    125130  }
    126131 
    127   return sprintf(l10n('%s imported'), $photo['title']);
     132  return sprintf(l10n('Photo "%s" imported'), $photo['title']);
    128133}
    129134
Note: See TracChangeset for help on using the changeset viewer.