X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=466fe44d3e2c6b026f408085b9bfb52daae818fe;hb=c8704040d378c4ec90eadd42fde52f64596d3e02;hp=663d0a40cbaa8d1ec65cdddb3c61dd79bb0eb230;hpb=278433eac75639052686f70e98621466d6c44df3;p=friendica.git
diff --git a/mod/photos.php b/mod/photos.php
old mode 100644
new mode 100755
index 663d0a40cb..466fe44d3e
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -39,7 +39,7 @@ function photos_init(&$a) {
$o .= '';
$o .= '
';
}
if(! x($a->page,'aside'))
@@ -92,7 +98,7 @@ EOT;
function photos_post(&$a) {
- logger('mod-photos: photos_post(): begin' , 'LOGGER_DEBUG');
+ logger('mod-photos: photos_post: begin' , 'LOGGER_DEBUG');
logger('mod_photos: REQUEST ' . print_r($_REQUEST,true), LOGGER_DATA);
@@ -408,7 +414,18 @@ function photos_post(&$a) {
}
else {
$newname = $name;
- if(strstr($name,'_') || strstr($name,' ')) {
+ $alias = '';
+ $tagcid = 0;
+ if(strrpos($newname,'+'))
+ $tagcid = intval(substr($newname,strrpos($newname,'+') + 1));
+
+ if($tagcid) {
+ $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ intval($tagcid),
+ intval($profile_uid)
+ );
+ }
+ elseif(strstr($name,'_') || strstr($name,' ')) {
$newname = str_replace('_',' ',$name);
$r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1",
dbesc($newname),
@@ -581,8 +598,8 @@ function photos_post(&$a) {
$visible = 1;
else
$visible = 0;
-
- if(intval($_REQUEST['not_visible']))
+
+ if(intval($_REQUEST['not_visible']) || $_REQUEST['not_visible'] === 'true')
$visible = 0;
$str_group_allow = perms2str(((is_array($_REQUEST['group_allow'])) ? $_REQUEST['group_allow'] : explode(',',$_REQUEST['group_allow'])));
@@ -731,6 +748,7 @@ function photos_content(&$a) {
// URLs:
// photos/name
// photos/name/upload
+ // photos/name/upload/xxxxx (xxxxx is album name)
// photos/name/album/xxxxx
// photos/name/album/xxxxx/edit
// photos/name/image/xxxxx
@@ -847,14 +865,21 @@ function photos_content(&$a) {
notice( t('Permission denied.'));
return;
}
+
+
+ $selname = (($datum) ? hex2bin($datum) : '');
+
+
$albumselect = '