Revert "Move Objects to Model"
This commit is contained in:
parent
e437c74d0e
commit
5747cfc79c
77 changed files with 593 additions and 636 deletions
|
@ -10,8 +10,8 @@ use Friendica\Core\System;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/enotify.php';
|
||||
require_once 'include/text.php';
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/contact_selectors.php';
|
||||
require_once 'mod/contacts.php';
|
||||
|
@ -41,12 +41,12 @@ function allfriends_content(App $a) {
|
|||
$a->page['aside'] = "";
|
||||
profile_load($a, "", 0, Contact::getDetailsByURL($c[0]["url"]));
|
||||
|
||||
$total = GContact::countAllFriends(local_user(), $cid);
|
||||
$total = GlobalContact::countAllFriends(local_user(), $cid);
|
||||
|
||||
if(count($total))
|
||||
$a->set_pager_total($total);
|
||||
|
||||
$r = GContact::allFriends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']);
|
||||
$r = GlobalContact::allFriends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']);
|
||||
|
||||
if (! DBM::is_result($r)) {
|
||||
$o .= t('No friends to display.');
|
||||
|
|
|
@ -11,7 +11,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/event.php';
|
||||
require_once 'include/redir.php';
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/contact_selectors.php';
|
||||
require_once 'mod/contacts.php';
|
||||
|
@ -85,9 +85,9 @@ function common_content(App $a) {
|
|||
}
|
||||
|
||||
if ($cid) {
|
||||
$t = GContact::countCommonFriends($uid, $cid);
|
||||
$t = GlobalContact::countCommonFriends($uid, $cid);
|
||||
} else {
|
||||
$t = GContact::countCommonFriendsZcid($uid, $zcid);
|
||||
$t = GlobalContact::countCommonFriendsZcid($uid, $zcid);
|
||||
}
|
||||
|
||||
if (count($t)) {
|
||||
|
@ -99,9 +99,9 @@ function common_content(App $a) {
|
|||
|
||||
|
||||
if ($cid) {
|
||||
$r = GContact::commonFriends($uid, $cid, $a->pager['start'], $a->pager['itemspage']);
|
||||
$r = GlobalContact::commonFriends($uid, $cid, $a->pager['start'], $a->pager['itemspage']);
|
||||
} else {
|
||||
$r = GContact::commonFriendsZcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
|
||||
$r = GlobalContact::commonFriendsZcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ use Friendica\App;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/contact_selectors.php';
|
||||
require_once 'mod/proxy.php';
|
||||
|
@ -313,7 +313,7 @@ function _contact_update_profile($contact_id) {
|
|||
Contact::updateAvatar($data['photo'], local_user(), $contact_id, true);
|
||||
|
||||
// Update the entry in the gcontact table
|
||||
GContact::updateFromProbe($data["url"]);
|
||||
GlobalContact::updateFromProbe($data["url"]);
|
||||
}
|
||||
|
||||
function _contact_block($contact_id, $orig_record) {
|
||||
|
@ -887,7 +887,7 @@ function contacts_tab($a, $contact_id, $active_tab) {
|
|||
);
|
||||
|
||||
// Show this tab only if there is visible friend list
|
||||
$x = GContact::countAllFriends(local_user(), $contact_id);
|
||||
$x = GlobalContact::countAllFriends(local_user(), $contact_id);
|
||||
if ($x)
|
||||
$tabs[] = array('label'=>t('Contacts'),
|
||||
'url' => "allfriends/".$contact_id,
|
||||
|
@ -897,7 +897,7 @@ function contacts_tab($a, $contact_id, $active_tab) {
|
|||
'accesskey' => 't');
|
||||
|
||||
// Show this tab only if there is visible common friend list
|
||||
$common = GContact::countCommonFriends(local_user(), $contact_id);
|
||||
$common = GlobalContact::countCommonFriends(local_user(), $contact_id);
|
||||
if ($common)
|
||||
$tabs[] = array('label'=>t('Common Friends'),
|
||||
'url' => "common/loc/".local_user()."/".$contact_id,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/contact_selectors.php';
|
||||
require_once 'mod/contacts.php';
|
||||
|
|
|
@ -24,8 +24,8 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Contact;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
|
||||
require_once 'include/enotify.php';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
use Friendica\Protocol\DFRN;
|
||||
|
||||
require_once 'include/items.php';
|
||||
|
|
|
@ -15,8 +15,8 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/enotify.php';
|
||||
require_once 'include/group.php';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
function directory_init(App $a) {
|
||||
$a->set_pager_itemspage(60);
|
||||
|
|
|
@ -6,9 +6,9 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Contact;
|
||||
use Friendica\Protocol\PortableContact;
|
||||
|
||||
require_once 'include/contact_widgets.php';
|
||||
|
@ -82,7 +82,7 @@ function dirfind_content(App $a, $prefix = "") {
|
|||
|
||||
// Add the contact to the global contacts if it isn't already in our system
|
||||
if (($contact["cid"] == 0) && ($contact["zid"] == 0) && ($contact["gid"] == 0)) {
|
||||
GContact::update($user_data);
|
||||
GlobalContact::update($user_data);
|
||||
}
|
||||
} elseif ($local) {
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
use Friendica\Protocol\DFRN;
|
||||
|
||||
function display_init(App $a) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Object\Photo;
|
||||
|
||||
/**
|
||||
* @param App $a
|
||||
|
@ -66,7 +66,7 @@ function fbrowser_content(App $a) {
|
|||
|
||||
function _map_files1($rr){
|
||||
$a = get_app();
|
||||
$types = Image::supportedTypes();
|
||||
$types = Photo::supportedTypes();
|
||||
$ext = $types[$rr['type']];
|
||||
$filename_e = $rr['filename'];
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/follow.php';
|
||||
require_once 'include/contact_selectors.php';
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
function hovercard_init(App $a) {
|
||||
// Just for testing purposes
|
||||
|
@ -47,7 +47,7 @@ function hovercard_content() {
|
|||
}
|
||||
|
||||
// if it's the url containing https it should be converted to http
|
||||
$nurl = normalise_link(GContact::cleanContactUrl($profileurl));
|
||||
$nurl = normalise_link(GlobalContact::cleanContactUrl($profileurl));
|
||||
if($nurl) {
|
||||
// Search for contact data
|
||||
$contact = Contact::getDetailsByURL($nurl);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Object\Photo;
|
||||
|
||||
$install_wizard_pass = 1;
|
||||
|
||||
|
@ -503,7 +503,7 @@ function check_imagik(&$checks) {
|
|||
|
||||
if (class_exists('Imagick')) {
|
||||
$imagick = true;
|
||||
$supported = Image::supportedTypes();
|
||||
$supported = Photo::supportedTypes();
|
||||
if (array_key_exists('image/gif', $supported)) {
|
||||
$gif = true;
|
||||
}
|
||||
|
|
|
@ -22,9 +22,9 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Contact;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Util\Emailer;
|
||||
|
@ -743,7 +743,7 @@ function item_post(App $a) {
|
|||
$datarray['postopts'] = $postopts;
|
||||
$datarray['origin'] = $origin;
|
||||
$datarray['moderated'] = $allow_moderated;
|
||||
$datarray['gcontact-id'] = GContact::getId(array("url" => $datarray['author-link'], "network" => $datarray['network'],
|
||||
$datarray['gcontact-id'] = GlobalContact::getId(array("url" => $datarray['author-link'], "network" => $datarray['network'],
|
||||
"photo" => $datarray['author-avatar'], "name" => $datarray['author-name']));
|
||||
$datarray['object'] = $object;
|
||||
|
||||
|
@ -1244,7 +1244,7 @@ function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $n
|
|||
if (!DBM::is_result($r)) {
|
||||
$probed = Probe::uri($name);
|
||||
if ($result['network'] != NETWORK_PHANTOM) {
|
||||
GContact::update($probed);
|
||||
GlobalContact::update($probed);
|
||||
$r = q("SELECT `url`, `name`, `nick`, `network`, `alias`, `notify` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||
dbesc(normalise_link($probed["url"])));
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/text.php';
|
||||
require_once 'include/contact_widgets.php';
|
||||
|
|
|
@ -4,7 +4,7 @@ use Friendica\App;
|
|||
use Friendica\Content\Smilies;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/acl_selectors.php';
|
||||
require_once 'include/message.php';
|
||||
|
|
|
@ -9,7 +9,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/conversation.php';
|
||||
require_once 'include/group.php';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/contact_selectors.php';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Object\Photo;
|
||||
|
||||
require_once 'include/security.php';
|
||||
|
||||
|
@ -75,7 +75,7 @@ function photo_init(App $a) {
|
|||
|
||||
$uid = str_replace(array('.jpg', '.png', '.gif'), array('', '', ''), $person);
|
||||
|
||||
foreach (Image::supportedTypes() AS $m => $e) {
|
||||
foreach (Photo::supportedTypes() AS $m => $e) {
|
||||
$uid = str_replace('.'.$e, '', $uid);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ function photo_init(App $a) {
|
|||
$resolution = 0;
|
||||
$photo = str_replace(array('.jpg', '.png', '.gif'), array('', '', ''), $photo);
|
||||
|
||||
foreach (Image::supportedTypes() AS $m => $e) {
|
||||
foreach (Photo::supportedTypes() AS $m => $e) {
|
||||
$photo = str_replace('.'.$e, '', $photo);
|
||||
}
|
||||
|
||||
|
@ -167,14 +167,14 @@ function photo_init(App $a) {
|
|||
}
|
||||
|
||||
// Resize only if its not a GIF and it is supported by the library
|
||||
if (($mimetype != "image/gif") && in_array($mimetype, Image::supportedTypes())) {
|
||||
$Image = new Image($data, $mimetype);
|
||||
if ($Image->isValid()) {
|
||||
if (($mimetype != "image/gif") && in_array($mimetype, Photo::supportedTypes())) {
|
||||
$ph = new Photo($data, $mimetype);
|
||||
if ($ph->isValid()) {
|
||||
if (isset($customres) && $customres > 0 && $customres < 500) {
|
||||
$Image->scaleToSquare($customres);
|
||||
$ph->scaleImageSquare($customres);
|
||||
}
|
||||
$data = $Image->asString();
|
||||
$mimetype = $Image->getType();
|
||||
$data = $ph->imageString();
|
||||
$mimetype = $ph->getType();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,10 +8,9 @@ use Friendica\Core\System;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Object\Contact;
|
||||
use Friendica\Object\Photo;
|
||||
|
||||
require_once 'include/photos.php';
|
||||
require_once 'include/items.php';
|
||||
|
@ -137,7 +136,7 @@ function photos_post(App $a) {
|
|||
logger('mod_photos: REQUEST ' . print_r($_REQUEST,true), LOGGER_DATA);
|
||||
logger('mod_photos: FILES ' . print_r($_FILES,true), LOGGER_DATA);
|
||||
|
||||
$phototypes = Image::supportedTypes();
|
||||
$phototypes = Photo::supportedTypes();
|
||||
|
||||
$can_post = false;
|
||||
$visitor = 0;
|
||||
|
@ -425,16 +424,16 @@ function photos_post(App $a) {
|
|||
intval($page_owner_uid)
|
||||
);
|
||||
if (DBM::is_result($r)) {
|
||||
$Image = new Image($r[0]['data'], $r[0]['type']);
|
||||
if ($Image->isValid()) {
|
||||
$ph = new Photo($r[0]['data'], $r[0]['type']);
|
||||
if ($ph->isValid()) {
|
||||
$rotate_deg = ( (intval($_POST['rotate']) == 1) ? 270 : 90 );
|
||||
$Image->rotate($rotate_deg);
|
||||
$ph->rotate($rotate_deg);
|
||||
|
||||
$width = $Image->getWidth();
|
||||
$height = $Image->getHeight();
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
$x = q("UPDATE `photo` SET `data` = '%s', `height` = %d, `width` = %d WHERE `resource-id` = '%s' AND `uid` = %d AND `scale` = 0",
|
||||
dbesc($Image->asString()),
|
||||
dbesc($ph->imageString()),
|
||||
intval($height),
|
||||
intval($width),
|
||||
dbesc($resource_id),
|
||||
|
@ -442,12 +441,12 @@ function photos_post(App $a) {
|
|||
);
|
||||
|
||||
if ($width > 640 || $height > 640) {
|
||||
$Image->scaleDown(640);
|
||||
$width = $Image->getWidth();
|
||||
$height = $Image->getHeight();
|
||||
$ph->scaleImage(640);
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
$x = q("UPDATE `photo` SET `data` = '%s', `height` = %d, `width` = %d WHERE `resource-id` = '%s' AND `uid` = %d AND `scale` = 1",
|
||||
dbesc($Image->asString()),
|
||||
dbesc($ph->imageString()),
|
||||
intval($height),
|
||||
intval($width),
|
||||
dbesc($resource_id),
|
||||
|
@ -456,12 +455,12 @@ function photos_post(App $a) {
|
|||
}
|
||||
|
||||
if ($width > 320 || $height > 320) {
|
||||
$Image->scaleDown(320);
|
||||
$width = $Image->getWidth();
|
||||
$height = $Image->getHeight();
|
||||
$ph->scaleImage(320);
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
$x = q("UPDATE `photo` SET `data` = '%s', `height` = %d, `width` = %d WHERE `resource-id` = '%s' AND `uid` = %d AND `scale` = 2",
|
||||
dbesc($Image->asString()),
|
||||
dbesc($ph->imageString()),
|
||||
intval($height),
|
||||
intval($width),
|
||||
dbesc($resource_id),
|
||||
|
@ -812,7 +811,7 @@ function photos_post(App $a) {
|
|||
$type = $_FILES['userfile']['type'];
|
||||
}
|
||||
if ($type == "") {
|
||||
$type = Image::guessType($filename);
|
||||
$type = Photo::guessImageType($filename);
|
||||
}
|
||||
|
||||
logger('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes', LOGGER_DEBUG);
|
||||
|
@ -839,9 +838,9 @@ function photos_post(App $a) {
|
|||
|
||||
$imagedata = @file_get_contents($src);
|
||||
|
||||
$Image = new Image($imagedata, $type);
|
||||
$ph = new Photo($imagedata, $type);
|
||||
|
||||
if (! $Image->isValid()) {
|
||||
if (! $ph->isValid()) {
|
||||
logger('mod/photos.php: photos_post(): unable to process image' , LOGGER_DEBUG);
|
||||
notice( t('Unable to process image.') . EOL );
|
||||
@unlink($src);
|
||||
|
@ -850,7 +849,7 @@ function photos_post(App $a) {
|
|||
killme();
|
||||
}
|
||||
|
||||
$exif = $Image->orient($src);
|
||||
$exif = $ph->orient($src);
|
||||
@unlink($src);
|
||||
|
||||
$max_length = Config::get('system', 'max_image_length');
|
||||
|
@ -858,17 +857,17 @@ function photos_post(App $a) {
|
|||
$max_length = MAX_IMAGE_LENGTH;
|
||||
}
|
||||
if ($max_length > 0) {
|
||||
$Image->scaleDown($max_length);
|
||||
$ph->scaleImage($max_length);
|
||||
}
|
||||
|
||||
$width = $Image->getWidth();
|
||||
$height = $Image->getHeight();
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
$smallest = 0;
|
||||
|
||||
$photo_hash = photo_new_resource();
|
||||
|
||||
$r = Photo::store($Image, $page_owner_uid, $visitor, $photo_hash, $filename, $album, 0 , 0, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
|
||||
$r = $ph->store($page_owner_uid, $visitor, $photo_hash, $filename, $album, 0 , 0, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
|
||||
|
||||
if (! $r) {
|
||||
logger('mod/photos.php: photos_post(): image store failed' , LOGGER_DEBUG);
|
||||
|
@ -877,14 +876,14 @@ function photos_post(App $a) {
|
|||
}
|
||||
|
||||
if ($width > 640 || $height > 640) {
|
||||
$Image->scaleDown(640);
|
||||
Photo::store($Image, $page_owner_uid, $visitor, $photo_hash, $filename, $album, 1, 0, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
|
||||
$ph->scaleImage(640);
|
||||
$ph->store($page_owner_uid, $visitor, $photo_hash, $filename, $album, 1, 0, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
|
||||
$smallest = 1;
|
||||
}
|
||||
|
||||
if ($width > 320 || $height > 320) {
|
||||
$Image->scaleDown(320);
|
||||
Photo::store($Image, $page_owner_uid, $visitor, $photo_hash, $filename, $album, 2, 0, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
|
||||
$ph->scaleImage(320);
|
||||
$ph->store($page_owner_uid, $visitor, $photo_hash, $filename, $album, 2, 0, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
|
||||
$smallest = 2;
|
||||
}
|
||||
|
||||
|
@ -933,7 +932,7 @@ function photos_post(App $a) {
|
|||
$arr['origin'] = 1;
|
||||
|
||||
$arr['body'] = '[url=' . System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo_hash . ']'
|
||||
. '[img]' . System::baseUrl() . "/photo/{$photo_hash}-{$smallest}.".$Image->getExt() . '[/img]'
|
||||
. '[img]' . System::baseUrl() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/img]'
|
||||
. '[/url]';
|
||||
|
||||
$item_id = item_store($arr);
|
||||
|
@ -981,7 +980,7 @@ function photos_content(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$phototypes = Image::supportedTypes();
|
||||
$phototypes = Photo::supportedTypes();
|
||||
|
||||
$_SESSION['photo_return'] = $a->cmd;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ use Friendica\Core\Cache;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
require_once 'include/datetime.php';
|
||||
|
|
|
@ -7,8 +7,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Object\Photo;
|
||||
|
||||
function profile_photo_init(App $a) {
|
||||
|
||||
|
@ -73,27 +72,27 @@ function profile_photo_post(App $a) {
|
|||
|
||||
$base_image = $r[0];
|
||||
|
||||
$Image = new Image($base_image['data'], $base_image['type']);
|
||||
if ($Image->isValid()) {
|
||||
$Image->crop(175,$srcX,$srcY,$srcW,$srcH);
|
||||
$im = new Photo($base_image['data'], $base_image['type']);
|
||||
if ($im->isValid()) {
|
||||
$im->cropImage(175,$srcX,$srcY,$srcW,$srcH);
|
||||
|
||||
$r = Photo::store($Image, local_user(), 0, $base_image['resource-id'],$base_image['filename'], t('Profile Photos'), 4, $is_default_profile);
|
||||
$r = $im->store(local_user(), 0, $base_image['resource-id'],$base_image['filename'], t('Profile Photos'), 4, $is_default_profile);
|
||||
|
||||
if ($r === false) {
|
||||
notice ( sprintf(t('Image size reduction [%s] failed.'),"175") . EOL );
|
||||
}
|
||||
|
||||
$Image->scaleDown(80);
|
||||
$im->scaleImage(80);
|
||||
|
||||
$r = Photo::store($Image, local_user(), 0, $base_image['resource-id'],$base_image['filename'], t('Profile Photos'), 5, $is_default_profile);
|
||||
$r = $im->store(local_user(), 0, $base_image['resource-id'],$base_image['filename'], t('Profile Photos'), 5, $is_default_profile);
|
||||
|
||||
if ($r === false) {
|
||||
notice( sprintf(t('Image size reduction [%s] failed.'),"80") . EOL );
|
||||
}
|
||||
|
||||
$Image->scaleDown(48);
|
||||
$im->scaleImage(48);
|
||||
|
||||
$r = Photo::store($Image, local_user(), 0, $base_image['resource-id'],$base_image['filename'], t('Profile Photos'), 6, $is_default_profile);
|
||||
$r = $im->store(local_user(), 0, $base_image['resource-id'],$base_image['filename'], t('Profile Photos'), 6, $is_default_profile);
|
||||
|
||||
if ($r === false) {
|
||||
notice( sprintf(t('Image size reduction [%s] failed.'),"48") . EOL );
|
||||
|
@ -108,15 +107,15 @@ function profile_photo_post(App $a) {
|
|||
);
|
||||
|
||||
$r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `self` AND `uid` = %d",
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-4.' . $Image->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-5.' . $Image->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-6.' . $Image->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-6.' . $im->getExt()),
|
||||
intval(local_user())
|
||||
);
|
||||
} else {
|
||||
$r = q("update profile set photo = '%s', thumb = '%s' where id = %d and uid = %d",
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-4.' . $Image->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-5.' . $Image->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
|
||||
dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
|
||||
intval($_REQUEST['profile']),
|
||||
intval(local_user())
|
||||
);
|
||||
|
@ -152,7 +151,7 @@ function profile_photo_post(App $a) {
|
|||
$filesize = intval($_FILES['userfile']['size']);
|
||||
$filetype = $_FILES['userfile']['type'];
|
||||
if ($filetype == "") {
|
||||
$filetype = Image::guessType($filename);
|
||||
$filetype = Photo::guessImageType($filename);
|
||||
}
|
||||
|
||||
$maximagesize = Config::get('system', 'maximagesize');
|
||||
|
@ -164,7 +163,7 @@ function profile_photo_post(App $a) {
|
|||
}
|
||||
|
||||
$imagedata = @file_get_contents($src);
|
||||
$ph = new Image($imagedata, $filetype);
|
||||
$ph = new Photo($imagedata, $filetype);
|
||||
|
||||
if (! $ph->isValid()) {
|
||||
notice(t('Unable to process image.') . EOL);
|
||||
|
@ -240,7 +239,7 @@ function profile_photo_content(App $a) {
|
|||
goaway(System::baseUrl() . '/profiles');
|
||||
return; // NOTREACHED
|
||||
}
|
||||
$ph = new Image($r[0]['data'], $r[0]['type']);
|
||||
$ph = new Photo($r[0]['data'], $r[0]['type']);
|
||||
profile_photo_crop_ui_head($a, $ph);
|
||||
// go ahead as we have jus uploaded a new photo to crop
|
||||
}
|
||||
|
@ -289,22 +288,22 @@ function profile_photo_content(App $a) {
|
|||
|
||||
|
||||
if(! function_exists('profile_photo_crop_ui_head')) {
|
||||
function profile_photo_crop_ui_head(App $a, Image $Image) {
|
||||
function profile_photo_crop_ui_head(App $a, $ph) {
|
||||
$max_length = Config::get('system','max_image_length');
|
||||
if (! $max_length) {
|
||||
$max_length = MAX_IMAGE_LENGTH;
|
||||
}
|
||||
if ($max_length > 0) {
|
||||
$Image->scaleDown($max_length);
|
||||
$ph->scaleImage($max_length);
|
||||
}
|
||||
|
||||
$width = $Image->getWidth();
|
||||
$height = $Image->getHeight();
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
if ($width < 175 || $height < 175) {
|
||||
$Image->scaleUp(200);
|
||||
$width = $Image->getWidth();
|
||||
$height = $Image->getHeight();
|
||||
$ph->scaleImageUp(200);
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
}
|
||||
|
||||
$hash = photo_new_resource();
|
||||
|
@ -312,7 +311,7 @@ function profile_photo_crop_ui_head(App $a, Image $Image) {
|
|||
|
||||
$smallest = 0;
|
||||
|
||||
$r = Photo::store($Image, local_user(), 0 , $hash, $filename, t('Profile Photos'), 0 );
|
||||
$r = $ph->store(local_user(), 0 , $hash, $filename, t('Profile Photos'), 0 );
|
||||
|
||||
if ($r) {
|
||||
info( t('Image uploaded successfully.') . EOL );
|
||||
|
@ -321,8 +320,8 @@ function profile_photo_crop_ui_head(App $a, Image $Image) {
|
|||
}
|
||||
|
||||
if ($width > 640 || $height > 640) {
|
||||
$Image->scaleDown(640);
|
||||
$r = Photo::store($Image, local_user(), 0 , $hash, $filename, t('Profile Photos'), 1 );
|
||||
$ph->scaleImage(640);
|
||||
$r = $ph->store(local_user(), 0 , $hash, $filename, t('Profile Photos'), 1 );
|
||||
|
||||
if ($r === false) {
|
||||
notice( sprintf(t('Image size reduction [%s] failed.'),"640") . EOL );
|
||||
|
@ -333,7 +332,7 @@ function profile_photo_crop_ui_head(App $a, Image $Image) {
|
|||
|
||||
$a->config['imagecrop'] = $hash;
|
||||
$a->config['imagecrop_resolution'] = $smallest;
|
||||
$a->config['imagecrop_ext'] = $Image->getExt();
|
||||
$a->config['imagecrop_ext'] = $ph->getExt();
|
||||
$a->page['htmlhead'] .= replace_macros(get_markup_template("crophead.tpl"), array());
|
||||
$a->page['end'] .= replace_macros(get_markup_template("cropend.tpl"), array());
|
||||
return;
|
||||
|
|
|
@ -9,9 +9,9 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Profile;
|
||||
|
||||
function profiles_init(App $a) {
|
||||
|
||||
|
@ -509,7 +509,7 @@ function profiles_post(App $a) {
|
|||
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
|
||||
|
||||
// Update the global contact for the user
|
||||
GContact::updateForUser(local_user());
|
||||
GlobalContact::updateForUser(local_user());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Object\Photo;
|
||||
|
||||
define('PROXY_DEFAULT_TIME', 86400); // 1 Day
|
||||
|
||||
|
@ -131,9 +130,9 @@ function proxy_init(App $a) {
|
|||
|
||||
// reduce quality - if it isn't a GIF
|
||||
if ($mime != 'image/gif') {
|
||||
$Image = new Image($img_str, $mime);
|
||||
if ($Image->isValid()) {
|
||||
$img_str = $Image->asString();
|
||||
$img = new Photo($img_str, $mime);
|
||||
if ($img->isValid()) {
|
||||
$img_str = $img->imageString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,10 +174,10 @@ function proxy_init(App $a) {
|
|||
$mime = 'image/png';
|
||||
$cachefile = ''; // Clear the cachefile so that the dummy isn't stored
|
||||
$valid = false;
|
||||
$Image = new Image($img_str, 'image/png');
|
||||
if ($Image->isValid()) {
|
||||
$Image->scaleDown(10);
|
||||
$img_str = $Image->asString();
|
||||
$img = new Photo($img_str, 'image/png');
|
||||
if ($img->isValid()) {
|
||||
$img->scaleImage(10);
|
||||
$img_str = $img->imageString();
|
||||
}
|
||||
} elseif ($mime != 'image/jpeg' && !$direct_cache && $cachefile == '') {
|
||||
$image = @imagecreatefromstring($img_str);
|
||||
|
@ -193,9 +192,9 @@ function proxy_init(App $a) {
|
|||
'allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '', 'desc' => $mime);
|
||||
dba::insert('photo', $fields);
|
||||
} else {
|
||||
$Image = new Image($img_str, $mime);
|
||||
if ($Image->isValid() && !$direct_cache && ($cachefile == '')) {
|
||||
Photo::store($Image, 0, 0, $urlhash, $_REQUEST['url'], '', 100);
|
||||
$img = new Photo($img_str, $mime);
|
||||
if ($img->isValid() && !$direct_cache && ($cachefile == '')) {
|
||||
$img->store(0, 0, $urlhash, $_REQUEST['url'], '', 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -204,10 +203,10 @@ function proxy_init(App $a) {
|
|||
|
||||
// reduce quality - if it isn't a GIF
|
||||
if ($mime != 'image/gif') {
|
||||
$Image = new Image($img_str, $mime);
|
||||
if ($Image->isValid()) {
|
||||
$Image->scaleDown($size);
|
||||
$img_str = $Image->asString();
|
||||
$img = new Photo($img_str, $mime);
|
||||
if ($img->isValid()) {
|
||||
$img->scaleImage($size);
|
||||
$img_str = $img->imageString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
|
||||
function randprof_init(App $a) {
|
||||
$x = GContact::getRandomUrl();
|
||||
$x = GlobalContact::getRandomUrl();
|
||||
|
||||
if ($x) {
|
||||
goaway(zrl($x));
|
||||
|
|
|
@ -9,7 +9,7 @@ use Friendica\Core\Worker;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Protocol\Email;
|
||||
|
||||
|
@ -650,7 +650,7 @@ function settings_post(App $a) {
|
|||
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
|
||||
|
||||
// Update the global contact for the user
|
||||
GContact::updateForUser(local_user());
|
||||
GlobalContact::updateForUser(local_user());
|
||||
|
||||
//$_SESSION['theme'] = $theme;
|
||||
if ($email_changed && $a->config['register_policy'] == REGISTER_VERIFY) {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/contact_widgets.php';
|
||||
|
||||
|
@ -69,7 +69,7 @@ function suggest_content(App $a) {
|
|||
$a->page['aside'] .= follow_widget();
|
||||
|
||||
|
||||
$r = GContact::suggestionQuery(local_user());
|
||||
$r = GlobalContact::suggestionQuery(local_user());
|
||||
|
||||
if (! DBM::is_result($r)) {
|
||||
$o .= t('No suggestions available. If this is a new site, please try again in 24 hours.');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once 'include/follow.php';
|
||||
require_once 'include/contact_selectors.php';
|
||||
|
|
|
@ -5,7 +5,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once('include/items.php');
|
||||
require_once('include/acl_selectors.php');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Object\Contact;
|
||||
|
||||
require_once('include/contact_selectors.php');
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@ use Friendica\App;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Object\Photo;
|
||||
|
||||
function wall_upload_post(App $a, $desktopmode = true) {
|
||||
|
||||
|
@ -162,8 +161,8 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
$filetype = "";
|
||||
}
|
||||
|
||||
if ($filetype == "") {
|
||||
$filetype = Image::guessType($filename);
|
||||
if ($filetype=="") {
|
||||
$filetype=Photo::guessImageType($filename);
|
||||
}
|
||||
|
||||
// If there is a temp name, then do a manual check
|
||||
|
@ -191,9 +190,9 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
}
|
||||
|
||||
$imagedata = @file_get_contents($src);
|
||||
$Image = new Image($imagedata, $filetype);
|
||||
$ph = new Photo($imagedata, $filetype);
|
||||
|
||||
if (! $Image->isValid()) {
|
||||
if (! $ph->isValid()) {
|
||||
$msg = t('Unable to process image.');
|
||||
if ($r_json) {
|
||||
echo json_encode(array('error'=>$msg));
|
||||
|
@ -204,7 +203,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
killme();
|
||||
}
|
||||
|
||||
$Image->orient($src);
|
||||
$ph->orient($src);
|
||||
@unlink($src);
|
||||
|
||||
$max_length = Config::get('system', 'max_image_length');
|
||||
|
@ -212,12 +211,12 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
$max_length = MAX_IMAGE_LENGTH;
|
||||
}
|
||||
if ($max_length > 0) {
|
||||
$Image->scaleDown($max_length);
|
||||
$ph->scaleImage($max_length);
|
||||
logger("File upload: Scaling picture to new size " . $max_length, LOGGER_DEBUG);
|
||||
}
|
||||
|
||||
$width = $Image->getWidth();
|
||||
$height = $Image->getHeight();
|
||||
$width = $ph->getWidth();
|
||||
$height = $ph->getHeight();
|
||||
|
||||
$hash = photo_new_resource();
|
||||
|
||||
|
@ -230,7 +229,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
|
||||
$defperm = '<' . $default_cid . '>';
|
||||
|
||||
$r = Photo::store($Image, $page_owner_uid, $visitor, $hash, $filename, $album, 0, 0, $defperm);
|
||||
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, $album, 0, 0, $defperm);
|
||||
|
||||
if (! $r) {
|
||||
$msg = t('Image upload failed.');
|
||||
|
@ -243,16 +242,16 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
}
|
||||
|
||||
if ($width > 640 || $height > 640) {
|
||||
$Image->scaleDown(640);
|
||||
$r = Photo::store($Image, $page_owner_uid, $visitor, $hash, $filename, $album, 1, 0, $defperm);
|
||||
$ph->scaleImage(640);
|
||||
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, $album, 1, 0, $defperm);
|
||||
if ($r) {
|
||||
$smallest = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($width > 320 || $height > 320) {
|
||||
$Image->scaleDown(320);
|
||||
$r = Photo::store($Image, $page_owner_uid, $visitor, $hash, $filename, $album, 2, 0, $defperm);
|
||||
$ph->scaleImage(320);
|
||||
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, $album, 2, 0, $defperm);
|
||||
if ($r && ($smallest == 0)) {
|
||||
$smallest = 2;
|
||||
}
|
||||
|
@ -281,8 +280,8 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
$picture["height"] = $r[0]["height"];
|
||||
$picture["type"] = $r[0]["type"];
|
||||
$picture["albumpage"] = System::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $hash;
|
||||
$picture["picture"] = System::baseUrl() . "/photo/{$hash}-0." . $Image->getExt();
|
||||
$picture["preview"] = System::baseUrl() . "/photo/{$hash}-{$smallest}." . $Image->getExt();
|
||||
$picture["picture"] = System::baseUrl() . "/photo/{$hash}-0." . $ph->getExt();
|
||||
$picture["preview"] = System::baseUrl() . "/photo/{$hash}-{$smallest}." . $ph->getExt();
|
||||
|
||||
if ($r_json) {
|
||||
echo json_encode(array('picture'=>$picture));
|
||||
|
@ -300,9 +299,9 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
|||
/* mod Waitman Gobble NO WARRANTY */
|
||||
// if we get the signal then return the image url info in BBCODE
|
||||
if ($_REQUEST['hush']!='yeah') {
|
||||
echo "\n\n" . '[url=' . System::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . System::baseUrl() . "/photo/{$hash}-{$smallest}.".$Image->getExt()."[/img][/url]\n\n";
|
||||
echo "\n\n" . '[url=' . System::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . System::baseUrl() . "/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]\n\n";
|
||||
} else {
|
||||
$m = '[url='.System::baseUrl().'/photos/'.$page_owner_nick.'/image/'.$hash.'][img]'.System::baseUrl()."/photo/{$hash}-{$smallest}.".$Image->getExt()."[/img][/url]";
|
||||
$m = '[url='.System::baseUrl().'/photos/'.$page_owner_nick.'/image/'.$hash.'][img]'.System::baseUrl()."/photo/{$hash}-{$smallest}.".$ph->getExt()."[/img][/url]";
|
||||
return($m);
|
||||
}
|
||||
/* mod Waitman Gobble NO WARRANTY */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue