Ignore:
Timestamp:
Dec 26, 2013, 1:22:47 PM (11 years ago)
Author:
mistic100
Message:

update for 2.6

File:
1 edited

Legend:

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

    r24661 r26201  
    11<?php
    2 if (!defined('PBASE_PATH')) die('Hacking attempt!');
     2defined('PBASE_PATH') or die('Hacking attempt!');
    33
    44function pbase_add_ws_method($arr)
     
    1414      'fills' => array('default' => 'fill_name,fill_taken,fill_author,fill_comment,fill_tags'),
    1515      ),
    16     'Used by PBase2Piwigo'
     16    'Used by PBase2Piwigo',
     17    null,
     18    array('hidden'=>true)
    1719    );
    1820   
     
    2527      'recursive' => array('default' => true),
    2628      ),
    27     'Used by PBase2Piwigo'
     29    'Used by PBase2Piwigo',
     30    null,
     31    array('hidden'=>true)
    2832    );
    2933   
     
    3539      'path' => array(),
    3640      ),
    37     'Used by PBase2Piwigo'
     41    'Used by PBase2Piwigo',
     42    null,
     43    array('hidden'=>true)
    3844    );
    3945}
     
    5662  include_once(PBASE_PATH.'include/functions.inc.php');
    5763 
    58   if (test_remote_download() === false)
     64  if (!test_remote_download())
    5965  {
    6066    return new PwgError(null, l10n('No download method available'));
     
    127133  else
    128134  {
    129     $category_id = ws_categories_add(array(
     135    $new_cat = $service->invoke('pwg.categories.add', array(
    130136      'name' => $category['title'].' <!--pbase-->',
    131137      'parent' => $params['parent_id'],
    132138      'comment' => pwg_db_real_escape_string($category['description']),
    133       ), $service);
    134     $category_id = $category_id['id'];
     139      ));
     140    $category_id = $new_cat['id'];
    135141  }
    136142 
     
    140146    'pictures' => array(),
    141147    'categories' => array(),
    142     'message' => sprintf(l10n('Album "%s" created'), $category['title']),
     148    'message' => l10n('Album "%s" created', $category['title']),
    143149    );
    144150   
    145151  foreach ($category['pictures'] as &$pict)
    146152  {
    147     array_push($output['pictures'], $pict['url']);
     153    $output['pictures'][] = $pict['url'];
    148154  }
    149155  if ($params['recursive'])
     
    151157    foreach ($category['categories'] as &$cat)
    152158    {
    153       array_push($output['categories'], $cat['path']);
     159      $output['categories'][] = $cat['path'];
    154160    }
    155161  }
     
    231237      }
    232238     
    233       if ( !empty($photo['keywords']) and in_array('fill_tags', $params['fills']) )
     239      if (!empty($photo['keywords']) and in_array('fill_tags', $params['fills']))
    234240      {
    235241        $raw_tags = implode(',', $photo['keywords']);
     
    239245  }
    240246 
    241   return sprintf(l10n('Photo "%s" imported'), $photo['title']);
    242 }
    243 
    244 ?>
     247  return l10n('Photo "%s" imported', $photo['title']);
     248}
Note: See TracChangeset for help on using the changeset viewer.