Merge remote-tracking branch 'upstream/dev' into dev
|
@ -34,7 +34,7 @@ class Cron_daily {
|
||||||
|
|
||||||
// expire any read notifications over a month old
|
// expire any read notifications over a month old
|
||||||
|
|
||||||
q("delete from notify where seen = 1 and date < %s - INTERVAL %s",
|
q("delete from notify where seen = 1 and created < %s - INTERVAL %s",
|
||||||
db_utcnow(), db_quoteinterval('30 DAY')
|
db_utcnow(), db_quoteinterval('30 DAY')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@ require_once('include/channel.php');
|
||||||
|
|
||||||
class Apps {
|
class Apps {
|
||||||
|
|
||||||
|
static public $installed_system_apps = null;
|
||||||
|
|
||||||
static public function get_system_apps($translate = true) {
|
static public function get_system_apps($translate = true) {
|
||||||
|
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
@ -49,22 +51,62 @@ class Apps {
|
||||||
static public function import_system_apps() {
|
static public function import_system_apps() {
|
||||||
if(! local_channel())
|
if(! local_channel())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Eventually we want to look at modification dates and update system apps.
|
|
||||||
|
|
||||||
$installed = get_pconfig(local_channel(),'system','apps_installed');
|
|
||||||
if($installed)
|
|
||||||
return;
|
|
||||||
$apps = self::get_system_apps(false);
|
$apps = self::get_system_apps(false);
|
||||||
|
|
||||||
|
|
||||||
|
self::$installed_system_apps = q("select * from app where app_system = 1 and app_channel = %d",
|
||||||
|
intval(local_channel())
|
||||||
|
);
|
||||||
|
|
||||||
if($apps) {
|
if($apps) {
|
||||||
foreach($apps as $app) {
|
foreach($apps as $app) {
|
||||||
|
$id = self::check_install_system_app($app);
|
||||||
|
// $id will be boolean true or false to install an app, or an integer id to update an existing app
|
||||||
|
if($id === false)
|
||||||
|
continue;
|
||||||
|
if($id !== true) {
|
||||||
|
// if we already installed this app, but it changed, preserve any categories we created
|
||||||
|
$s = '';
|
||||||
|
$r = q("select * from term where otype = %d and oid = d",
|
||||||
|
intval(TERM_OBJ_APP),
|
||||||
|
intval($id)
|
||||||
|
);
|
||||||
|
if($r) {
|
||||||
|
foreach($r as $t) {
|
||||||
|
if($s)
|
||||||
|
$s .= ',';
|
||||||
|
$s .= $t['term'];
|
||||||
|
}
|
||||||
|
$app['categories'] = $s;
|
||||||
|
}
|
||||||
|
}
|
||||||
$app['uid'] = local_channel();
|
$app['uid'] = local_channel();
|
||||||
$app['guid'] = hash('whirlpool',$app['name']);
|
$app['guid'] = hash('whirlpool',$app['name']);
|
||||||
$app['system'] = 1;
|
$app['system'] = 1;
|
||||||
self::app_install(local_channel(),$app);
|
self::app_install(local_channel(),$app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set_pconfig(local_channel(),'system','apps_installed',1);
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Install the system app if no system apps have been installed, or if a new system app
|
||||||
|
* is discovered, or if the version of a system app changes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static public function check_install_system_app($app) {
|
||||||
|
if((! is_array(self::$installed_system_apps)) || (! count(self::$installed_system_apps))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$notfound = true;
|
||||||
|
foreach(self::$installed_system_apps as $iapp) {
|
||||||
|
if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
|
||||||
|
$notfound = false;
|
||||||
|
if($iapp['app_version'] != $app['version']) {
|
||||||
|
return intval($iapp['app_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $notfound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,6 +153,10 @@ class Apps {
|
||||||
if(array_key_exists('target',$ret))
|
if(array_key_exists('target',$ret))
|
||||||
$ret['target'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['target']);
|
$ret['target'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['target']);
|
||||||
|
|
||||||
|
if(array_key_exists('version',$ret))
|
||||||
|
$ret['version'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['version']);
|
||||||
|
|
||||||
|
|
||||||
if(array_key_exists('requires',$ret)) {
|
if(array_key_exists('requires',$ret)) {
|
||||||
$requires = explode(',',$ret['requires']);
|
$requires = explode(',',$ret['requires']);
|
||||||
foreach($requires as $require) {
|
foreach($requires as $require) {
|
||||||
|
|
|
@ -348,7 +348,7 @@ class Enotify {
|
||||||
$hash = random_string();
|
$hash = random_string();
|
||||||
$r = q("SELECT `id` FROM `notify` WHERE `hash` = '%s' LIMIT 1",
|
$r = q("SELECT `id` FROM `notify` WHERE `hash` = '%s' LIMIT 1",
|
||||||
dbesc($hash));
|
dbesc($hash));
|
||||||
if (count($r))
|
if ($r)
|
||||||
$dups = true;
|
$dups = true;
|
||||||
} while ($dups === true);
|
} while ($dups === true);
|
||||||
|
|
||||||
|
@ -356,16 +356,16 @@ class Enotify {
|
||||||
$datarray = array();
|
$datarray = array();
|
||||||
$datarray['hash'] = $hash;
|
$datarray['hash'] = $hash;
|
||||||
$datarray['sender_hash'] = $sender['xchan_hash'];
|
$datarray['sender_hash'] = $sender['xchan_hash'];
|
||||||
$datarray['name'] = $sender['xchan_name'];
|
$datarray['xname'] = $sender['xchan_name'];
|
||||||
$datarray['url'] = $sender['xchan_url'];
|
$datarray['url'] = $sender['xchan_url'];
|
||||||
$datarray['photo'] = $sender['xchan_photo_s'];
|
$datarray['photo'] = $sender['xchan_photo_s'];
|
||||||
$datarray['date'] = datetime_convert();
|
$datarray['created'] = datetime_convert();
|
||||||
$datarray['aid'] = $recip['channel_account_id'];
|
$datarray['aid'] = $recip['channel_account_id'];
|
||||||
$datarray['uid'] = $recip['channel_id'];
|
$datarray['uid'] = $recip['channel_id'];
|
||||||
$datarray['link'] = $itemlink;
|
$datarray['link'] = $itemlink;
|
||||||
$datarray['parent'] = $parent_mid;
|
$datarray['parent'] = $parent_mid;
|
||||||
$datarray['parent_item'] = $parent_item;
|
$datarray['parent_item'] = $parent_item;
|
||||||
$datarray['type'] = $params['type'];
|
$datarray['ntype'] = $params['type'];
|
||||||
$datarray['verb'] = $params['verb'];
|
$datarray['verb'] = $params['verb'];
|
||||||
$datarray['otype'] = $params['otype'];
|
$datarray['otype'] = $params['otype'];
|
||||||
$datarray['abort'] = false;
|
$datarray['abort'] = false;
|
||||||
|
@ -394,19 +394,19 @@ class Enotify {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("insert into notify (hash,name,url,photo,date,aid,uid,link,parent,seen,type,verb,otype)
|
$r = q("insert into notify (hash,xname,url,photo,created,aid,uid,link,parent,seen,ntype,verb,otype)
|
||||||
values('%s','%s','%s','%s','%s',%d,%d,'%s','%s',%d,%d,'%s','%s')",
|
values('%s','%s','%s','%s','%s',%d,%d,'%s','%s',%d,%d,'%s','%s')",
|
||||||
dbesc($datarray['hash']),
|
dbesc($datarray['hash']),
|
||||||
dbesc($datarray['name']),
|
dbesc($datarray['xname']),
|
||||||
dbesc($datarray['url']),
|
dbesc($datarray['url']),
|
||||||
dbesc($datarray['photo']),
|
dbesc($datarray['photo']),
|
||||||
dbesc($datarray['date']),
|
dbesc($datarray['created']),
|
||||||
intval($datarray['aid']),
|
intval($datarray['aid']),
|
||||||
intval($datarray['uid']),
|
intval($datarray['uid']),
|
||||||
dbesc($datarray['link']),
|
dbesc($datarray['link']),
|
||||||
dbesc($datarray['parent']),
|
dbesc($datarray['parent']),
|
||||||
intval($seen),
|
intval($seen),
|
||||||
intval($datarray['type']),
|
intval($datarray['ntype']),
|
||||||
dbesc($datarray['verb']),
|
dbesc($datarray['verb']),
|
||||||
dbesc($datarray['otype'])
|
dbesc($datarray['otype'])
|
||||||
);
|
);
|
||||||
|
|
|
@ -14,6 +14,8 @@ class ThreadItem {
|
||||||
private $template = 'conv_item.tpl';
|
private $template = 'conv_item.tpl';
|
||||||
private $comment_box_template = 'comment_item.tpl';
|
private $comment_box_template = 'comment_item.tpl';
|
||||||
private $commentable = false;
|
private $commentable = false;
|
||||||
|
// list of supported reaction emojis - a site can over-ride this via config system.reactions
|
||||||
|
private $reactions = ['1f60a','1f44f','1f37e','1f48b','1f61e','2665','1f622','1f62e','1f634','1f61c','1f607','1f608'];
|
||||||
private $toplevel = false;
|
private $toplevel = false;
|
||||||
private $children = array();
|
private $children = array();
|
||||||
private $parent = null;
|
private $parent = null;
|
||||||
|
@ -50,6 +52,14 @@ class ThreadItem {
|
||||||
$this->add_child($child);
|
$this->add_child($child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// allow a site to configure the order and content of the reaction emoji list
|
||||||
|
if($this->toplevel) {
|
||||||
|
$x = get_config('system','reactions');
|
||||||
|
if($x && is_array($x) && count($x)) {
|
||||||
|
$this->reactions = $x;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -345,8 +355,9 @@ class ThreadItem {
|
||||||
'photo' => $body['photo'],
|
'photo' => $body['photo'],
|
||||||
'event' => $body['event'],
|
'event' => $body['event'],
|
||||||
'has_tags' => $has_tags,
|
'has_tags' => $has_tags,
|
||||||
|
'reactions' => $this->reactions,
|
||||||
// Item toolbar buttons
|
// Item toolbar buttons
|
||||||
|
'emojis' => (($this->is_toplevel() && $this->is_commentable() && feature_enabled($conv->get_profile_owner(),'emojis')) ? '1' : ''),
|
||||||
'like' => $like,
|
'like' => $like,
|
||||||
'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike : ''),
|
'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike : ''),
|
||||||
'share' => $share,
|
'share' => $share,
|
||||||
|
|
|
@ -1547,8 +1547,8 @@ class Admin extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
// Toggle theme status
|
// Toggle theme status
|
||||||
|
|
||||||
toggle_theme($themes, $theme, $result);
|
$this->toggle_theme($themes, $theme, $result);
|
||||||
$s = rebuild_theme_table($themes);
|
$s = $this->rebuild_theme_table($themes);
|
||||||
if($result)
|
if($result)
|
||||||
info( sprintf('Theme %s enabled.', $theme));
|
info( sprintf('Theme %s enabled.', $theme));
|
||||||
else
|
else
|
||||||
|
@ -1561,7 +1561,7 @@ class Admin extends \Zotlabs\Web\Controller {
|
||||||
// display theme details
|
// display theme details
|
||||||
require_once('library/markdown.php');
|
require_once('library/markdown.php');
|
||||||
|
|
||||||
if (theme_status($themes,$theme)) {
|
if ($this->theme_status($themes,$theme)) {
|
||||||
$status="on"; $action= t("Disable");
|
$status="on"; $action= t("Disable");
|
||||||
} else {
|
} else {
|
||||||
$status="off"; $action= t("Enable");
|
$status="off"; $action= t("Enable");
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Attach extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"');
|
header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"');
|
||||||
if(intval($r['data']['os_storage'])) {
|
if(intval($r['data']['os_storage'])) {
|
||||||
$fname = dbunescbin($r['data']['data']);
|
$fname = dbunescbin($r['data']['content']);
|
||||||
if(strpos($fname,'store') !== false)
|
if(strpos($fname,'store') !== false)
|
||||||
$istream = fopen($fname,'rb');
|
$istream = fopen($fname,'rb');
|
||||||
else
|
else
|
||||||
|
@ -53,7 +53,7 @@ class Attach extends \Zotlabs\Web\Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
echo dbunescbin($r['data']['data']);
|
echo dbunescbin($r['data']['content']);
|
||||||
killme();
|
killme();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||||
$mode = 'view';
|
$mode = 'view';
|
||||||
$y = 0;
|
$y = 0;
|
||||||
$m = 0;
|
$m = 0;
|
||||||
$ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : '');
|
$ignored = ((x($_REQUEST,'ignored')) ? " and dismissed = " . intval($_REQUEST['ignored']) . " " : '');
|
||||||
|
|
||||||
// logger('args: ' . print_r(\App::$argv,true));
|
// logger('args: ' . print_r(\App::$argv,true));
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||||
$ftext = datetime_convert('UTC',$tz,$fdt);
|
$ftext = datetime_convert('UTC',$tz,$fdt);
|
||||||
$ftext = substr($ftext,0,14) . "00:00";
|
$ftext = substr($ftext,0,14) . "00:00";
|
||||||
|
|
||||||
$type = ((x($orig_event)) ? $orig_event['type'] : 'event');
|
$type = ((x($orig_event)) ? $orig_event['etype'] : 'event');
|
||||||
|
|
||||||
$f = get_config('system','event_input_format');
|
$f = get_config('system','event_input_format');
|
||||||
if(! $f)
|
if(! $f)
|
||||||
|
@ -157,7 +157,7 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$show_bd = perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_contacts');
|
$show_bd = perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_contacts');
|
||||||
if(! $show_bd) {
|
if(! $show_bd) {
|
||||||
$sql_extra .= " and event.type != 'birthday' ";
|
$sql_extra .= " and event.etype != 'birthday' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -225,8 +225,8 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||||
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
|
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
|
||||||
from event left join item on event_hash = resource_id
|
from event left join item on event_hash = resource_id
|
||||||
where resource_type = 'event' and event.uid = %d $ignored
|
where resource_type = 'event' and event.uid = %d $ignored
|
||||||
AND (( adjust = 0 AND ( finish >= '%s' or nofinish = 1 ) AND start <= '%s' )
|
AND (( adjust = 0 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )
|
||||||
OR ( adjust = 1 AND ( finish >= '%s' or nofinish = 1 ) AND start <= '%s' )) $sql_extra ",
|
OR ( adjust = 1 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )) $sql_extra ",
|
||||||
intval($channel['channel_id']),
|
intval($channel['channel_id']),
|
||||||
dbesc($start),
|
dbesc($start),
|
||||||
dbesc($finish),
|
dbesc($finish),
|
||||||
|
@ -247,7 +247,7 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
|
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
|
||||||
if(! x($links,$j))
|
if(! x($links,$j))
|
||||||
$links[$j] = z_root() . '/' . \App::$cmd . '#link-' . $j;
|
$links[$j] = z_root() . '/' . \App::$cmd . '#link-' . $j;
|
||||||
}
|
}
|
||||||
|
@ -262,15 +262,15 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
|
|
||||||
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
|
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
|
||||||
$d = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], $fmt) : datetime_convert('UTC','UTC',$rr['start'],$fmt));
|
$d = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], $fmt) : datetime_convert('UTC','UTC',$rr['dtstart'],$fmt));
|
||||||
$d = day_translate($d);
|
$d = day_translate($d);
|
||||||
|
|
||||||
$start = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'c') : datetime_convert('UTC','UTC',$rr['start'],'c'));
|
$start = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'c') : datetime_convert('UTC','UTC',$rr['dtstart'],'c'));
|
||||||
if ($rr['nofinish']){
|
if ($rr['nofinish']){
|
||||||
$end = null;
|
$end = null;
|
||||||
} else {
|
} else {
|
||||||
$end = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['finish'], 'c') : datetime_convert('UTC','UTC',$rr['finish'],'c'));
|
$end = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtend'], 'c') : datetime_convert('UTC','UTC',$rr['dtend'],'c'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ class Connedit extends \Zotlabs\Web\Controller {
|
||||||
array('rel' => 'photo', 'type' => \App::$poi['xchan_photo_mimetype'], 'href' => \App::$poi['xchan_photo_l'])
|
array('rel' => 'photo', 'type' => \App::$poi['xchan_photo_mimetype'], 'href' => \App::$poi['xchan_photo_l'])
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$xarr['object'] = json_encode($obj);
|
$xarr['obj'] = json_encode($obj);
|
||||||
$xarr['obj_type'] = ACTIVITY_OBJ_PERSON;
|
$xarr['obj_type'] = ACTIVITY_OBJ_PERSON;
|
||||||
|
|
||||||
$xarr['body'] = '[zrl=' . $channel['xchan_url'] . ']' . $channel['xchan_name'] . '[/zrl]' . ' ' . t('is now connected to') . ' ' . '[zrl=' . \App::$poi['xchan_url'] . ']' . \App::$poi['xchan_name'] . '[/zrl]';
|
$xarr['body'] = '[zrl=' . $channel['xchan_url'] . ']' . $channel['xchan_name'] . '[/zrl]' . ' ' . t('is now connected to') . ' ' . '[zrl=' . \App::$poi['xchan_url'] . ']' . \App::$poi['xchan_name'] . '[/zrl]';
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
$profile = $r[0];
|
$profile = $r[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT * FROM photo WHERE resource_id = '%s' AND uid = %d AND scale = 0 LIMIT 1",
|
$r = q("SELECT * FROM photo WHERE resource_id = '%s' AND uid = %d AND imgscale = 0 LIMIT 1",
|
||||||
dbesc($image_id),
|
dbesc($image_id),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
@ -88,9 +88,9 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
if($r) {
|
if($r) {
|
||||||
|
|
||||||
$base_image = $r[0];
|
$base_image = $r[0];
|
||||||
$base_image['data'] = (($r[0]['os_storage']) ? @file_get_contents($base_image['data']) : dbunescbin($base_image['data']));
|
$base_image['content'] = (($r[0]['os_storage']) ? @file_get_contents($base_image['content']) : dbunescbin($base_image['content']));
|
||||||
|
|
||||||
$im = photo_factory($base_image['data'], $base_image['type']);
|
$im = photo_factory($base_image['content'], $base_image['mimetype']);
|
||||||
if($im->is_valid()) {
|
if($im->is_valid()) {
|
||||||
|
|
||||||
// We are scaling and cropping the relative pixel locations to the original photo instead of the
|
// We are scaling and cropping the relative pixel locations to the original photo instead of the
|
||||||
|
@ -99,7 +99,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
// First load the scaled photo to check its size. (Should probably pass this in the post form and save
|
// First load the scaled photo to check its size. (Should probably pass this in the post form and save
|
||||||
// a query.)
|
// a query.)
|
||||||
|
|
||||||
$g = q("select width, height from photo where resource_id = '%s' and uid = %d and scale = 3",
|
$g = q("select width, height from photo where resource_id = '%s' and uid = %d and imgscale = 3",
|
||||||
dbesc($image_id),
|
dbesc($image_id),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
@ -133,26 +133,26 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
$p = array('aid' => $aid, 'uid' => local_channel(), 'resource_id' => $base_image['resource_id'],
|
$p = array('aid' => $aid, 'uid' => local_channel(), 'resource_id' => $base_image['resource_id'],
|
||||||
'filename' => $base_image['filename'], 'album' => t('Cover Photos'));
|
'filename' => $base_image['filename'], 'album' => t('Cover Photos'));
|
||||||
|
|
||||||
$p['scale'] = 7;
|
$p['imgscale'] = 7;
|
||||||
$p['photo_usage'] = PHOTO_COVER;
|
$p['photo_usage'] = PHOTO_COVER;
|
||||||
|
|
||||||
$r1 = $im->save($p);
|
$r1 = $im->save($p);
|
||||||
|
|
||||||
$im->doScaleImage(850,310);
|
$im->doScaleImage(850,310);
|
||||||
$p['scale'] = 8;
|
$p['imgscale'] = 8;
|
||||||
|
|
||||||
$r2 = $im->save($p);
|
$r2 = $im->save($p);
|
||||||
|
|
||||||
|
|
||||||
$im->doScaleImage(425,160);
|
$im->doScaleImage(425,160);
|
||||||
$p['scale'] = 9;
|
$p['imgscale'] = 9;
|
||||||
|
|
||||||
$r3 = $im->save($p);
|
$r3 = $im->save($p);
|
||||||
|
|
||||||
if($r1 === false || $r2 === false || $r3 === false) {
|
if($r1 === false || $r2 === false || $r3 === false) {
|
||||||
// if one failed, delete them all so we can start over.
|
// if one failed, delete them all so we can start over.
|
||||||
notice( t('Image resize failed.') . EOL );
|
notice( t('Image resize failed.') . EOL );
|
||||||
$x = q("delete from photo where resource_id = '%s' and uid = %d and scale >= 7 ",
|
$x = q("delete from photo where resource_id = '%s' and uid = %d and imgscale >= 7 ",
|
||||||
dbesc($base_image['resource_id']),
|
dbesc($base_image['resource_id']),
|
||||||
local_channel()
|
local_channel()
|
||||||
);
|
);
|
||||||
|
@ -183,7 +183,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
logger('attach_store: ' . print_r($res,true));
|
logger('attach_store: ' . print_r($res,true));
|
||||||
|
|
||||||
if($res && intval($res['data']['is_photo'])) {
|
if($res && intval($res['data']['is_photo'])) {
|
||||||
$i = q("select * from photo where resource_id = '%s' and uid = %d and scale = 0",
|
$i = q("select * from photo where resource_id = '%s' and uid = %d and imgscale = 0",
|
||||||
dbesc($hash),
|
dbesc($hash),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
@ -195,10 +195,10 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
$os_storage = false;
|
$os_storage = false;
|
||||||
|
|
||||||
foreach($i as $ii) {
|
foreach($i as $ii) {
|
||||||
$smallest = intval($ii['scale']);
|
$smallest = intval($ii['imgscale']);
|
||||||
$os_storage = intval($ii['os_storage']);
|
$os_storage = intval($ii['os_storage']);
|
||||||
$imagedata = $ii['data'];
|
$imagedata = $ii['content'];
|
||||||
$filetype = $ii['type'];
|
$filetype = $ii['mimetype'];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,10 +224,10 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
$arr['obj_type'] = ACTIVITY_OBJ_PHOTO;
|
$arr['obj_type'] = ACTIVITY_OBJ_PHOTO;
|
||||||
$arr['verb'] = ACTIVITY_UPDATE;
|
$arr['verb'] = ACTIVITY_UPDATE;
|
||||||
|
|
||||||
$arr['object'] = json_encode(array(
|
$arr['obj'] = json_encode(array(
|
||||||
'type' => $arr['obj_type'],
|
'type' => $arr['obj_type'],
|
||||||
'id' => z_root() . '/photo/' . $photo['resource_id'] . '-7',
|
'id' => z_root() . '/photo/' . $photo['resource_id'] . '-7',
|
||||||
'link' => array('rel' => 'photo', 'type' => $photo['type'], 'href' => z_root() . '/photo/' . $photo['resource_id'] . '-7')
|
'link' => array('rel' => 'photo', 'type' => $photo['mimetype'], 'href' => z_root() . '/photo/' . $photo['resource_id'] . '-7')
|
||||||
));
|
));
|
||||||
|
|
||||||
if($profile && stripos($profile['gender'],t('female')) !== false)
|
if($profile && stripos($profile['gender'],t('female')) !== false)
|
||||||
|
@ -295,7 +295,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$resource_id = argv(2);
|
$resource_id = argv(2);
|
||||||
|
|
||||||
$r = q("SELECT id, album, scale FROM photo WHERE uid = %d AND resource_id = '%s' ORDER BY scale ASC",
|
$r = q("SELECT id, album, imgscale FROM photo WHERE uid = %d AND resource_id = '%s' ORDER BY imgscale ASC",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
dbesc($resource_id)
|
dbesc($resource_id)
|
||||||
);
|
);
|
||||||
|
@ -305,11 +305,11 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
}
|
}
|
||||||
$havescale = false;
|
$havescale = false;
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
if($rr['scale'] == 7)
|
if($rr['imgscale'] == 7)
|
||||||
$havescale = true;
|
$havescale = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT `data`, `type`, resource_id, os_storage FROM photo WHERE id = %d and uid = %d limit 1",
|
$r = q("SELECT `content`, `mimetype`, resource_id, os_storage FROM photo WHERE id = %d and uid = %d limit 1",
|
||||||
intval($r[0]['id']),
|
intval($r[0]['id']),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
|
|
||||||
|
@ -320,15 +320,15 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(intval($r[0]['os_storage']))
|
if(intval($r[0]['os_storage']))
|
||||||
$data = @file_get_contents($r[0]['data']);
|
$data = @file_get_contents($r[0]['content']);
|
||||||
else
|
else
|
||||||
$data = dbunescbin($r[0]['data']);
|
$data = dbunescbin($r[0]['content']);
|
||||||
|
|
||||||
$ph = photo_factory($data, $r[0]['type']);
|
$ph = photo_factory($data, $r[0]['mimetype']);
|
||||||
$smallest = 0;
|
$smallest = 0;
|
||||||
if($ph->is_valid()) {
|
if($ph->is_valid()) {
|
||||||
// go ahead as if we have just uploaded a new photo to crop
|
// go ahead as if we have just uploaded a new photo to crop
|
||||||
$i = q("select resource_id, scale from photo where resource_id = '%s' and uid = %d and scale = 0",
|
$i = q("select resource_id, imgscale from photo where resource_id = '%s' and uid = %d and imgscale = 0",
|
||||||
dbesc($r[0]['resource_id']),
|
dbesc($r[0]['resource_id']),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
@ -336,7 +336,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
||||||
if($i) {
|
if($i) {
|
||||||
$hash = $i[0]['resource_id'];
|
$hash = $i[0]['resource_id'];
|
||||||
foreach($i as $ii) {
|
foreach($i as $ii) {
|
||||||
$smallest = intval($ii['scale']);
|
$smallest = intval($ii['imgscale']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,12 +180,12 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
$datarray = array();
|
$datarray = array();
|
||||||
$datarray['start'] = $start;
|
$datarray['dtstart'] = $start;
|
||||||
$datarray['finish'] = $finish;
|
$datarray['dtend'] = $finish;
|
||||||
$datarray['summary'] = $summary;
|
$datarray['summary'] = $summary;
|
||||||
$datarray['description'] = $desc;
|
$datarray['description'] = $desc;
|
||||||
$datarray['location'] = $location;
|
$datarray['location'] = $location;
|
||||||
$datarray['type'] = $type;
|
$datarray['etype'] = $type;
|
||||||
$datarray['adjust'] = $adjust;
|
$datarray['adjust'] = $adjust;
|
||||||
$datarray['nofinish'] = $nofinish;
|
$datarray['nofinish'] = $nofinish;
|
||||||
$datarray['uid'] = local_channel();
|
$datarray['uid'] = local_channel();
|
||||||
|
@ -269,14 +269,14 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
nav_set_selected('all_events');
|
nav_set_selected('all_events');
|
||||||
|
|
||||||
if((argc() > 2) && (argv(1) === 'ignore') && intval(argv(2))) {
|
if((argc() > 2) && (argv(1) === 'ignore') && intval(argv(2))) {
|
||||||
$r = q("update event set ignore = 1 where id = %d and uid = %d",
|
$r = q("update event set dismissed = 1 where id = %d and uid = %d",
|
||||||
intval(argv(2)),
|
intval(argv(2)),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((argc() > 2) && (argv(1) === 'unignore') && intval(argv(2))) {
|
if((argc() > 2) && (argv(1) === 'unignore') && intval(argv(2))) {
|
||||||
$r = q("update event set ignore = 0 where id = %d and uid = %d",
|
$r = q("update event set dismissed = 0 where id = %d and uid = %d",
|
||||||
intval(argv(2)),
|
intval(argv(2)),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
@ -301,7 +301,7 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
$mode = 'view';
|
$mode = 'view';
|
||||||
$y = 0;
|
$y = 0;
|
||||||
$m = 0;
|
$m = 0;
|
||||||
$ignored = ((x($_REQUEST,'ignored')) ? " and ignored = " . intval($_REQUEST['ignored']) . " " : '');
|
$ignored = ((x($_REQUEST,'ignored')) ? " and dismissed = " . intval($_REQUEST['ignored']) . " " : '');
|
||||||
|
|
||||||
|
|
||||||
// logger('args: ' . print_r(\App::$argv,true));
|
// logger('args: ' . print_r(\App::$argv,true));
|
||||||
|
@ -358,9 +358,9 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
if(x($_REQUEST,'summary')) $orig_event['summary'] = $_REQUEST['summary'];
|
if(x($_REQUEST,'summary')) $orig_event['summary'] = $_REQUEST['summary'];
|
||||||
if(x($_REQUEST,'description')) $orig_event['description'] = $_REQUEST['description'];
|
if(x($_REQUEST,'description')) $orig_event['description'] = $_REQUEST['description'];
|
||||||
if(x($_REQUEST,'location')) $orig_event['location'] = $_REQUEST['location'];
|
if(x($_REQUEST,'location')) $orig_event['location'] = $_REQUEST['location'];
|
||||||
if(x($_REQUEST,'start')) $orig_event['start'] = $_REQUEST['start'];
|
if(x($_REQUEST,'start')) $orig_event['dtstart'] = $_REQUEST['start'];
|
||||||
if(x($_REQUEST,'finish')) $orig_event['finish'] = $_REQUEST['finish'];
|
if(x($_REQUEST,'finish')) $orig_event['dtend'] = $_REQUEST['finish'];
|
||||||
if(x($_REQUEST,'type')) $orig_event['type'] = $_REQUEST['type'];
|
if(x($_REQUEST,'type')) $orig_event['etype'] = $_REQUEST['type'];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$n_checked = ((x($orig_event) && $orig_event['nofinish']) ? ' checked="checked" ' : '');
|
$n_checked = ((x($orig_event) && $orig_event['nofinish']) ? ' checked="checked" ' : '');
|
||||||
|
@ -380,9 +380,9 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
if($orig_event['event_xchan'])
|
if($orig_event['event_xchan'])
|
||||||
$sh_checked .= ' disabled="disabled" ';
|
$sh_checked .= ' disabled="disabled" ';
|
||||||
|
|
||||||
$sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
|
$sdt = ((x($orig_event)) ? $orig_event['dtstart'] : 'now');
|
||||||
|
|
||||||
$fdt = ((x($orig_event)) ? $orig_event['finish'] : '+1 hour');
|
$fdt = ((x($orig_event)) ? $orig_event['dtend'] : '+1 hour');
|
||||||
|
|
||||||
$tz = date_default_timezone_get();
|
$tz = date_default_timezone_get();
|
||||||
if(x($orig_event))
|
if(x($orig_event))
|
||||||
|
@ -406,7 +406,7 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
$ftext = datetime_convert('UTC',$tz,$fdt);
|
$ftext = datetime_convert('UTC',$tz,$fdt);
|
||||||
$ftext = substr($ftext,0,14) . "00:00";
|
$ftext = substr($ftext,0,14) . "00:00";
|
||||||
|
|
||||||
$type = ((x($orig_event)) ? $orig_event['type'] : 'event');
|
$type = ((x($orig_event)) ? $orig_event['etype'] : 'event');
|
||||||
|
|
||||||
$f = get_config('system','event_input_format');
|
$f = get_config('system','event_input_format');
|
||||||
if(! $f)
|
if(! $f)
|
||||||
|
@ -536,8 +536,8 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
);
|
);
|
||||||
} elseif($export) {
|
} elseif($export) {
|
||||||
$r = q("SELECT * from event where uid = %d
|
$r = q("SELECT * from event where uid = %d
|
||||||
AND (( `adjust` = 0 AND ( `finish` >= '%s' or nofinish = 1 ) AND `start` <= '%s' )
|
AND (( `adjust` = 0 AND ( `dtend` >= '%s' or nofinish = 1 ) AND `dtstart` <= '%s' )
|
||||||
OR ( `adjust` = 1 AND ( `finish` >= '%s' or nofinish = 1 ) AND `start` <= '%s' )) ",
|
OR ( `adjust` = 1 AND ( `dtend` >= '%s' or nofinish = 1 ) AND `dtstart` <= '%s' )) ",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
dbesc($start),
|
dbesc($start),
|
||||||
dbesc($finish),
|
dbesc($finish),
|
||||||
|
@ -554,8 +554,8 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
|
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
|
||||||
from event left join item on event_hash = resource_id
|
from event left join item on event_hash = resource_id
|
||||||
where resource_type = 'event' and event.uid = %d $ignored
|
where resource_type = 'event' and event.uid = %d $ignored
|
||||||
AND (( adjust = 0 AND ( finish >= '%s' or nofinish = 1 ) AND start <= '%s' )
|
AND (( adjust = 0 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )
|
||||||
OR ( adjust = 1 AND ( finish >= '%s' or nofinish = 1 ) AND start <= '%s' )) ",
|
OR ( adjust = 1 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )) ",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
dbesc($start),
|
dbesc($start),
|
||||||
dbesc($finish),
|
dbesc($finish),
|
||||||
|
@ -576,7 +576,7 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
|
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
|
||||||
if(! x($links,$j))
|
if(! x($links,$j))
|
||||||
$links[$j] = z_root() . '/' . \App::$cmd . '#link-' . $j;
|
$links[$j] = z_root() . '/' . \App::$cmd . '#link-' . $j;
|
||||||
}
|
}
|
||||||
|
@ -591,15 +591,15 @@ class Events extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
|
|
||||||
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'j') : datetime_convert('UTC','UTC',$rr['start'],'j'));
|
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
|
||||||
$d = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], $fmt) : datetime_convert('UTC','UTC',$rr['start'],$fmt));
|
$d = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], $fmt) : datetime_convert('UTC','UTC',$rr['dtstart'],$fmt));
|
||||||
$d = day_translate($d);
|
$d = day_translate($d);
|
||||||
|
|
||||||
$start = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['start'], 'c') : datetime_convert('UTC','UTC',$rr['start'],'c'));
|
$start = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'c') : datetime_convert('UTC','UTC',$rr['dtstart'],'c'));
|
||||||
if ($rr['nofinish']){
|
if ($rr['nofinish']){
|
||||||
$end = null;
|
$end = null;
|
||||||
} else {
|
} else {
|
||||||
$end = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['finish'], 'c') : datetime_convert('UTC','UTC',$rr['finish'],'c'));
|
$end = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtend'], 'c') : datetime_convert('UTC','UTC',$rr['dtend'],'c'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,10 +45,10 @@ class Fbrowser extends \Zotlabs\Web\Controller {
|
||||||
$album = hex2bin(\App::$argv[2]);
|
$album = hex2bin(\App::$argv[2]);
|
||||||
$sql_extra = sprintf("AND `album` = '%s' ",dbesc($album));
|
$sql_extra = sprintf("AND `album` = '%s' ",dbesc($album));
|
||||||
$sql_extra2 = "";
|
$sql_extra2 = "";
|
||||||
$path[]=array(z_root()."/fbrowser/image/".\App::$argv[2]."/", $album);
|
$path[]=array(z_root() . "/fbrowser/image/" . \App::$argv[2] . "/", $album);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT `resource_id`, `id`, `filename`, type, min(`scale`) AS `hiq`,max(`scale`) AS `loq`, `description`
|
$r = q("SELECT `resource_id`, `id`, `filename`, type, min(`imgscale`) AS `hiq`,max(`imgscale`) AS `loq`, `description`
|
||||||
FROM `photo` WHERE `uid` = %d $sql_extra
|
FROM `photo` WHERE `uid` = %d $sql_extra
|
||||||
GROUP BY `resource_id` $sql_extra2",
|
GROUP BY `resource_id` $sql_extra2",
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
|
|
|
@ -483,7 +483,7 @@ class Like extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$arr['verb'] = $activity;
|
$arr['verb'] = $activity;
|
||||||
$arr['obj_type'] = $objtype;
|
$arr['obj_type'] = $objtype;
|
||||||
$arr['object'] = $object;
|
$arr['obj'] = $object;
|
||||||
|
|
||||||
if($target) {
|
if($target) {
|
||||||
$arr['tgt_type'] = $tgttype;
|
$arr['tgt_type'] = $tgttype;
|
||||||
|
|
|
@ -93,9 +93,9 @@ class Manage extends \Zotlabs\Web\Controller {
|
||||||
$channels[$x]['mail'] = intval($mails[0]['total']);
|
$channels[$x]['mail'] = intval($mails[0]['total']);
|
||||||
|
|
||||||
|
|
||||||
$events = q("SELECT type, start, adjust FROM `event`
|
$events = q("SELECT etype, dtstart, adjust FROM `event`
|
||||||
WHERE `event`.`uid` = %d AND start < '%s' AND start > '%s' and `ignore` = 0
|
WHERE `event`.`uid` = %d AND dtstart < '%s' AND dtstart > '%s' and `dismissed` = 0
|
||||||
ORDER BY `start` ASC ",
|
ORDER BY `dtstart` ASC ",
|
||||||
intval($channels[$x]['channel_id']),
|
intval($channels[$x]['channel_id']),
|
||||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + 7 days')),
|
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + 7 days')),
|
||||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
|
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
|
||||||
|
@ -108,14 +108,14 @@ class Manage extends \Zotlabs\Web\Controller {
|
||||||
$str_now = datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d');
|
$str_now = datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d');
|
||||||
foreach($events as $e) {
|
foreach($events as $e) {
|
||||||
$bd = false;
|
$bd = false;
|
||||||
if($e['type'] === 'birthday') {
|
if($e['etype'] === 'birthday') {
|
||||||
$channels[$x]['birthdays'] ++;
|
$channels[$x]['birthdays'] ++;
|
||||||
$bd = true;
|
$bd = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$channels[$x]['events'] ++;
|
$channels[$x]['events'] ++;
|
||||||
}
|
}
|
||||||
if(datetime_convert('UTC', ((intval($e['adjust'])) ? date_default_timezone_get() : 'UTC'), $e['start'], 'Y-m-d') === $str_now) {
|
if(datetime_convert('UTC', ((intval($e['adjust'])) ? date_default_timezone_get() : 'UTC'), $e['dtstart'], 'Y-m-d') === $str_now) {
|
||||||
$channels[$x]['all_events_today'] ++;
|
$channels[$x]['all_events_today'] ++;
|
||||||
if($bd)
|
if($bd)
|
||||||
$channels[$x]['birthdays_today'] ++;
|
$channels[$x]['birthdays_today'] ++;
|
||||||
|
|
|
@ -80,18 +80,18 @@ class Notifications extends \Zotlabs\Web\Controller {
|
||||||
$not_tpl = get_markup_template('notify.tpl');
|
$not_tpl = get_markup_template('notify.tpl');
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
|
||||||
$r = q("SELECT * from notify where uid = %d and seen = 0 order by date desc",
|
$r = q("SELECT * from notify where uid = %d and seen = 0 order by created desc",
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
|
||||||
if (count($r) > 0) {
|
if ($r > 0) {
|
||||||
$notifications_available =1;
|
$notifications_available =1;
|
||||||
foreach ($r as $it) {
|
foreach ($r as $it) {
|
||||||
$notif_content .= replace_macros($not_tpl,array(
|
$notif_content .= replace_macros($not_tpl,array(
|
||||||
'$item_link' => z_root().'/notify/view/'. $it['id'],
|
'$item_link' => z_root().'/notify/view/'. $it['id'],
|
||||||
'$item_image' => $it['photo'],
|
'$item_image' => $it['photo'],
|
||||||
'$item_text' => strip_tags(bbcode($it['msg'])),
|
'$item_text' => strip_tags(bbcode($it['msg'])),
|
||||||
'$item_when' => relative_date($it['date'])
|
'$item_when' => relative_date($it['created'])
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Notify extends \Zotlabs\Web\Controller {
|
||||||
$not_tpl = get_markup_template('notify.tpl');
|
$not_tpl = get_markup_template('notify.tpl');
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
|
|
||||||
$r = q("SELECT * from notify where uid = %d and seen = 0 order by date desc",
|
$r = q("SELECT * from notify where uid = %d and seen = 0 order by created desc",
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class Notify extends \Zotlabs\Web\Controller {
|
||||||
'$item_link' => z_root().'/notify/view/'. $it['id'],
|
'$item_link' => z_root().'/notify/view/'. $it['id'],
|
||||||
'$item_image' => $it['photo'],
|
'$item_image' => $it['photo'],
|
||||||
'$item_text' => strip_tags(bbcode($it['msg'])),
|
'$item_text' => strip_tags(bbcode($it['msg'])),
|
||||||
'$item_when' => relative_date($it['date'])
|
'$item_when' => relative_date($it['created'])
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,7 +249,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$sql_extra = permissions_sql($c[0]['channel_id']);
|
$sql_extra = permissions_sql($c[0]['channel_id']);
|
||||||
|
|
||||||
$p = q("select resource_id from photo where album = '%s' and uid = %d and scale = 0 $sql_extra order by created desc limit 1",
|
$p = q("select resource_id from photo where album = '%s' and uid = %d and imgscale = 0 $sql_extra order by created desc limit 1",
|
||||||
dbesc($res),
|
dbesc($res),
|
||||||
intval($c[0]['channel_id'])
|
intval($c[0]['channel_id'])
|
||||||
);
|
);
|
||||||
|
@ -258,7 +258,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$res = $p[0]['resource_id'];
|
$res = $p[0]['resource_id'];
|
||||||
|
|
||||||
$r = q("select height, width, scale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by scale asc",
|
$r = q("select height, width, imgscale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by imgscale asc",
|
||||||
intval($c[0]['channel_id']),
|
intval($c[0]['channel_id']),
|
||||||
dbesc($res)
|
dbesc($res)
|
||||||
);
|
);
|
||||||
|
@ -276,7 +276,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
if($foundres) {
|
if($foundres) {
|
||||||
$ret['type'] = 'link';
|
$ret['type'] = 'link';
|
||||||
$ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['scale'];
|
$ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['imgscale'];
|
||||||
$ret['thumbnail_width'] = $rr['width'];
|
$ret['thumbnail_width'] = $rr['width'];
|
||||||
$ret['thumbnail_height'] = $rr['height'];
|
$ret['thumbnail_height'] = $rr['height'];
|
||||||
}
|
}
|
||||||
|
@ -310,7 +310,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$sql_extra = permissions_sql($c[0]['channel_id']);
|
$sql_extra = permissions_sql($c[0]['channel_id']);
|
||||||
|
|
||||||
$p = q("select resource_id from photo where uid = %d and scale = 0 $sql_extra order by created desc limit 1",
|
$p = q("select resource_id from photo where uid = %d and imgscale = 0 $sql_extra order by created desc limit 1",
|
||||||
intval($c[0]['channel_id'])
|
intval($c[0]['channel_id'])
|
||||||
);
|
);
|
||||||
if(! $p)
|
if(! $p)
|
||||||
|
@ -318,7 +318,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$res = $p[0]['resource_id'];
|
$res = $p[0]['resource_id'];
|
||||||
|
|
||||||
$r = q("select height, width, scale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by scale asc",
|
$r = q("select height, width, imgscale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by imgscale asc",
|
||||||
intval($c[0]['channel_id']),
|
intval($c[0]['channel_id']),
|
||||||
dbesc($res)
|
dbesc($res)
|
||||||
);
|
);
|
||||||
|
@ -336,7 +336,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
if($foundres) {
|
if($foundres) {
|
||||||
$ret['type'] = 'link';
|
$ret['type'] = 'link';
|
||||||
$ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['scale'];
|
$ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['imgscale'];
|
||||||
$ret['thumbnail_width'] = $rr['width'];
|
$ret['thumbnail_width'] = $rr['width'];
|
||||||
$ret['thumbnail_height'] = $rr['height'];
|
$ret['thumbnail_height'] = $rr['height'];
|
||||||
}
|
}
|
||||||
|
@ -372,7 +372,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||||
$sql_extra = permissions_sql($c[0]['channel_id']);
|
$sql_extra = permissions_sql($c[0]['channel_id']);
|
||||||
|
|
||||||
|
|
||||||
$r = q("select height, width, scale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by scale asc",
|
$r = q("select height, width, imgscale, resource_id from photo where uid = %d and resource_id = '%s' $sql_extra order by imgscale asc",
|
||||||
intval($c[0]['channel_id']),
|
intval($c[0]['channel_id']),
|
||||||
dbesc($res)
|
dbesc($res)
|
||||||
);
|
);
|
||||||
|
@ -390,7 +390,7 @@ class Oep extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
if($foundres) {
|
if($foundres) {
|
||||||
$ret['type'] = 'link';
|
$ret['type'] = 'link';
|
||||||
$ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['scale'];
|
$ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['imgscale'];
|
||||||
$ret['thumbnail_width'] = $rr['width'];
|
$ret['thumbnail_width'] = $rr['width'];
|
||||||
$ret['thumbnail_height'] = $rr['height'];
|
$ret['thumbnail_height'] = $rr['height'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,14 +57,14 @@ class Photo extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$uid = $person;
|
$uid = $person;
|
||||||
|
|
||||||
$r = q("SELECT * FROM photo WHERE scale = %d AND uid = %d AND photo_usage = %d LIMIT 1",
|
$r = q("SELECT * FROM photo WHERE imgscale = %d AND uid = %d AND photo_usage = %d LIMIT 1",
|
||||||
intval($resolution),
|
intval($resolution),
|
||||||
intval($uid),
|
intval($uid),
|
||||||
intval(PHOTO_PROFILE)
|
intval(PHOTO_PROFILE)
|
||||||
);
|
);
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
$data = dbunescbin($r[0]['data']);
|
$data = dbunescbin($r[0]['content']);
|
||||||
$mimetype = $r[0]['type'];
|
$mimetype = $r[0]['mimetype'];
|
||||||
}
|
}
|
||||||
if(intval($r[0]['os_storage']))
|
if(intval($r[0]['os_storage']))
|
||||||
$data = file_get_contents($data);
|
$data = file_get_contents($data);
|
||||||
|
@ -113,7 +113,7 @@ class Photo extends \Zotlabs\Web\Controller {
|
||||||
// If using resolution 1, make sure it exists before proceeding:
|
// If using resolution 1, make sure it exists before proceeding:
|
||||||
if ($resolution == 1)
|
if ($resolution == 1)
|
||||||
{
|
{
|
||||||
$r = q("SELECT uid FROM photo WHERE resource_id = '%s' AND scale = %d LIMIT 1",
|
$r = q("SELECT uid FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1",
|
||||||
dbesc($photo),
|
dbesc($photo),
|
||||||
intval($resolution)
|
intval($resolution)
|
||||||
);
|
);
|
||||||
|
@ -121,7 +121,7 @@ class Photo extends \Zotlabs\Web\Controller {
|
||||||
$resolution = 2;
|
$resolution = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT uid FROM photo WHERE resource_id = '%s' AND scale = %d LIMIT 1",
|
$r = q("SELECT uid FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1",
|
||||||
dbesc($photo),
|
dbesc($photo),
|
||||||
intval($resolution)
|
intval($resolution)
|
||||||
);
|
);
|
||||||
|
@ -133,14 +133,14 @@ class Photo extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
// Now we'll see if we can access the photo
|
// Now we'll see if we can access the photo
|
||||||
|
|
||||||
$r = q("SELECT * FROM photo WHERE resource_id = '%s' AND scale = %d $sql_extra LIMIT 1",
|
$r = q("SELECT * FROM photo WHERE resource_id = '%s' AND imgscale = %d $sql_extra LIMIT 1",
|
||||||
dbesc($photo),
|
dbesc($photo),
|
||||||
intval($resolution)
|
intval($resolution)
|
||||||
);
|
);
|
||||||
|
|
||||||
if($r && $allowed) {
|
if($r && $allowed) {
|
||||||
$data = dbunescbin($r[0]['data']);
|
$data = dbunescbin($r[0]['content']);
|
||||||
$mimetype = $r[0]['type'];
|
$mimetype = $r[0]['mimetype'];
|
||||||
if(intval($r[0]['os_storage']))
|
if(intval($r[0]['os_storage']))
|
||||||
$data = file_get_contents($data);
|
$data = file_get_contents($data);
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ class Photo extends \Zotlabs\Web\Controller {
|
||||||
// they won't have the photo link, so there's a reasonable chance that the person
|
// they won't have the photo link, so there's a reasonable chance that the person
|
||||||
// might be able to obtain permission to view it.
|
// might be able to obtain permission to view it.
|
||||||
|
|
||||||
$r = q("SELECT * FROM `photo` WHERE `resource_id` = '%s' AND `scale` = %d LIMIT 1",
|
$r = q("SELECT * FROM `photo` WHERE `resource_id` = '%s' AND `imgscale` = %d LIMIT 1",
|
||||||
dbesc($photo),
|
dbesc($photo),
|
||||||
intval($resolution)
|
intval($resolution)
|
||||||
);
|
);
|
||||||
|
|
|
@ -255,13 +255,13 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
( (intval($_POST['rotate']) == 1) || (intval($_POST['rotate']) == 2) )) {
|
( (intval($_POST['rotate']) == 1) || (intval($_POST['rotate']) == 2) )) {
|
||||||
logger('rotate');
|
logger('rotate');
|
||||||
|
|
||||||
$r = q("select * from photo where `resource_id` = '%s' and uid = %d and scale = 0 limit 1",
|
$r = q("select * from photo where `resource_id` = '%s' and uid = %d and imgscale = 0 limit 1",
|
||||||
dbesc($resource_id),
|
dbesc($resource_id),
|
||||||
intval($page_owner_uid)
|
intval($page_owner_uid)
|
||||||
);
|
);
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
$d = (($r[0]['os_storage']) ? @file_get_contents($r[0]['data']) : dbunescbin($r[0]['data']));
|
$d = (($r[0]['os_storage']) ? @file_get_contents($r[0]['content']) : dbunescbin($r[0]['content']));
|
||||||
$ph = photo_factory($d, $r[0]['type']);
|
$ph = photo_factory($d, $r[0]['mimetype']);
|
||||||
if($ph->is_valid()) {
|
if($ph->is_valid()) {
|
||||||
$rotate_deg = ( (intval($_POST['rotate']) == 1) ? 270 : 90 );
|
$rotate_deg = ( (intval($_POST['rotate']) == 1) ? 270 : 90 );
|
||||||
$ph->rotate($rotate_deg);
|
$ph->rotate($rotate_deg);
|
||||||
|
@ -270,9 +270,9 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
$height = $ph->getHeight();
|
$height = $ph->getHeight();
|
||||||
|
|
||||||
if(intval($r[0]['os_storage'])) {
|
if(intval($r[0]['os_storage'])) {
|
||||||
@file_put_contents($r[0]['data'],$ph->imageString());
|
@file_put_contents($r[0]['content'],$ph->imageString());
|
||||||
$data = $r[0]['data'];
|
$data = $r[0]['content'];
|
||||||
$fsize = @filesize($r[0]['data']);
|
$fsize = @filesize($r[0]['content']);
|
||||||
q("update attach set filesize = %d where hash = '%s' and uid = %d limit 1",
|
q("update attach set filesize = %d where hash = '%s' and uid = %d limit 1",
|
||||||
intval($fsize),
|
intval($fsize),
|
||||||
dbesc($resource_id),
|
dbesc($resource_id),
|
||||||
|
@ -284,7 +284,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
$fsize = strlen($data);
|
$fsize = strlen($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$x = q("update photo set data = '%s', `size` = %d, height = %d, width = %d where `resource_id` = '%s' and uid = %d and scale = 0",
|
$x = q("update photo set content = '%s', filesize = %d, height = %d, width = %d where `resource_id` = '%s' and uid = %d and imgscale = 0",
|
||||||
dbescbin($data),
|
dbescbin($data),
|
||||||
intval($fsize),
|
intval($fsize),
|
||||||
intval($height),
|
intval($height),
|
||||||
|
@ -299,7 +299,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
$width = $ph->getWidth();
|
$width = $ph->getWidth();
|
||||||
$height = $ph->getHeight();
|
$height = $ph->getHeight();
|
||||||
|
|
||||||
$x = q("update photo set data = '%s', height = %d, width = %d where `resource_id` = '%s' and uid = %d and scale = 1",
|
$x = q("update photo set content = '%s', height = %d, width = %d where `resource_id` = '%s' and uid = %d and imgscale = 1",
|
||||||
dbescbin($ph->imageString()),
|
dbescbin($ph->imageString()),
|
||||||
intval($height),
|
intval($height),
|
||||||
intval($width),
|
intval($width),
|
||||||
|
@ -314,7 +314,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
$width = $ph->getWidth();
|
$width = $ph->getWidth();
|
||||||
$height = $ph->getHeight();
|
$height = $ph->getHeight();
|
||||||
|
|
||||||
$x = q("update photo set data = '%s', height = %d, width = %d where `resource_id` = '%s' and uid = %d and scale = 2",
|
$x = q("update photo set content = '%s', height = %d, width = %d where `resource_id` = '%s' and uid = %d and imgscale = 2",
|
||||||
dbescbin($ph->imageString()),
|
dbescbin($ph->imageString()),
|
||||||
intval($height),
|
intval($height),
|
||||||
intval($width),
|
intval($width),
|
||||||
|
@ -329,7 +329,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
$width = $ph->getWidth();
|
$width = $ph->getWidth();
|
||||||
$height = $ph->getHeight();
|
$height = $ph->getHeight();
|
||||||
|
|
||||||
$x = q("update photo set data = '%s', height = %d, width = %d where `resource_id` = '%s' and uid = %d and scale = 3",
|
$x = q("update photo set content = '%s', height = %d, width = %d where `resource_id` = '%s' and uid = %d and imgscale = 3",
|
||||||
dbescbin($ph->imageString()),
|
dbescbin($ph->imageString()),
|
||||||
intval($height),
|
intval($height),
|
||||||
intval($width),
|
intval($width),
|
||||||
|
@ -340,12 +340,12 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$p = q("SELECT type, is_nsfw, description, resource_id, scale, allow_cid, allow_gid, deny_cid, deny_gid FROM photo WHERE resource_id = '%s' AND uid = %d ORDER BY scale DESC",
|
$p = q("SELECT mimetype, is_nsfw, description, resource_id, imgscale, allow_cid, allow_gid, deny_cid, deny_gid FROM photo WHERE resource_id = '%s' AND uid = %d ORDER BY imgscale DESC",
|
||||||
dbesc($resource_id),
|
dbesc($resource_id),
|
||||||
intval($page_owner_uid)
|
intval($page_owner_uid)
|
||||||
);
|
);
|
||||||
if($p) {
|
if($p) {
|
||||||
$ext = $phototypes[$p[0]['type']];
|
$ext = $phototypes[$p[0]['mimetype']];
|
||||||
|
|
||||||
$r = q("UPDATE `photo` SET `description` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' WHERE `resource_id` = '%s' AND `uid` = %d",
|
$r = q("UPDATE `photo` SET `description` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' WHERE `resource_id` = '%s' AND `uid` = %d",
|
||||||
dbesc($desc),
|
dbesc($desc),
|
||||||
|
@ -611,7 +611,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
/* Show space usage */
|
/* Show space usage */
|
||||||
|
|
||||||
$r = q("select sum(size) as total from photo where aid = %d and scale = 0 ",
|
$r = q("select sum(filesize) as total from photo where aid = %d and imgscale = 0 ",
|
||||||
intval(\App::$data['channel']['channel_account_id'])
|
intval(\App::$data['channel']['channel_account_id'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -704,8 +704,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
\App::$page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . \App::$cmd) . '" title="oembed" />' . "\r\n";
|
\App::$page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . \App::$cmd) . '" title="oembed" />' . "\r\n";
|
||||||
|
|
||||||
|
|
||||||
$r = q("SELECT `resource_id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
|
$r = q("SELECT `resource_id`, max(`imgscale`) AS `imgscale` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
|
||||||
AND `scale` <= 4 and photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY `resource_id`",
|
AND `imgscale` <= 4 and photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY `resource_id`",
|
||||||
intval($owner_uid),
|
intval($owner_uid),
|
||||||
dbesc($album),
|
dbesc($album),
|
||||||
intval(PHOTO_NORMAL),
|
intval(PHOTO_NORMAL),
|
||||||
|
@ -725,9 +725,9 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
$order = 'DESC';
|
$order = 'DESC';
|
||||||
|
|
||||||
|
|
||||||
$r = q("SELECT p.resource_id, p.id, p.filename, p.type, p.scale, p.description, p.created FROM photo p INNER JOIN
|
$r = q("SELECT p.resource_id, p.id, p.filename, p.mimetype, p.imgscale, p.description, p.created FROM photo p INNER JOIN
|
||||||
(SELECT resource_id, max(scale) scale FROM photo WHERE uid = %d AND album = '%s' AND scale <= 4 AND photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY resource_id) ph
|
(SELECT resource_id, max(imgscale) imgscale FROM photo WHERE uid = %d AND album = '%s' AND imgscale <= 4 AND photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY resource_id) ph
|
||||||
ON (p.resource_id = ph.resource_id AND p.scale = ph.scale)
|
ON (p.resource_id = ph.resource_id AND p.imgscale = ph.imgscale)
|
||||||
ORDER BY created $order LIMIT %d OFFSET %d",
|
ORDER BY created $order LIMIT %d OFFSET %d",
|
||||||
intval($owner_uid),
|
intval($owner_uid),
|
||||||
dbesc($album),
|
dbesc($album),
|
||||||
|
@ -777,7 +777,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
else
|
else
|
||||||
$twist = 'rotright';
|
$twist = 'rotright';
|
||||||
|
|
||||||
$ext = $phototypes[$rr['type']];
|
$ext = $phototypes[$rr['mimetype']];
|
||||||
|
|
||||||
$imgalt_e = $rr['filename'];
|
$imgalt_e = $rr['filename'];
|
||||||
$desc_e = $rr['description'];
|
$desc_e = $rr['description'];
|
||||||
|
@ -790,7 +790,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
'twist' => ' ' . $twist . rand(2,4),
|
'twist' => ' ' . $twist . rand(2,4),
|
||||||
'link' => $imagelink,
|
'link' => $imagelink,
|
||||||
'title' => t('View Photo'),
|
'title' => t('View Photo'),
|
||||||
'src' => z_root() . '/photo/' . $rr['resource_id'] . '-' . $rr['scale'] . '.' .$ext,
|
'src' => z_root() . '/photo/' . $rr['resource_id'] . '-' . $rr['imgscale'] . '.' .$ext,
|
||||||
'alt' => $imgalt_e,
|
'alt' => $imgalt_e,
|
||||||
'desc'=> $desc_e,
|
'desc'=> $desc_e,
|
||||||
'ext' => $ext,
|
'ext' => $ext,
|
||||||
|
@ -852,8 +852,8 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
// fetch image, item containing image, then comments
|
// fetch image, item containing image, then comments
|
||||||
|
|
||||||
$ph = q("SELECT id,aid,uid,xchan,resource_id,created,edited,title,`description`,album,filename,`type`,height,width,`size`,scale,photo_usage,is_nsfw,allow_cid,allow_gid,deny_cid,deny_gid FROM `photo` WHERE `uid` = %d AND `resource_id` = '%s'
|
$ph = q("SELECT id,aid,uid,xchan,resource_id,created,edited,title,`description`,album,filename,mimetype,height,width,filesize,imgscale,photo_usage,is_nsfw,allow_cid,allow_gid,deny_cid,deny_gid FROM `photo` WHERE `uid` = %d AND `resource_id` = '%s'
|
||||||
$sql_extra ORDER BY `scale` ASC ",
|
$sql_extra ORDER BY `imgscale` ASC ",
|
||||||
intval($owner_uid),
|
intval($owner_uid),
|
||||||
dbesc($datum)
|
dbesc($datum)
|
||||||
);
|
);
|
||||||
|
@ -884,7 +884,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
$order = 'DESC';
|
$order = 'DESC';
|
||||||
|
|
||||||
|
|
||||||
$prvnxt = q("SELECT `resource_id` FROM `photo` WHERE `album` = '%s' AND `uid` = %d AND `scale` = 0
|
$prvnxt = q("SELECT `resource_id` FROM `photo` WHERE `album` = '%s' AND `uid` = %d AND `imgscale` = 0
|
||||||
$sql_extra ORDER BY `created` $order ",
|
$sql_extra ORDER BY `created` $order ",
|
||||||
dbesc($ph[0]['album']),
|
dbesc($ph[0]['album']),
|
||||||
intval($owner_uid)
|
intval($owner_uid)
|
||||||
|
@ -911,7 +911,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
if(count($ph) == 1)
|
if(count($ph) == 1)
|
||||||
$hires = $lores = $ph[0];
|
$hires = $lores = $ph[0];
|
||||||
if(count($ph) > 1) {
|
if(count($ph) > 1) {
|
||||||
if($ph[1]['scale'] == 2) {
|
if($ph[1]['imgscale'] == 2) {
|
||||||
// original is 640 or less, we can display it directly
|
// original is 640 or less, we can display it directly
|
||||||
$hires = $lores = $ph[0];
|
$hires = $lores = $ph[0];
|
||||||
}
|
}
|
||||||
|
@ -949,9 +949,9 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
$prevlink = array($prevlink, t('Previous'));
|
$prevlink = array($prevlink, t('Previous'));
|
||||||
|
|
||||||
$photo = array(
|
$photo = array(
|
||||||
'href' => z_root() . '/photo/' . $hires['resource_id'] . '-' . $hires['scale'] . '.' . $phototypes[$hires['type']],
|
'href' => z_root() . '/photo/' . $hires['resource_id'] . '-' . $hires['imgscale'] . '.' . $phototypes[$hires['mimetype']],
|
||||||
'title'=> t('View Full Size'),
|
'title'=> t('View Full Size'),
|
||||||
'src' => z_root() . '/photo/' . $lores['resource_id'] . '-' . $lores['scale'] . '.' . $phototypes[$lores['type']] . '?f=&_u=' . datetime_convert('','','','ymdhis')
|
'src' => z_root() . '/photo/' . $lores['resource_id'] . '-' . $lores['imgscale'] . '.' . $phototypes[$lores['mimetype']] . '?f=&_u=' . datetime_convert('','','','ymdhis')
|
||||||
);
|
);
|
||||||
|
|
||||||
if($nextlink)
|
if($nextlink)
|
||||||
|
@ -1277,7 +1277,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
\App::$page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . \App::$cmd) . '" title="oembed" />' . "\r\n";
|
\App::$page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . \App::$cmd) . '" title="oembed" />' . "\r\n";
|
||||||
|
|
||||||
|
|
||||||
$r = q("SELECT `resource_id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
|
$r = q("SELECT `resource_id`, max(`imgscale`) AS `imgscale` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
|
||||||
and photo_usage in ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY `resource_id`",
|
and photo_usage in ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY `resource_id`",
|
||||||
intval(\App::$data['channel']['channel_id']),
|
intval(\App::$data['channel']['channel_id']),
|
||||||
dbesc('Contact Photos'),
|
dbesc('Contact Photos'),
|
||||||
|
@ -1286,16 +1286,17 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
intval(PHOTO_PROFILE),
|
intval(PHOTO_PROFILE),
|
||||||
intval($unsafe)
|
intval($unsafe)
|
||||||
);
|
);
|
||||||
if(count($r)) {
|
if($r) {
|
||||||
\App::set_pager_total(count($r));
|
\App::set_pager_total(count($r));
|
||||||
\App::set_pager_itemspage(60);
|
\App::set_pager_itemspage(60);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT p.resource_id, p.id, p.filename, p.type, p.album, p.scale, p.created FROM photo p INNER JOIN
|
$r = q("SELECT p.resource_id, p.id, p.filename, p.mimetype, p.album, p.imgscale, p.created FROM photo as p
|
||||||
(SELECT resource_id, max(scale) scale FROM photo
|
INNER JOIN ( SELECT resource_id, max(imgscale) as imgscale FROM photo
|
||||||
WHERE uid=%d AND album != '%s' AND album != '%s'
|
WHERE uid = %d AND photo_usage IN ( %d, %d )
|
||||||
AND photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra group by resource_id) ph
|
AND is_nsfw = %d $sql_extra group by resource_id ) as ph
|
||||||
ON (p.resource_id = ph.resource_id and p.scale = ph.scale) ORDER by p.created DESC LIMIT %d OFFSET %d",
|
ON (p.resource_id = ph.resource_id and p.imgscale = ph.imgscale)
|
||||||
|
ORDER by p.created DESC LIMIT %d OFFSET %d",
|
||||||
intval(\App::$data['channel']['channel_id']),
|
intval(\App::$data['channel']['channel_id']),
|
||||||
dbesc('Contact Photos'),
|
dbesc('Contact Photos'),
|
||||||
dbesc( t('Contact Photos')),
|
dbesc( t('Contact Photos')),
|
||||||
|
@ -1309,14 +1310,14 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
|
|
||||||
$photos = array();
|
$photos = array();
|
||||||
if(count($r)) {
|
if($r) {
|
||||||
$twist = 'rotright';
|
$twist = 'rotright';
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
if($twist == 'rotright')
|
if($twist == 'rotright')
|
||||||
$twist = 'rotleft';
|
$twist = 'rotleft';
|
||||||
else
|
else
|
||||||
$twist = 'rotright';
|
$twist = 'rotright';
|
||||||
$ext = $phototypes[$rr['type']];
|
$ext = $phototypes[$rr['mimetype']];
|
||||||
|
|
||||||
if(\App::get_template_engine() === 'internal') {
|
if(\App::get_template_engine() === 'internal') {
|
||||||
$alt_e = template_escape($rr['filename']);
|
$alt_e = template_escape($rr['filename']);
|
||||||
|
@ -1332,7 +1333,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
'twist' => ' ' . $twist . rand(2,4),
|
'twist' => ' ' . $twist . rand(2,4),
|
||||||
'link' => z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $rr['resource_id'],
|
'link' => z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $rr['resource_id'],
|
||||||
'title' => t('View Photo'),
|
'title' => t('View Photo'),
|
||||||
'src' => z_root() . '/photo/' . $rr['resource_id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.' . $ext,
|
'src' => z_root() . '/photo/' . $rr['resource_id'] . '-' . ((($rr['imgscale']) == 6) ? 4 : $rr['imgscale']) . '.' . $ext,
|
||||||
'alt' => $alt_e,
|
'alt' => $alt_e,
|
||||||
'album' => array(
|
'album' => array(
|
||||||
'link' => z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/album/' . bin2hex($rr['album']),
|
'link' => z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/album/' . bin2hex($rr['album']),
|
||||||
|
|
|
@ -173,7 +173,7 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'all_events':
|
case 'all_events':
|
||||||
$r = q("update event set `ignore` = 1 where `ignore` = 0 and uid = %d AND start < '%s' AND start > '%s' ",
|
$r = q("update event set `dimissed` = 1 where `dismissed` = 0 and uid = %d AND dtstart < '%s' AND dtstart > '%s' ",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + ' . intval($evdays) . ' days')),
|
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + ' . intval($evdays) . ' days')),
|
||||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
|
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
|
||||||
|
@ -209,17 +209,17 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||||
);
|
);
|
||||||
if($t && intval($t[0]['total']) > 49) {
|
if($t && intval($t[0]['total']) > 49) {
|
||||||
$z = q("select * from notify where uid = %d
|
$z = q("select * from notify where uid = %d
|
||||||
and seen = 0 order by date desc limit 50",
|
and seen = 0 order by created desc limit 50",
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$z1 = q("select * from notify where uid = %d
|
$z1 = q("select * from notify where uid = %d
|
||||||
and seen = 0 order by date desc limit 50",
|
and seen = 0 order by created desc limit 50",
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
$z2 = q("select * from notify where uid = %d
|
$z2 = q("select * from notify where uid = %d
|
||||||
and seen = 1 order by date desc limit %d",
|
and seen = 1 order by created desc limit %d",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
intval(50 - intval($t[0]['total']))
|
intval(50 - intval($t[0]['total']))
|
||||||
);
|
);
|
||||||
|
@ -230,10 +230,10 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||||
foreach($z as $zz) {
|
foreach($z as $zz) {
|
||||||
$notifs[] = array(
|
$notifs[] = array(
|
||||||
'notify_link' => z_root() . '/notify/view/' . $zz['id'],
|
'notify_link' => z_root() . '/notify/view/' . $zz['id'],
|
||||||
'name' => $zz['name'],
|
'name' => $zz['xname'],
|
||||||
'url' => $zz['url'],
|
'url' => $zz['url'],
|
||||||
'photo' => $zz['photo'],
|
'photo' => $zz['photo'],
|
||||||
'when' => relative_date($zz['date']),
|
'when' => relative_date($zz['created']),
|
||||||
'hclass' => (($zz['seen']) ? 'notify-seen' : 'notify-unseen'),
|
'hclass' => (($zz['seen']) ? 'notify-seen' : 'notify-unseen'),
|
||||||
'message' => strip_tags(bbcode($zz['msg']))
|
'message' => strip_tags(bbcode($zz['msg']))
|
||||||
);
|
);
|
||||||
|
@ -325,9 +325,9 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
$r = q("SELECT * FROM event left join xchan on event_xchan = xchan_hash
|
$r = q("SELECT * FROM event left join xchan on event_xchan = xchan_hash
|
||||||
WHERE `event`.`uid` = %d AND start < '%s' AND start > '%s' and `ignore` = 0
|
WHERE `event`.`uid` = %d AND dtstart < '%s' AND dtstart > '%s' and `dismissed` = 0
|
||||||
and type in ( 'event', 'birthday' )
|
and etype in ( 'event', 'birthday' )
|
||||||
ORDER BY `start` DESC LIMIT 1000",
|
ORDER BY `dtstart` DESC LIMIT 1000",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + ' . intval($evdays) . ' days')),
|
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + ' . intval($evdays) . ' days')),
|
||||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
|
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
|
||||||
|
@ -336,14 +336,14 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||||
if($r) {
|
if($r) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
if($rr['adjust'])
|
if($rr['adjust'])
|
||||||
$md = datetime_convert('UTC', date_default_timezone_get(), $rr['start'], 'Y/m');
|
$md = datetime_convert('UTC', date_default_timezone_get(), $rr['dtstart'], 'Y/m');
|
||||||
else
|
else
|
||||||
$md = datetime_convert('UTC', 'UTC', $rr['start'], 'Y/m');
|
$md = datetime_convert('UTC', 'UTC', $rr['dtstart'], 'Y/m');
|
||||||
|
|
||||||
$strt = datetime_convert('UTC', (($rr['adjust']) ? date_default_timezone_get() : 'UTC'), $rr['start']);
|
$strt = datetime_convert('UTC', (($rr['adjust']) ? date_default_timezone_get() : 'UTC'), $rr['dtstart']);
|
||||||
$today = ((substr($strt, 0, 10) === datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d')) ? true : false);
|
$today = ((substr($strt, 0, 10) === datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d')) ? true : false);
|
||||||
|
|
||||||
$when = day_translate(datetime_convert('UTC', (($rr['adjust']) ? date_default_timezone_get() : 'UTC'), $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '');
|
$when = day_translate(datetime_convert('UTC', (($rr['adjust']) ? date_default_timezone_get() : 'UTC'), $rr['dtstart'], $bd_format)) . (($today) ? ' ' . t('[today]') : '');
|
||||||
|
|
||||||
$result[] = array(
|
$result[] = array(
|
||||||
'notify_link' => z_root() . '/events', // FIXME this takes you to an edit page and it may not be yours, we really want to just view the single event --> '/events/event/' . $rr['event_hash'],
|
'notify_link' => z_root() . '/events', // FIXME this takes you to an edit page and it may not be yours, we really want to just view the single event --> '/events/event/' . $rr['event_hash'],
|
||||||
|
@ -443,10 +443,10 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||||
$t5 = dba_timer();
|
$t5 = dba_timer();
|
||||||
|
|
||||||
if($vnotify & (VNOTIFY_EVENT|VNOTIFY_EVENTTODAY|VNOTIFY_BIRTHDAY)) {
|
if($vnotify & (VNOTIFY_EVENT|VNOTIFY_EVENTTODAY|VNOTIFY_BIRTHDAY)) {
|
||||||
$events = q("SELECT type, start, adjust FROM `event`
|
$events = q("SELECT etype, dtstart, adjust FROM `event`
|
||||||
WHERE `event`.`uid` = %d AND start < '%s' AND start > '%s' and `ignore` = 0
|
WHERE `event`.`uid` = %d AND dtstart < '%s' AND dtstart > '%s' and `dismissed` = 0
|
||||||
and type in ( 'event', 'birthday' )
|
and etype in ( 'event', 'birthday' )
|
||||||
ORDER BY `start` ASC ",
|
ORDER BY `dtstart` ASC ",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + ' . intval($evdays) . ' days')),
|
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + ' . intval($evdays) . ' days')),
|
||||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
|
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
|
||||||
|
@ -459,14 +459,14 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||||
$str_now = datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d');
|
$str_now = datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d');
|
||||||
foreach($events as $x) {
|
foreach($events as $x) {
|
||||||
$bd = false;
|
$bd = false;
|
||||||
if($x['type'] === 'birthday') {
|
if($x['etype'] === 'birthday') {
|
||||||
$result['birthdays'] ++;
|
$result['birthdays'] ++;
|
||||||
$bd = true;
|
$bd = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$result['events'] ++;
|
$result['events'] ++;
|
||||||
}
|
}
|
||||||
if(datetime_convert('UTC', ((intval($x['adjust'])) ? date_default_timezone_get() : 'UTC'), $x['start'], 'Y-m-d') === $str_now) {
|
if(datetime_convert('UTC', ((intval($x['adjust'])) ? date_default_timezone_get() : 'UTC'), $x['dtstart'], 'Y-m-d') === $str_now) {
|
||||||
$result['all_events_today'] ++;
|
$result['all_events_today'] ++;
|
||||||
if($bd)
|
if($bd)
|
||||||
$result['birthdays_today'] ++;
|
$result['birthdays_today'] ++;
|
||||||
|
|
|
@ -115,7 +115,7 @@ class Poke extends \Zotlabs\Web\Controller {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$arr['object'] = json_encode($obj);
|
$arr['obj'] = json_encode($obj);
|
||||||
|
|
||||||
$arr['item_origin'] = 1;
|
$arr['item_origin'] = 1;
|
||||||
$arr['item_wall'] = 1;
|
$arr['item_wall'] = 1;
|
||||||
|
|
|
@ -93,7 +93,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
$srcW = $_POST['xfinal'] - $srcX;
|
$srcW = $_POST['xfinal'] - $srcX;
|
||||||
$srcH = $_POST['yfinal'] - $srcY;
|
$srcH = $_POST['yfinal'] - $srcY;
|
||||||
|
|
||||||
$r = q("SELECT * FROM photo WHERE resource_id = '%s' AND uid = %d AND scale = %d LIMIT 1",
|
$r = q("SELECT * FROM photo WHERE resource_id = '%s' AND uid = %d AND imgscale = %d LIMIT 1",
|
||||||
dbesc($image_id),
|
dbesc($image_id),
|
||||||
dbesc(local_channel()),
|
dbesc(local_channel()),
|
||||||
intval($scale));
|
intval($scale));
|
||||||
|
@ -101,9 +101,9 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
if($r) {
|
if($r) {
|
||||||
|
|
||||||
$base_image = $r[0];
|
$base_image = $r[0];
|
||||||
$base_image['data'] = (($r[0]['os_storage']) ? @file_get_contents($base_image['data']) : dbunescbin($base_image['data']));
|
$base_image['content'] = (($r[0]['os_storage']) ? @file_get_contents($base_image['content']) : dbunescbin($base_image['content']));
|
||||||
|
|
||||||
$im = photo_factory($base_image['data'], $base_image['type']);
|
$im = photo_factory($base_image['content'], $base_image['mimetype']);
|
||||||
if($im->is_valid()) {
|
if($im->is_valid()) {
|
||||||
|
|
||||||
$im->cropImage(300,$srcX,$srcY,$srcW,$srcH);
|
$im->cropImage(300,$srcX,$srcY,$srcW,$srcH);
|
||||||
|
@ -113,25 +113,25 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
$p = array('aid' => $aid, 'uid' => local_channel(), 'resource_id' => $base_image['resource_id'],
|
$p = array('aid' => $aid, 'uid' => local_channel(), 'resource_id' => $base_image['resource_id'],
|
||||||
'filename' => $base_image['filename'], 'album' => t('Profile Photos'));
|
'filename' => $base_image['filename'], 'album' => t('Profile Photos'));
|
||||||
|
|
||||||
$p['scale'] = 4;
|
$p['imgscale'] = 4;
|
||||||
$p['photo_usage'] = (($is_default_profile) ? PHOTO_PROFILE : PHOTO_NORMAL);
|
$p['photo_usage'] = (($is_default_profile) ? PHOTO_PROFILE : PHOTO_NORMAL);
|
||||||
|
|
||||||
$r1 = $im->save($p);
|
$r1 = $im->save($p);
|
||||||
|
|
||||||
$im->scaleImage(80);
|
$im->scaleImage(80);
|
||||||
$p['scale'] = 5;
|
$p['imgscale'] = 5;
|
||||||
|
|
||||||
$r2 = $im->save($p);
|
$r2 = $im->save($p);
|
||||||
|
|
||||||
$im->scaleImage(48);
|
$im->scaleImage(48);
|
||||||
$p['scale'] = 6;
|
$p['imgscale'] = 6;
|
||||||
|
|
||||||
$r3 = $im->save($p);
|
$r3 = $im->save($p);
|
||||||
|
|
||||||
if($r1 === false || $r2 === false || $r3 === false) {
|
if($r1 === false || $r2 === false || $r3 === false) {
|
||||||
// if one failed, delete them all so we can start over.
|
// if one failed, delete them all so we can start over.
|
||||||
notice( t('Image resize failed.') . EOL );
|
notice( t('Image resize failed.') . EOL );
|
||||||
$x = q("delete from photo where resource_id = '%s' and uid = %d and scale >= 4 ",
|
$x = q("delete from photo where resource_id = '%s' and uid = %d and imgscale >= 4 ",
|
||||||
dbesc($base_image['resource_id']),
|
dbesc($base_image['resource_id']),
|
||||||
local_channel()
|
local_channel()
|
||||||
);
|
);
|
||||||
|
@ -208,7 +208,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
logger('attach_store: ' . print_r($res,true));
|
logger('attach_store: ' . print_r($res,true));
|
||||||
|
|
||||||
if($res && intval($res['data']['is_photo'])) {
|
if($res && intval($res['data']['is_photo'])) {
|
||||||
$i = q("select * from photo where resource_id = '%s' and uid = %d order by scale",
|
$i = q("select * from photo where resource_id = '%s' and uid = %d order by imgscale",
|
||||||
dbesc($hash),
|
dbesc($hash),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
@ -220,11 +220,11 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
$os_storage = false;
|
$os_storage = false;
|
||||||
|
|
||||||
foreach($i as $ii) {
|
foreach($i as $ii) {
|
||||||
if(intval($ii['scale']) < 2) {
|
if(intval($ii['imgscale']) < 2) {
|
||||||
$smallest = intval($ii['scale']);
|
$smallest = intval($ii['imgscale']);
|
||||||
$os_storage = intval($ii['os_storage']);
|
$os_storage = intval($ii['os_storage']);
|
||||||
$imagedata = $ii['data'];
|
$imagedata = $ii['content'];
|
||||||
$filetype = $ii['type'];
|
$filetype = $ii['mimetype'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
function get() {
|
function get() {
|
||||||
|
|
||||||
if(! local_channel()) {
|
if(! local_channel()) {
|
||||||
notice( t('Permission denied.') . EOL );
|
notice( t('Permission denied.') . EOL );
|
||||||
|
@ -275,7 +275,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
$resource_id = argv(2);
|
$resource_id = argv(2);
|
||||||
|
|
||||||
|
|
||||||
$r = q("SELECT id, album, scale FROM photo WHERE uid = %d AND resource_id = '%s' ORDER BY scale ASC",
|
$r = q("SELECT id, album, imgscale FROM photo WHERE uid = %d AND resource_id = '%s' ORDER BY imgscale ASC",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
dbesc($resource_id)
|
dbesc($resource_id)
|
||||||
);
|
);
|
||||||
|
@ -285,7 +285,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
}
|
}
|
||||||
$havescale = false;
|
$havescale = false;
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
if($rr['scale'] == 5)
|
if($rr['imgscale'] == 5)
|
||||||
$havescale = true;
|
$havescale = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
goaway(z_root() . '/profiles');
|
goaway(z_root() . '/profiles');
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT `data`, `type`, resource_id, os_storage FROM photo WHERE id = %d and uid = %d limit 1",
|
$r = q("SELECT content, mimetype, resource_id, os_storage FROM photo WHERE id = %d and uid = %d limit 1",
|
||||||
intval($r[0]['id']),
|
intval($r[0]['id']),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
|
|
||||||
|
@ -326,15 +326,15 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(intval($r[0]['os_storage']))
|
if(intval($r[0]['os_storage']))
|
||||||
$data = @file_get_contents($r[0]['data']);
|
$data = @file_get_contents($r[0]['content']);
|
||||||
else
|
else
|
||||||
$data = dbunescbin($r[0]['data']);
|
$data = dbunescbin($r[0]['content']);
|
||||||
|
|
||||||
$ph = photo_factory($data, $r[0]['type']);
|
$ph = photo_factory($data, $r[0]['mimetype']);
|
||||||
$smallest = 0;
|
$smallest = 0;
|
||||||
if($ph->is_valid()) {
|
if($ph->is_valid()) {
|
||||||
// go ahead as if we have just uploaded a new photo to crop
|
// go ahead as if we have just uploaded a new photo to crop
|
||||||
$i = q("select resource_id, scale from photo where resource_id = '%s' and uid = %d order by scale",
|
$i = q("select resource_id, imgscale from photo where resource_id = '%s' and uid = %d order by imgscale",
|
||||||
dbesc($r[0]['resource_id']),
|
dbesc($r[0]['resource_id']),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
@ -342,8 +342,8 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
||||||
if($i) {
|
if($i) {
|
||||||
$hash = $i[0]['resource_id'];
|
$hash = $i[0]['resource_id'];
|
||||||
foreach($i as $ii) {
|
foreach($i as $ii) {
|
||||||
if(intval($ii['scale']) < 2) {
|
if(intval($ii['imgscale']) < 2) {
|
||||||
$smallest = intval($ii['scale']);
|
$smallest = intval($ii['imgscale']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
51
Zotlabs/Module/React.php
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Zotlabs\Module;
|
||||||
|
|
||||||
|
|
||||||
|
class React extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
|
function get() {
|
||||||
|
if(! local_channel())
|
||||||
|
return;
|
||||||
|
|
||||||
|
$postid = $_REQUEST['postid'];
|
||||||
|
|
||||||
|
if(! $postid)
|
||||||
|
return;
|
||||||
|
|
||||||
|
$emoji = $_REQUEST['emoji'];
|
||||||
|
if($_REQUEST['emoji']) {
|
||||||
|
|
||||||
|
$i = q("select * from item where id = %d and uid = %d",
|
||||||
|
intval($postid),
|
||||||
|
intval(local_channel())
|
||||||
|
);
|
||||||
|
|
||||||
|
if(! $i)
|
||||||
|
return;
|
||||||
|
|
||||||
|
$channel = \App::get_channel();
|
||||||
|
|
||||||
|
$n = array();
|
||||||
|
$n['aid'] = $channel['channel_account_id'];
|
||||||
|
$n['uid'] = $channel['channel_id'];
|
||||||
|
$n['item_origin'] = true;
|
||||||
|
$n['parent'] = $postid;
|
||||||
|
$n['parent_mid'] = $i[0]['mid'];
|
||||||
|
$n['mid'] = item_message_id();
|
||||||
|
$n['verb'] = ACTIVITY_REACT . '#' . $emoji;
|
||||||
|
$n['body'] = "\n\n[zmg]" . z_root() . '/images/emoji/' . $emoji . '.png[/zmg]' . "\n\n";
|
||||||
|
$n['author_xchan'] = $channel['channel_hash'];
|
||||||
|
|
||||||
|
$x = item_store($n);
|
||||||
|
if($x['success']) {
|
||||||
|
$nid = $x['item_id'];
|
||||||
|
\Zotlabs\Daemon\Master::Summon(array('Notifier','like',$nid));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -48,7 +48,7 @@ class Share extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$is_photo = (($r[0]['obj_type'] === ACTIVITY_OBJ_PHOTO) ? true : false);
|
$is_photo = (($r[0]['obj_type'] === ACTIVITY_OBJ_PHOTO) ? true : false);
|
||||||
if($is_photo) {
|
if($is_photo) {
|
||||||
$object = json_decode($r[0]['object'],true);
|
$object = json_decode($r[0]['obj'],true);
|
||||||
$photo_bb = $object['body'];
|
$photo_bb = $object['body'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ class Sharedwithme extends \Zotlabs\Web\Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
//list files
|
//list files
|
||||||
$r = q("SELECT id, uid, object, item_unseen FROM item WHERE verb = '%s' AND obj_type = '%s' AND uid = %d AND owner_xchan != '%s'",
|
$r = q("SELECT id, uid, obj, item_unseen FROM item WHERE verb = '%s' AND obj_type = '%s' AND uid = %d AND owner_xchan != '%s'",
|
||||||
dbesc(ACTIVITY_POST),
|
dbesc(ACTIVITY_POST),
|
||||||
dbesc(ACTIVITY_OBJ_FILE),
|
dbesc(ACTIVITY_OBJ_FILE),
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
|
@ -59,7 +59,7 @@ class Sharedwithme extends \Zotlabs\Web\Controller {
|
||||||
if($r) {
|
if($r) {
|
||||||
|
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$object = json_decode($rr['object'],true);
|
$object = json_decode($rr['obj'],true);
|
||||||
|
|
||||||
$item = array();
|
$item = array();
|
||||||
$item['id'] = $rr['id'];
|
$item['id'] = $rr['id'];
|
||||||
|
|
|
@ -144,7 +144,7 @@ class Subthread extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$arr['verb'] = $activity;
|
$arr['verb'] = $activity;
|
||||||
$arr['obj_type'] = $objtype;
|
$arr['obj_type'] = $objtype;
|
||||||
$arr['object'] = $obj;
|
$arr['obj'] = $obj;
|
||||||
|
|
||||||
$arr['allow_cid'] = $item['allow_cid'];
|
$arr['allow_cid'] = $item['allow_cid'];
|
||||||
$arr['allow_gid'] = $item['allow_gid'];
|
$arr['allow_gid'] = $item['allow_gid'];
|
||||||
|
|
|
@ -124,7 +124,7 @@ class Tagger extends \Zotlabs\Web\Controller {
|
||||||
$arr['tgt_type'] = $targettype;
|
$arr['tgt_type'] = $targettype;
|
||||||
$arr['target'] = $target;
|
$arr['target'] = $target;
|
||||||
$arr['obj_type'] = $objtype;
|
$arr['obj_type'] = $objtype;
|
||||||
$arr['object'] = $obj;
|
$arr['obj'] = $obj;
|
||||||
$arr['parent_mid'] = $item['mid'];
|
$arr['parent_mid'] = $item['mid'];
|
||||||
|
|
||||||
store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_COMMUNITYTAG,$term,$tagid);
|
store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_COMMUNITYTAG,$term,$tagid);
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Tasks extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
if((argc() > 2) && (argv(1) === 'complete') && intval(argv(2))) {
|
if((argc() > 2) && (argv(1) === 'complete') && intval(argv(2))) {
|
||||||
$ret = array('success' => false);
|
$ret = array('success' => false);
|
||||||
$r = q("select * from event where `type` = 'task' and uid = %d and id = %d limit 1",
|
$r = q("select * from event where `etype` = 'task' and uid = %d and id = %d limit 1",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
intval(argv(2))
|
intval(argv(2))
|
||||||
);
|
);
|
||||||
|
@ -80,9 +80,9 @@ class Tasks extends \Zotlabs\Web\Controller {
|
||||||
$event['account'] = $channel['channel_account_id'];
|
$event['account'] = $channel['channel_account_id'];
|
||||||
$event['uid'] = $channel['channel_id'];
|
$event['uid'] = $channel['channel_id'];
|
||||||
$event['event_xchan'] = $channel['channel_hash'];
|
$event['event_xchan'] = $channel['channel_hash'];
|
||||||
$event['type'] = 'task';
|
$event['etype'] = 'task';
|
||||||
$event['nofinish'] = true;
|
$event['nofinish'] = true;
|
||||||
$event['created'] = $event['edited'] = $event['start'] = datetime_convert();
|
$event['created'] = $event['edited'] = $event['dtstart'] = datetime_convert();
|
||||||
$event['adjust'] = 1;
|
$event['adjust'] = 1;
|
||||||
$event['allow_cid'] = '<' . $channel['channel_hash'] . '>';
|
$event['allow_cid'] = '<' . $channel['channel_hash'] . '>';
|
||||||
$event['summary'] = escape_tags($_REQUEST['summary']);
|
$event['summary'] = escape_tags($_REQUEST['summary']);
|
||||||
|
@ -92,21 +92,13 @@ class Tasks extends \Zotlabs\Web\Controller {
|
||||||
else
|
else
|
||||||
$x = array('success' => false);
|
$x = array('success' => false);
|
||||||
json_return_and_die($x);
|
json_return_and_die($x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function get() {
|
|
||||||
|
|
||||||
if(! local_channel())
|
if(! local_channel())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,7 +212,7 @@ class Thing extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
$arr['verb'] = $verb;
|
$arr['verb'] = $verb;
|
||||||
$arr['obj_type'] = $objtype;
|
$arr['obj_type'] = $objtype;
|
||||||
$arr['object'] = $obj;
|
$arr['obj'] = $obj;
|
||||||
|
|
||||||
if(! $profile['is_default']) {
|
if(! $profile['is_default']) {
|
||||||
$arr['item_private'] = true;
|
$arr['item_private'] = true;
|
||||||
|
|
|
@ -246,7 +246,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota {
|
||||||
$deny_gid = $c[0]['channel_deny_gid'];
|
$deny_gid = $c[0]['channel_deny_gid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("INSERT INTO attach ( aid, uid, hash, creator, filename, folder, os_storage, filetype, filesize, revision, is_photo, data, created, edited, allow_cid, allow_gid, deny_cid, deny_gid )
|
$r = q("INSERT INTO attach ( aid, uid, hash, creator, filename, folder, os_storage, filetype, filesize, revision, is_photo, content, created, edited, allow_cid, allow_gid, deny_cid, deny_gid )
|
||||||
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
|
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
|
||||||
intval($c[0]['channel_account_id']),
|
intval($c[0]['channel_account_id']),
|
||||||
intval($c[0]['channel_id']),
|
intval($c[0]['channel_id']),
|
||||||
|
|
|
@ -124,7 +124,7 @@ class File extends DAV\Node implements DAV\IFile {
|
||||||
);
|
);
|
||||||
if ($r) {
|
if ($r) {
|
||||||
if (intval($r[0]['os_storage'])) {
|
if (intval($r[0]['os_storage'])) {
|
||||||
$d = q("select folder, data from attach where hash = '%s' and uid = %d limit 1",
|
$d = q("select folder, content from attach where hash = '%s' and uid = %d limit 1",
|
||||||
dbesc($this->data['hash']),
|
dbesc($this->data['hash']),
|
||||||
intval($c[0]['channel_id'])
|
intval($c[0]['channel_id'])
|
||||||
);
|
);
|
||||||
|
@ -139,7 +139,7 @@ class File extends DAV\Node implements DAV\IFile {
|
||||||
$direct = $f1[0];
|
$direct = $f1[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$fname = dbunescbin($d[0]['data']);
|
$fname = dbunescbin($d[0]['content']);
|
||||||
if(strpos($fname,'store') === false)
|
if(strpos($fname,'store') === false)
|
||||||
$f = 'store/' . $this->auth->owner_nick . '/' . $fname ;
|
$f = 'store/' . $this->auth->owner_nick . '/' . $fname ;
|
||||||
else
|
else
|
||||||
|
@ -158,12 +158,12 @@ class File extends DAV\Node implements DAV\IFile {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// this shouldn't happen any more
|
// this shouldn't happen any more
|
||||||
$r = q("UPDATE attach SET data = '%s' WHERE hash = '%s' AND uid = %d",
|
$r = q("UPDATE attach SET content = '%s' WHERE hash = '%s' AND uid = %d",
|
||||||
dbescbin(stream_get_contents($data)),
|
dbescbin(stream_get_contents($data)),
|
||||||
dbesc($this->data['hash']),
|
dbesc($this->data['hash']),
|
||||||
intval($this->data['uid'])
|
intval($this->data['uid'])
|
||||||
);
|
);
|
||||||
$r = q("SELECT length(data) AS fsize FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1",
|
$r = q("SELECT length(content) AS fsize FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1",
|
||||||
dbesc($this->data['hash']),
|
dbesc($this->data['hash']),
|
||||||
intval($this->data['uid'])
|
intval($this->data['uid'])
|
||||||
);
|
);
|
||||||
|
@ -236,7 +236,7 @@ class File extends DAV\Node implements DAV\IFile {
|
||||||
logger('get file ' . basename($this->name), LOGGER_DEBUG);
|
logger('get file ' . basename($this->name), LOGGER_DEBUG);
|
||||||
logger('os_path: ' . $this->os_path, LOGGER_DATA);
|
logger('os_path: ' . $this->os_path, LOGGER_DATA);
|
||||||
|
|
||||||
$r = q("SELECT data, flags, os_storage, filename, filetype FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1",
|
$r = q("SELECT content, flags, os_storage, filename, filetype FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1",
|
||||||
dbesc($this->data['hash']),
|
dbesc($this->data['hash']),
|
||||||
intval($this->data['uid'])
|
intval($this->data['uid'])
|
||||||
);
|
);
|
||||||
|
@ -250,14 +250,14 @@ class File extends DAV\Node implements DAV\IFile {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intval($r[0]['os_storage'])) {
|
if (intval($r[0]['os_storage'])) {
|
||||||
$x = dbunescbin($r[0]['data']);
|
$x = dbunescbin($r[0]['content']);
|
||||||
if(strpos($x,'store') === false)
|
if(strpos($x,'store') === false)
|
||||||
$f = 'store/' . $this->auth->owner_nick . '/' . (($this->os_path) ? $this->os_path . '/' : '') . $x;
|
$f = 'store/' . $this->auth->owner_nick . '/' . (($this->os_path) ? $this->os_path . '/' : '') . $x;
|
||||||
else
|
else
|
||||||
$f = $x;
|
$f = $x;
|
||||||
return fopen($f, 'rb');
|
return fopen($f, 'rb');
|
||||||
}
|
}
|
||||||
return dbunescbin($r[0]['data']);
|
return dbunescbin($r[0]['content']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
7
boot.php
|
@ -45,10 +45,10 @@ require_once('include/account.php');
|
||||||
|
|
||||||
|
|
||||||
define ( 'PLATFORM_NAME', 'hubzilla' );
|
define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||||
define ( 'STD_VERSION', '1.7.2' );
|
define ( 'STD_VERSION', '1.7.3' );
|
||||||
define ( 'ZOT_REVISION', 1.1 );
|
define ( 'ZOT_REVISION', 1.1 );
|
||||||
|
|
||||||
define ( 'DB_UPDATE_VERSION', 1173 );
|
define ( 'DB_UPDATE_VERSION', 1176 );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -473,6 +473,7 @@ define ( 'NAMESPACE_YMEDIA', 'http://search.yahoo.com/mrss/' );
|
||||||
* activity stream defines
|
* activity stream defines
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
define ( 'ACTIVITY_REACT', NAMESPACE_ZOT . '/activity/react' );
|
||||||
define ( 'ACTIVITY_LIKE', NAMESPACE_ACTIVITY_SCHEMA . 'like' );
|
define ( 'ACTIVITY_LIKE', NAMESPACE_ACTIVITY_SCHEMA . 'like' );
|
||||||
define ( 'ACTIVITY_DISLIKE', NAMESPACE_ZOT . '/activity/dislike' );
|
define ( 'ACTIVITY_DISLIKE', NAMESPACE_ZOT . '/activity/dislike' );
|
||||||
define ( 'ACTIVITY_AGREE', NAMESPACE_ZOT . '/activity/agree' );
|
define ( 'ACTIVITY_AGREE', NAMESPACE_ZOT . '/activity/agree' );
|
||||||
|
@ -865,7 +866,7 @@ class App {
|
||||||
/**
|
/**
|
||||||
* App constructor.
|
* App constructor.
|
||||||
*/
|
*/
|
||||||
function init() {
|
public static function init() {
|
||||||
// we'll reset this after we read our config file
|
// we'll reset this after we read our config file
|
||||||
date_default_timezone_set('UTC');
|
date_default_timezone_set('UTC');
|
||||||
|
|
||||||
|
|
BIN
images/emoji/0023-20e3.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
images/emoji/0023.png
Normal file
After Width: | Height: | Size: 634 B |
BIN
images/emoji/002a-20e3.png
Normal file
After Width: | Height: | Size: 627 B |
BIN
images/emoji/002a.png
Normal file
After Width: | Height: | Size: 645 B |
BIN
images/emoji/0030-20e3.png
Normal file
After Width: | Height: | Size: 560 B |
BIN
images/emoji/0030.png
Normal file
After Width: | Height: | Size: 573 B |
BIN
images/emoji/0031-20e3.png
Normal file
After Width: | Height: | Size: 442 B |
BIN
images/emoji/0031.png
Normal file
After Width: | Height: | Size: 505 B |
BIN
images/emoji/0032-20e3.png
Normal file
After Width: | Height: | Size: 567 B |
BIN
images/emoji/0032.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
images/emoji/0033-20e3.png
Normal file
After Width: | Height: | Size: 602 B |
BIN
images/emoji/0033.png
Normal file
After Width: | Height: | Size: 644 B |
BIN
images/emoji/0034-20e3.png
Normal file
After Width: | Height: | Size: 497 B |
BIN
images/emoji/0034.png
Normal file
After Width: | Height: | Size: 542 B |
BIN
images/emoji/0035-20e3.png
Normal file
After Width: | Height: | Size: 577 B |
BIN
images/emoji/0035.png
Normal file
After Width: | Height: | Size: 615 B |
BIN
images/emoji/0036-20e3.png
Normal file
After Width: | Height: | Size: 612 B |
BIN
images/emoji/0036.png
Normal file
After Width: | Height: | Size: 649 B |
BIN
images/emoji/0037-20e3.png
Normal file
After Width: | Height: | Size: 522 B |
BIN
images/emoji/0037.png
Normal file
After Width: | Height: | Size: 559 B |
BIN
images/emoji/0038-20e3.png
Normal file
After Width: | Height: | Size: 608 B |
BIN
images/emoji/0038.png
Normal file
After Width: | Height: | Size: 646 B |
BIN
images/emoji/0039-20e3.png
Normal file
After Width: | Height: | Size: 607 B |
BIN
images/emoji/0039.png
Normal file
After Width: | Height: | Size: 654 B |
BIN
images/emoji/00a9.png
Normal file
After Width: | Height: | Size: 530 B |
BIN
images/emoji/00ae.png
Normal file
After Width: | Height: | Size: 547 B |
BIN
images/emoji/1f004.png
Normal file
After Width: | Height: | Size: 951 B |
BIN
images/emoji/1f0cf.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/emoji/1f170.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
images/emoji/1f171.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
images/emoji/1f17e.png
Normal file
After Width: | Height: | Size: 425 B |
BIN
images/emoji/1f17f.png
Normal file
After Width: | Height: | Size: 385 B |
BIN
images/emoji/1f18e.png
Normal file
After Width: | Height: | Size: 505 B |
BIN
images/emoji/1f191.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
images/emoji/1f192.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
images/emoji/1f193.png
Normal file
After Width: | Height: | Size: 370 B |
BIN
images/emoji/1f194.png
Normal file
After Width: | Height: | Size: 348 B |
BIN
images/emoji/1f195.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
images/emoji/1f196.png
Normal file
After Width: | Height: | Size: 445 B |
BIN
images/emoji/1f197.png
Normal file
After Width: | Height: | Size: 511 B |
BIN
images/emoji/1f198.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
images/emoji/1f199.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
images/emoji/1f19a.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
images/emoji/1f1e6-1f1e8.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
images/emoji/1f1e6-1f1e9.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/emoji/1f1e6-1f1ea.png
Normal file
After Width: | Height: | Size: 544 B |
BIN
images/emoji/1f1e6-1f1eb.png
Normal file
After Width: | Height: | Size: 942 B |
BIN
images/emoji/1f1e6-1f1ec.png
Normal file
After Width: | Height: | Size: 913 B |
BIN
images/emoji/1f1e6-1f1ee.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
images/emoji/1f1e6-1f1f1.png
Normal file
After Width: | Height: | Size: 905 B |
BIN
images/emoji/1f1e6-1f1f2.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
images/emoji/1f1e6-1f1f4.png
Normal file
After Width: | Height: | Size: 997 B |
BIN
images/emoji/1f1e6-1f1f6.png
Normal file
After Width: | Height: | Size: 657 B |
BIN
images/emoji/1f1e6-1f1f7.png
Normal file
After Width: | Height: | Size: 975 B |
BIN
images/emoji/1f1e6-1f1f8.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
images/emoji/1f1e6-1f1f9.png
Normal file
After Width: | Height: | Size: 430 B |
BIN
images/emoji/1f1e6-1f1fa.png
Normal file
After Width: | Height: | Size: 962 B |
BIN
images/emoji/1f1e6-1f1fc.png
Normal file
After Width: | Height: | Size: 709 B |
BIN
images/emoji/1f1e6-1f1fd.png
Normal file
After Width: | Height: | Size: 496 B |
BIN
images/emoji/1f1e6-1f1ff.png
Normal file
After Width: | Height: | Size: 709 B |
BIN
images/emoji/1f1e7-1f1e6.png
Normal file
After Width: | Height: | Size: 848 B |
BIN
images/emoji/1f1e7-1f1e7.png
Normal file
After Width: | Height: | Size: 789 B |
BIN
images/emoji/1f1e7-1f1e9.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
images/emoji/1f1e7-1f1ea.png
Normal file
After Width: | Height: | Size: 444 B |
BIN
images/emoji/1f1e7-1f1eb.png
Normal file
After Width: | Height: | Size: 717 B |
BIN
images/emoji/1f1e7-1f1ec.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
images/emoji/1f1e7-1f1ed.png
Normal file
After Width: | Height: | Size: 593 B |
BIN
images/emoji/1f1e7-1f1ee.png
Normal file
After Width: | Height: | Size: 795 B |
BIN
images/emoji/1f1e7-1f1ef.png
Normal file
After Width: | Height: | Size: 554 B |