aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/photo/photo_driver.php19
-rw-r--r--view/es/messages.po8
-rw-r--r--view/es/strings.php1
-rw-r--r--view/nl/messages.po8
-rw-r--r--view/nl/strings.php1
5 files changed, 28 insertions, 9 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index bbcc110c8..96bde7587 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -593,15 +593,24 @@ function import_profile_photo($photo,$xchan,$thing = false) {
if($photo) {
$filename = basename($photo);
- $type = guess_image_type($photo);
-
- if(! $type)
- $type = 'image/jpeg';
$result = z_fetch_url($photo,true);
- if($result['success'])
+ if($result['success']) {
$img_str = $result['body'];
+ $type = guess_image_type($photo, $result['header']);
+
+ $h = explode("\n",$result['header']);
+ if($h) {
+ foreach($h as $hl) {
+ if(stristr($hl,'content-type:')) {
+ if(! stristr($hl,'image/')) {
+ $photo_failure = true;
+ }
+ }
+ }
+ }
+ }
}
$img = photo_factory($img_str, $type);
diff --git a/view/es/messages.po b/view/es/messages.po
index 6c2093830..4ed1d6c44 100644
--- a/view/es/messages.po
+++ b/view/es/messages.po
@@ -13,8 +13,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Redmatrix\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-10-17 16:47-0700\n"
-"PO-Revision-Date: 2015-10-18 15:17+0000\n"
+"POT-Creation-Date: 2015-10-23 00:04-0700\n"
+"PO-Revision-Date: 2015-10-31 19:26+0000\n"
"Last-Translator: Manuel Jiménez Friaza <mjfriaza@openmailbox.org>\n"
"Language-Team: Spanish (http://www.transifex.com/Friendica/red-matrix/language/es/)\n"
"MIME-Version: 1.0\n"
@@ -4531,6 +4531,10 @@ msgid "Location"
msgstr "Localización"
#: ../../mod/pubsites.php:26
+msgid "Project"
+msgstr "Proyecto"
+
+#: ../../mod/pubsites.php:26
msgid "View hub ratings"
msgstr "Ver las valoraciones del sitio"
diff --git a/view/es/strings.php b/view/es/strings.php
index 8b0b1758a..be750b0ff 100644
--- a/view/es/strings.php
+++ b/view/es/strings.php
@@ -1067,6 +1067,7 @@ $a->strings["Site URL"] = "Dirección del sitio";
$a->strings["Access Type"] = "Tipo de Acceso";
$a->strings["Registration Policy"] = "Normas de Registro";
$a->strings["Location"] = "Localización";
+$a->strings["Project"] = "Proyecto";
$a->strings["View hub ratings"] = "Ver las valoraciones del sitio";
$a->strings["Rate"] = "Valorar";
$a->strings["View ratings"] = "Ver valoraciones";
diff --git a/view/nl/messages.po b/view/nl/messages.po
index 0b3d7e3fd..6f55daf17 100644
--- a/view/nl/messages.po
+++ b/view/nl/messages.po
@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Redmatrix\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-10-17 16:47-0700\n"
-"PO-Revision-Date: 2015-10-18 13:28+0000\n"
+"POT-Creation-Date: 2015-10-23 00:04-0700\n"
+"PO-Revision-Date: 2015-10-26 15:27+0000\n"
"Last-Translator: jeroenpraat <jeroenpraat@xs4all.nl>\n"
"Language-Team: Dutch (http://www.transifex.com/Friendica/red-matrix/language/nl/)\n"
"MIME-Version: 1.0\n"
@@ -4527,6 +4527,10 @@ msgid "Location"
msgstr "Locatie"
#: ../../mod/pubsites.php:26
+msgid "Project"
+msgstr "Project"
+
+#: ../../mod/pubsites.php:26
msgid "View hub ratings"
msgstr "Bekijk hubbeoordelingen"
diff --git a/view/nl/strings.php b/view/nl/strings.php
index 865de908e..295164d17 100644
--- a/view/nl/strings.php
+++ b/view/nl/strings.php
@@ -1067,6 +1067,7 @@ $a->strings["Site URL"] = "URL hub";
$a->strings["Access Type"] = "Toegangstype";
$a->strings["Registration Policy"] = "Registratiebeleid";
$a->strings["Location"] = "Locatie";
+$a->strings["Project"] = "Project";
$a->strings["View hub ratings"] = "Bekijk hubbeoordelingen";
$a->strings["Rate"] = "Beoordeel";
$a->strings["View ratings"] = "Bekijk beoordelingen";