]> git.mxchange.org Git - friendica.git/blobdiff - mod/notes.php
Merge pull request #3797 from rabuzarus/20171015_-_duplicate_event
[friendica.git] / mod / notes.php
index b2aa5487af963e60d1b456dbf39ec1b258b20aea..d1810604ca514bd8ddbcf292e061701017dbf2e5 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
-function notes_init(App &$a) {
+use Friendica\App;
+
+function notes_init(App $a) {
 
        if (! local_user()) {
                return;
@@ -17,7 +19,7 @@ function notes_init(App &$a) {
 }
 
 
-function notes_content(&$a,$update = false) {
+function notes_content(App $a, $update = false) {
 
        if (! local_user()) {
                notice( t('Permission denied.') . EOL);
@@ -71,7 +73,7 @@ function notes_content(&$a,$update = false) {
 
        // default permissions - anonymous user
 
-       $sql_extra = " AND `allow_cid` = '<" . $a->contact['id'] . ">' ";
+       $sql_extra = " AND `item`.`allow_cid` = '<" . $a->contact['id'] . ">' ";
 
        $r = q("SELECT COUNT(*) AS `total`
                FROM `item` %s