Index: extensions/Google2Piwigo/include/functions.inc.php
===================================================================
--- extensions/Google2Piwigo/include/functions.inc.php (revision 20662)
+++ extensions/Google2Piwigo/include/functions.inc.php (revision 20670)
@@ -22,5 +22,5 @@
* @param: mixed destination file (if true, file content is returned)
*/
-function picasa_wa_download_remote_file($src, $dest)
+function picasa_wa_download_remote_file($src, $dest, $headers=array())
{
if (empty($src))
@@ -30,4 +30,6 @@
$return = ($dest === true) ? true : false;
+
+ array_push($headers, 'Accept-language: en');
/* curl */
@@ -42,9 +44,12 @@
curl_setopt($ch, CURLOPT_URL, $src);
curl_setopt($ch, CURLOPT_HEADER, false);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept-language: en"));
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_MAXREDIRS, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
+ if (!ini_get('safe_mode'))
+ {
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
+ curl_setopt($ch, CURLOPT_MAXREDIRS, 1);
+ }
if (strpos($src, 'https://') !== false)
{
@@ -87,5 +92,5 @@
'method' => "GET",
'user_agent' => 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)',
- 'header' => "Accept-language: en",
+ 'header' => implode("\r\n", $headers),
)
);
Index: extensions/Google2Piwigo/include/ws_functions.inc.php
===================================================================
--- extensions/Google2Piwigo/include/ws_functions.inc.php (revision 20662)
+++ extensions/Google2Piwigo/include/ws_functions.inc.php (revision 20670)
@@ -13,5 +13,5 @@
'pwa_album' => array(),
'category' => array(),
- 'fills' => array('default' =>null),
+ 'fills' => array('default' => 'fill_name,fill_author,fill_tags,fill_date,fill_description'),
),
'Used by Picasa Web Albums'
@@ -26,5 +26,5 @@
}
- global $conf;
+ global $conf, $pwg_loaded_plugins;
include_once(PHPWG_ROOT_PATH . 'admin/include/functions.php');
@@ -57,18 +57,23 @@
$query->setPhotoId($params['id']);
$query->setImgMax('d');
- $photoEntry = $picasa->getPhotoFeed($query);
-
+ $photoEntry = $picasa->getPhotoEntry($query);
+
$photo = array(
- 'id' => $params['id'],
- 'url' => $photoEntry->mediaGroup->content[0]->url,
- 'title' => get_filename_wo_extension($photoEntry->mediagroup->title->text),
- 'author' => $photoEntry->mediaGroup->credit[0]->text,
- 'description' => $photoEntry->mediagroup->description->text,
- 'tags' => $photoEntry->mediagroup->keywords->text,
- 'timestamp' => substr($photoEntry->gphotoTimestamp->text, 0, -3),
+ 'id' => $params['id'],
+ 'url' => $photoEntry->getMediaGroup()->content[0]->getUrl(),
+ 'title' => get_filename_wo_extension($photoEntry->getMediaGroup()->getTitle()->getText()),
+ 'author' => $photoEntry->getMediaGroup()->credit[0]->getText(),
+ 'description' => $photoEntry->getMediaGroup()->getDescription()->getText(),
+ 'tags' => $photoEntry->getMediaGroup()->getKeywords()->getText(),
+ 'timestamp' => substr($photoEntry->getGphotoTimestamp(), 0, -3),
+ 'latlon' => null,
);
+
$photo['path'] = PICASA_WA_CACHE . 'picasa-'.$photo['id'].'.'.get_extension($photo['url']);
- file_put_contents('dump.txt', print_r($photo, true), FILE_APPEND);
+ if ($photoEntry->getGeoRssWhere() !== null && !empty($pwg_loaded_plugins['rv_gmaps']))
+ {
+ $photo['latlon'] = $photoEntry->getGeoRssWhere()->getPoint()->getPos()->getText();
+ }
// copy file
@@ -128,7 +133,16 @@
$updates = array();
if (in_array('fill_name', $params['fills'])) $updates['name'] = pwg_db_real_escape_string($photo['title']);
- if (in_array('fill_taken', $params['fills'])) $updates['date_creation'] = date('Y-m-d H:i:s', $photo['timestamp']);
+ if (in_array('fill_date', $params['fills'])) $updates['date_creation'] = date('Y-m-d H:i:s', $photo['timestamp']);
if (in_array('fill_author', $params['fills'])) $updates['author'] = pwg_db_real_escape_string($photo['author']);
if (in_array('fill_description', $params['fills'])) $updates['comment'] = pwg_db_real_escape_string($photo['description']);
+ if (in_array('fill_geotag', $params['fills']) and !empty($photo['latlon']) )
+ {
+ $latlon = explode(' ', $photo['latlon']);
+ if (count($latlon) == 2)
+ {
+ $updates['lat'] = pwg_db_real_escape_string($latlon[0]);
+ $updates['lon'] = pwg_db_real_escape_string($latlon[1]);
+ }
+ }
if (count($updates))
Index: extensions/Google2Piwigo/language/cs_CZ/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/cs_CZ/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/cs_CZ/plugin.lang.php (revision 20670)
@@ -38,3 +38,4 @@
$lang['Processing...'] = 'Zpracovávání...';
$lang['Reproduce Google albums'] = 'Vytvořit Google alba';
+$lang['Logged in as'] = 'Přihlášen jako';
?>
Index: extensions/Google2Piwigo/language/de_DE/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/de_DE/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/de_DE/plugin.lang.php (revision 20670)
@@ -37,5 +37,6 @@
$lang['Processing...'] = 'Verarbeitung...';
$lang['Reproduce Google albums'] = 'Google Album abbilden';
-$lang['Successfully logued to you Google account'] = 'Erfolgreich beim Google Konto eingeloggt ';
+$lang['Successfully logged to you Google account'] = 'Erfolgreich beim Google Konto eingeloggt ';
$lang['%d elements ready for importation'] = '%d Elemente fertig zum Import';
+$lang['Logged in as'] = 'Login als';
?>
Index: extensions/Google2Piwigo/language/el_GR/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/el_GR/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/el_GR/plugin.lang.php (revision 20670)
@@ -37,5 +37,5 @@
$lang['Processing...'] = 'Επεξεργασία ...';
$lang['Reproduce Google albums'] = 'Αναπαραγωγή λευκώματος Google ';
-$lang['Successfully logued to you Google account'] = 'Συνδεθήκατε επιτυχώς στο Google λογαριασμό σας';
+$lang['Successfully logged to you Google account'] = 'Συνδεθήκατε επιτυχώς στο Google λογαριασμό σας';
$lang['%d elements ready for importation'] = '%d στοιχεία έτοιμα για την εισαγωγή';
?>
Index: extensions/Google2Piwigo/language/en_UK/help.lang.html
===================================================================
--- extensions/Google2Piwigo/language/en_UK/help.lang.html (revision 20662)
+++ extensions/Google2Piwigo/language/en_UK/help.lang.html (revision 20670)
@@ -3,4 +3,4 @@
Write your domain name without the subdomain in the field (eg: mydomain.com, not gallery.mydomain.com) and click on Add domain.
Click on Manage [mydomain.com] and agree with the ToS.
-
Write your domain name WITH the subdomain (even if it is www) and http:// prefix in the first field and save.
+
Write your domain name WITH the subdomain (even if it is www) and the http:// prefix in the first field and save.
Index: extensions/Google2Piwigo/language/en_UK/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/en_UK/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/en_UK/plugin.lang.php (revision 20670)
@@ -1,5 +1,5 @@
Index: extensions/Google2Piwigo/language/es_ES/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/es_ES/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/es_ES/plugin.lang.php (revision 20670)
@@ -38,5 +38,6 @@
$lang['Processing...'] = 'Procesando...';
$lang['Reproduce Google albums'] = 'Reproducir álbumes de Google';
-$lang['Successfully logued to you Google account'] = 'Logueado con éxito en su cuenta de Google';
+$lang['Successfully logged to you Google account'] = 'Logueado con éxito en su cuenta de Google';
$lang['%d elements ready for importation'] = '%d elementos listos para importar';
+$lang['Logged in as'] = 'Registrado como';
?>
Index: extensions/Google2Piwigo/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/fr_FR/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/fr_FR/plugin.lang.php (revision 20670)
@@ -1,5 +1,5 @@
Index: extensions/Google2Piwigo/language/it_IT/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/it_IT/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/it_IT/plugin.lang.php (revision 20670)
@@ -37,4 +37,5 @@
$lang['Processing...'] = 'Elaborazione...';
$lang['Reproduce Google albums'] = 'Riproduci gli album Google';
-$lang['Successfully logued to you Google account'] = 'Accesso al tuo account Google riuscito';
+$lang['Successfully logged to you Google account'] = 'Accesso al tuo account Google riuscito';
+$lang['Logged in as'] = 'Iscritto come';
?>
Index: extensions/Google2Piwigo/language/lv_LV/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/lv_LV/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/lv_LV/plugin.lang.php (revision 20670)
@@ -38,4 +38,5 @@
$lang['Processing...'] = 'Apstrāde...';
$lang['Reproduce Google albums'] = 'Reproducēt Google albūmus';
-$lang['Successfully logued to you Google account'] = 'Esat veiksmīgi pieteikušies savā Google kontā';
+$lang['Successfully logged to you Google account'] = 'Esat veiksmīgi pieteikušies savā Google kontā';
+$lang['Logged in as'] = 'Pieteicies kā';
?>
Index: extensions/Google2Piwigo/language/nl_NL/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/nl_NL/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/nl_NL/plugin.lang.php (revision 20670)
@@ -38,4 +38,5 @@
$lang['Processing...'] = 'Bewerken ...';
$lang['Reproduce Google albums'] = 'Reproduceer Google albums';
-$lang['Successfully logued to you Google account'] = 'Succesvol ingelogd in Google ';
+$lang['Successfully logged to you Google account'] = 'Succesvol ingelogd in Google ';
+$lang['Logged in as'] = 'Ingelogd als';
?>
Index: extensions/Google2Piwigo/language/pl_PL/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/pl_PL/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/pl_PL/plugin.lang.php (revision 20670)
@@ -37,5 +37,6 @@
$lang['Processing...'] = 'Przetwarzanie...';
$lang['Reproduce Google albums'] = 'Odbuduj albumy Google';
-$lang['Successfully logued to you Google account'] = 'Udane logowanie do Google';
+$lang['Successfully logged to you Google account'] = 'Udane logowanie do Google';
+$lang['Logged in as'] = 'Zalogowany jako';
$lang['%d elements ready for importation'] = '%d elementów gotowych do importu';
$lang['API not authenticated'] = 'API nieuwierzytelnione';
Index: extensions/Google2Piwigo/language/pt_PT/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/pt_PT/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/pt_PT/plugin.lang.php (revision 20670)
@@ -38,5 +38,6 @@
$lang['Processing...'] = 'Processando...';
$lang['Reproduce Google albums'] = 'Reproduzir albuns Google';
-$lang['Successfully logued to you Google account'] = 'Entrou com sucesso na sua conta Google';
+$lang['Successfully logged to you Google account'] = 'Entrou com sucesso na sua conta Google';
$lang['%d elements ready for importation'] = '%d elementos prontos para a importação ';
+$lang['Logged in as'] = 'Entrou como';
?>
Index: extensions/Google2Piwigo/language/ru_RU/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/ru_RU/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/ru_RU/plugin.lang.php (revision 20670)
@@ -37,4 +37,4 @@
$lang['Processing...'] = 'Обработка ...';
$lang['Reproduce Google albums'] = 'Воспроизведение альбомов Google';
-$lang['Successfully logued to you Google account'] = 'Вы успешно вошли в свою учетную запись';
+$lang['Successfully logged to you Google account'] = 'Вы успешно вошли в свою учетную запись';
?>
Index: extensions/Google2Piwigo/language/sk_SK/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/sk_SK/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/sk_SK/plugin.lang.php (revision 20670)
@@ -38,4 +38,5 @@
$lang['Processing...'] = 'Spracovávam...';
$lang['Reproduce Google albums'] = 'Reprodukovať Google albumy';
-$lang['Successfully logued to you Google account'] = 'Úspešne prihlásený do Vášho Google konta';
+$lang['Successfully logged to you Google account'] = 'Úspešne prihlásený do Vášho Google konta';
+$lang['Logged in as'] = 'Prihlásený ako';
?>
Index: extensions/Google2Piwigo/language/tr_TR/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/tr_TR/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/tr_TR/plugin.lang.php (revision 20670)
@@ -37,4 +37,5 @@
$lang['Processing...'] = 'İşleniyor...';
$lang['Reproduce Google albums'] = 'Google albümlerini yeniden üret';
-$lang['Successfully logued to you Google account'] = 'Google \'de başarılı olarak oturum açıldı.';
+$lang['Successfully logged to you Google account'] = 'Google \'de başarılı olarak oturum açıldı.';
+$lang['Logged in as'] = 'Oturum açan:';
?>
Index: extensions/Google2Piwigo/language/uk_UA/plugin.lang.php
===================================================================
--- extensions/Google2Piwigo/language/uk_UA/plugin.lang.php (revision 20662)
+++ extensions/Google2Piwigo/language/uk_UA/plugin.lang.php (revision 20670)
@@ -24,5 +24,5 @@
$lang['Processing...'] = 'Обробка...';
$lang['Reproduce Google albums'] = 'Відтворити Google альбоми';
-$lang['Successfully logued to you Google account'] = 'Успішно увійшли до вашого облікового запису Google';
+$lang['Successfully logged to you Google account'] = 'Успішно увійшли до вашого облікового запису Google';
$lang['(%d photos)'] = '(%d зображень)';
$lang['Begin transfer'] = 'Почати передачу';