Merge remote-tracking branch 'friendica/develop' into issue/#3062
# Conflicts: # view/theme/duepuntozero/theme.php # view/theme/smoothly/theme.php
This commit is contained in:
commit
b61479ba6e
166 changed files with 835 additions and 789 deletions
|
@ -10,7 +10,7 @@ require_once('include/tags.php');
|
|||
require_once('include/threads.php');
|
||||
require_once('include/Probe.php');
|
||||
|
||||
function photos_init(App &$a) {
|
||||
function photos_init(App $a) {
|
||||
|
||||
if ($a->argc > 1)
|
||||
auto_redir($a, $a->argv[1]);
|
||||
|
@ -112,7 +112,7 @@ function photos_init(App &$a) {
|
|||
|
||||
|
||||
|
||||
function photos_post(App &$a) {
|
||||
function photos_post(App $a) {
|
||||
|
||||
logger('mod-photos: photos_post: begin' , LOGGER_DEBUG);
|
||||
|
||||
|
@ -182,11 +182,11 @@ function photos_post(App &$a) {
|
|||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
$r = qu("SELECT count(*) FROM `photo` WHERE `album` = '%s' AND `uid` = %d",
|
||||
$r = qu("SELECT `album` FROM `photo` WHERE `album` = '%s' AND `uid` = %d",
|
||||
dbesc($album),
|
||||
intval($page_owner_uid)
|
||||
);
|
||||
if (! dbm::is_result($r)) {
|
||||
if (!dbm::is_result($r)) {
|
||||
notice( t('Album not found.') . EOL);
|
||||
goaway($_SESSION['photo_return']);
|
||||
return; // NOTREACHED
|
||||
|
@ -818,21 +818,22 @@ function photos_post(App &$a) {
|
|||
$imagedata = @file_get_contents($src);
|
||||
|
||||
|
||||
|
||||
$r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
|
||||
intval($a->data['user']['uid'])
|
||||
);
|
||||
|
||||
$limit = service_class_fetch($a->data['user']['uid'],'photo_upload_limit');
|
||||
|
||||
if (($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
|
||||
notice( upgrade_message() . EOL );
|
||||
@unlink($src);
|
||||
$foo = 0;
|
||||
call_hooks('photo_post_end',$foo);
|
||||
killme();
|
||||
}
|
||||
if ($limit) {
|
||||
$r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
|
||||
intval($a->data['user']['uid'])
|
||||
);
|
||||
$size = $r[0]['total'];
|
||||
|
||||
if (($size + strlen($imagedata)) > $limit) {
|
||||
notice( upgrade_message() . EOL );
|
||||
@unlink($src);
|
||||
$foo = 0;
|
||||
call_hooks('photo_post_end',$foo);
|
||||
killme();
|
||||
}
|
||||
}
|
||||
|
||||
$ph = new Photo($imagedata, $type);
|
||||
|
||||
|
@ -945,7 +946,7 @@ function photos_post(App &$a) {
|
|||
|
||||
|
||||
|
||||
function photos_content(App &$a) {
|
||||
function photos_content(App $a) {
|
||||
|
||||
// URLs:
|
||||
// photos/name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue