Ignore:
Timestamp:
Jan 1, 2014, 11:34:30 AM (10 years ago)
Author:
mistic100
Message:

update for 2.6

File:
1 edited

Legend:

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

    r20407 r26387  
    2020      'url_in_comment' => array('default' => true),
    2121      ),
    22     'Add image from remote URL.'
     22    'Add image from remote URL.',
     23    null,
     24    array('admin_only'=>true)
    2325    );
    2426}
     
    3335  }
    3436 
     37  load_language('plugin.lang', URLUPLOADER_PATH);
     38 
    3539  $params = array_map('trim', $params);
    3640 
     
    4145  if (empty($params['file_url']))
    4246  {
    43     return new PwgError(WS_ERR_INVALID_PARAM, 'File URL is empty');
     47    return new PwgError(WS_ERR_INVALID_PARAM, l10n('File URL is empty'));
    4448  }
    4549  // check remote url
    4650  if (!url_is_remote($params['file_url']))
    4751  {
    48     return new PwgError(WS_ERR_INVALID_PARAM, 'Invalid file URL');
     52    return new PwgError(WS_ERR_INVALID_PARAM, l10n('Invalid file URL'));
    4953  }
    5054  // check file extension
    5155  if (!in_array(strtolower(get_extension($params['file_url'])), $allowed_extensions))
    5256  {
    53     return new PwgError(WS_ERR_INVALID_PARAM, 'Invalid file type');
     57    return new PwgError(WS_ERR_INVALID_PARAM, l10n('Invalid file type'));
    5458  }
    5559
     
    6670  {
    6771    @unlink($temp_filename);
    68     return new PwgError(WS_ERR_INVALID_PARAM, 'Unable to download file');
     72    return new PwgError(WS_ERR_INVALID_PARAM, l10n('Unable to download file'));
    6973  }
    7074  // check mime-type
     
    7276  {
    7377    @unlink($temp_filename);
    74     return new PwgError(WS_ERR_INVALID_PARAM, 'Invalid file type');
     78    return new PwgError(WS_ERR_INVALID_PARAM, l10n('Invalid file type'));
    7579  }
    7680
     
    131135    );
    132136}
    133 
    134 ?>
Note: See TracChangeset for help on using the changeset viewer.