use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
+use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
break;
}
- // logger('exif: ' . print_r($exif,true));
+ // Logger::log('exif: ' . print_r($exif,true));
return $exif;
}
*/
public static function guessType($filename, $fromcurl = false, $header = '')
{
- logger('Image: guessType: '.$filename . ($fromcurl?' from curl headers':''), LOGGER_DEBUG);
+ Logger::log('Image: guessType: '.$filename . ($fromcurl?' from curl headers':''), LOGGER_DEBUG);
$type = null;
if ($fromcurl) {
$a = get_app();
}
}
}
- logger('Image: guessType: type='.$type, LOGGER_DEBUG);
+ Logger::log('Image: guessType: type='.$type, LOGGER_DEBUG);
return $type;
}
);
if (!DBA::isResult($r)) {
- logger("Can't detect user data for uid ".$uid, LOGGER_DEBUG);
+ Logger::log("Can't detect user data for uid ".$uid, LOGGER_DEBUG);
return([]);
}
/// $community_page = (($r[0]['page-flags'] == Contact::PAGE_COMMUNITY) ? true : false);
if ((strlen($imagedata) == 0) && ($url == "")) {
- logger("No image data and no url provided", LOGGER_DEBUG);
+ Logger::log("No image data and no url provided", LOGGER_DEBUG);
return([]);
} elseif (strlen($imagedata) == 0) {
- logger("Uploading picture from ".$url, LOGGER_DEBUG);
+ Logger::log("Uploading picture from ".$url, LOGGER_DEBUG);
$stamp1 = microtime(true);
$imagedata = @file_get_contents($url);
$maximagesize = Config::get('system', 'maximagesize');
if (($maximagesize) && (strlen($imagedata) > $maximagesize)) {
- logger("Image exceeds size limit of ".$maximagesize, LOGGER_DEBUG);
+ Logger::log("Image exceeds size limit of ".$maximagesize, LOGGER_DEBUG);
return([]);
}
if (!isset($data["mime"])) {
unlink($tempfile);
- logger("File is no picture", LOGGER_DEBUG);
+ Logger::log("File is no picture", LOGGER_DEBUG);
return([]);
}
if (!$Image->isValid()) {
unlink($tempfile);
- logger("Picture is no valid picture", LOGGER_DEBUG);
+ Logger::log("Picture is no valid picture", LOGGER_DEBUG);
return([]);
}
$r = Photo::store($Image, $uid, $visitor, $hash, $tempfile, L10n::t('Wall Photos'), 0, 0, $defperm);
if (!$r) {
- logger("Picture couldn't be stored", LOGGER_DEBUG);
+ Logger::log("Picture couldn't be stored", LOGGER_DEBUG);
return([]);
}