aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Acl.php11
-rw-r--r--Zotlabs/Module/Photos.php6
-rw-r--r--Zotlabs/Module/Wiki.php8
3 files changed, 18 insertions, 7 deletions
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php
index 9b2be0fea..769b36ce4 100644
--- a/Zotlabs/Module/Acl.php
+++ b/Zotlabs/Module/Acl.php
@@ -21,7 +21,7 @@ class Acl extends \Zotlabs\Web\Controller {
function init() {
- // logger('mod_acl: ' . print_r($_REQUEST,true));
+ logger('mod_acl: ' . print_r($_REQUEST,true));
$start = (x($_REQUEST,'start') ? $_REQUEST['start'] : 0);
$count = (x($_REQUEST,'count') ? $_REQUEST['count'] : 500);
@@ -307,7 +307,7 @@ class Acl extends \Zotlabs\Web\Controller {
$contacts[] = array(
"photo" => $g['photo'],
"name" => $g['name'],
- "nick" => $g['address'],
+ "nick" => $g['address']
);
}
}
@@ -330,7 +330,12 @@ class Acl extends \Zotlabs\Web\Controller {
continue;
$g['hash'] = urlencode($g['hash']);
-
+
+ if(! $g['nick']) {
+ $t = explode(' ',strtolower($g['name']));
+ $g['nick'] = $t[0] . '@';
+ }
+
if(in_array($g['hash'],$permitted) && $type == 'c' && (! $noforums)) {
$contacts[] = array(
"type" => "c",
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index bb7079a6a..f86801fcc 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -1041,7 +1041,7 @@ class Photos extends \Zotlabs\Web\Controller {
$likebuttons = '';
- if($can_post || $can_comment) {
+ if($observer && ($can_post || $can_comment)) {
$likebuttons = [
'id' => $link_item['id'],
'likethis' => t("I like this \x28toggle\x29"),
@@ -1053,7 +1053,7 @@ class Photos extends \Zotlabs\Web\Controller {
$comments = '';
if(! count($r)) {
- if($can_post || $can_comment) {
+ if($observer && ($can_post || $can_comment)) {
$commentbox = replace_macros($cmnt_tpl,array(
'$return_path' => '',
'$mode' => 'photos',
@@ -1172,7 +1172,7 @@ class Photos extends \Zotlabs\Web\Controller {
}
- if($can_post || $can_comment) {
+ if($observer && ($can_post || $can_comment)) {
$commentbox = replace_macros($cmnt_tpl,array(
'$return_path' => '',
'$jsreload' => $return_url,
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index 6055b0b38..2668229ee 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -140,11 +140,16 @@ class Wiki extends \Zotlabs\Web\Controller {
$zip = new \ZipArchive;
$r = $zip->open($zip_filepath, \ZipArchive::CREATE);
if($r === true) {
- $i = q("select * from item where resource_type = 'nwikipage' and resource_id = '%s'",
+ $pages = [];
+ $i = q("select * from item where resource_type = 'nwikipage' and resource_id = '%s' order by revision desc",
dbesc($resource_id)
);
+
if($i) {
foreach($i as $iv) {
+ if(in_array($iv['mid'],$pages))
+ continue;
+
if($iv['mimetype'] === 'text/plain') {
$content = html_entity_decode($iv['body'],ENT_COMPAT,'UTF-8');
}
@@ -156,6 +161,7 @@ class Wiki extends \Zotlabs\Web\Controller {
}
$fname = get_iconfig($iv['id'],'nwikipage','pagetitle') . Zlib\NativeWikiPage::get_file_ext($iv);
$zip->addFromString($fname,$content);
+ $pages[] = $iv['mid'];
}