Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: mod/photos.php mod/siteinfo.php
This commit is contained in:
commit
65661b7ec3
@ -455,13 +455,13 @@ function photos_album_rename($channel_id, $oldname, $newname) {
|
||||
function photos_album_get_db_idstr($channel_id, $album, $remote_xchan = '') {
|
||||
|
||||
if ($remote_xchan) {
|
||||
$r = q("SELECT distinct resource_id as from photo where xchan = '%s' and uid = %d and album = '%s' ",
|
||||
$r = q("SELECT distinct resource_id from photo where xchan = '%s' and uid = %d and album = '%s' ",
|
||||
dbesc($remote_xchan),
|
||||
intval($channel_id),
|
||||
dbesc($album)
|
||||
);
|
||||
} else {
|
||||
$r = q("SELECT distinct resource_id from photo where uid = %d and album = '%s' ",
|
||||
$r = q("SELECT distinct resource_id from photo where uid = %d and album = '%s' ",
|
||||
intval($channel_id),
|
||||
dbesc($album)
|
||||
);
|
||||
|
@ -7,6 +7,7 @@ require_once('include/bbcode.php');
|
||||
require_once('include/security.php');
|
||||
require_once('include/Contact.php');
|
||||
require_once('include/attach.php');
|
||||
require_once('include/text.php');
|
||||
|
||||
|
||||
function photos_init(&$a) {
|
||||
@ -334,6 +335,17 @@ function photos_post(&$a) {
|
||||
intval($item_id)
|
||||
);
|
||||
|
||||
// make sure the attach has the same permissions as the photo regardless of any other changes
|
||||
$x = q("update attach set allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s' where hash = '%s' and uid = %d and is_photo = 1",
|
||||
dbesc($str_contact_allow),
|
||||
dbesc($str_group_allow),
|
||||
dbesc($str_contact_deny),
|
||||
dbesc($str_group_deny),
|
||||
dbesc($resource_id),
|
||||
intval($page_owner_uid)
|
||||
);
|
||||
|
||||
|
||||
|
||||
if(strlen($rawtags)) {
|
||||
|
||||
@ -396,10 +408,21 @@ function photos_post(&$a) {
|
||||
* default post action - upload a photo
|
||||
*/
|
||||
|
||||
$channel = $a->data['channel'];
|
||||
$observer = $a->data['observer'];
|
||||
|
||||
$_REQUEST['source'] = 'photos';
|
||||
require_once('include/attach.php');
|
||||
|
||||
if(!local_channel()) {
|
||||
$_REQUEST['contact_allow'] = expand_acl($channel['channel_allow_cid']);
|
||||
$_REQUEST['group_allow'] = expand_acl($channel['channel_allow_gid']);
|
||||
$_REQUEST['contact_deny'] = expand_acl($channel['channel_deny_cid']);
|
||||
$_REQUEST['group_deny'] = expand_acl($channel['channel_deny_gid']);
|
||||
}
|
||||
|
||||
$r = attach_store($a->channel,get_observer_hash(), $_REQUEST);
|
||||
|
||||
if(! $r['success']) {
|
||||
notice($r['message'] . EOL);
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ function siteinfo_content(&$a) {
|
||||
'$visit' => t('Please visit <a href="https://redmatrix.me">redmatrix.me</a> to learn more about $Projectname.'),
|
||||
'$bug_text' => t('Bug reports and issues: please visit'),
|
||||
'$bug_link_url' => 'https://github.com/redmatrix/hubzilla/issues',
|
||||
'$bug_link_text' => '$projectname issues',
|
||||
'$bug_link_text' => t('$projectname issues'),
|
||||
'$contact' => t('Suggestions, praise, etc. - please email "redmatrix" at librelist - dot com'),
|
||||
'$donate' => $donate,
|
||||
'$adminlabel' => t('Site Administrators'),
|
||||
|
Reference in New Issue
Block a user