]> git.mxchange.org Git - friendica-addons.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorMichael Vogel <icarus@dabo.de>
Mon, 10 Dec 2012 22:34:28 +0000 (23:34 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 10 Dec 2012 22:34:28 +0000 (23:34 +0100)
forumlist.tgz
forumlist/forumlist.php
group_text/group_text.php

index cbcf0fbd82d4917b1c651b527d99c9beac1902ed..1f303145a19366d9c5b261966f6bbf5473136c16 100644 (file)
Binary files a/forumlist.tgz and b/forumlist.tgz differ
index 3a682446e5db2859ed65452c214bbc1e05a1235d..37752462912efccd9a70bc8fdb882b9bad5b5f94 100644 (file)
@@ -26,16 +26,20 @@ function forumlist_uninstall() {
 }
 
 
-function forumlist_getpage($uid,$showhidden = true,$randomise = false) {
+function forumlist_getpage($uid,$showhidden = true,$randomise = false, $showprivate = false) {
 
 
        $forumlist = array();
 
        $order = (($showhidden) ? '' : " and hidden = 0 ");
-       $order .= (($randomise) ? ' order by rand() ' : ' order by name asc ');
+        $order .= (($randomise) ? ' order by rand() ' : ' order by name asc ');
+        $select = "`forum` = 1";
+        if ($showprivate) {
+            $select = "( `forum` = 1 OR `prv` = 1 )";
+        }
 
        $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`name`, `contact`.`micro` from contact 
-                       WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d
+                       WHERE `network`= 'dfrn' AND $select AND `uid` = %d
                        and blocked = 0 and hidden = 0 and pending = 0 and archive = 0
                        $order ",
                        intval($uid)
@@ -66,7 +70,7 @@ function forumlist_network_mod_init($a,$b) {
 
        $randomise = intval(get_pconfig(local_user(),'forumlist','randomise'));
 
-       $contacts = forumlist_getpage($a->user['uid'],true,$randomise);
+       $contacts = forumlist_getpage($a->user['uid'],true,$randomise, true);
 
        if(count($contacts)) {
                foreach($contacts as $contact) {
@@ -99,7 +103,7 @@ function forumlist_profile_advanced($a,&$b) {
 
        $randomise = true;
 
-       $contacts = forumlist_getpage($a->user['uid'],false,$randomise);
+       $contacts = forumlist_getpage($a->user['uid'],false,$randomise,false);
 
        $total_shown = 0;
        $more = false;
@@ -122,7 +126,6 @@ function forumlist_profile_advanced($a,&$b) {
 function forumlist_plugin_settings_post($a,$post) {
        if(! local_user() || (! x($_POST,'forumlist-settings-submit')))
                return;
-
 //     set_pconfig(local_user(),'forumlist','max_forumlists',intval($_POST['forumlist_max_forumlists']));
        set_pconfig(local_user(),'forumlist','randomise',intval($_POST['forumlist_random']));
        set_pconfig(local_user(),'forumlist','show_on_profile',intval($_POST['forumlist_profile']));
index 151ff0ae982ed456e2a3b81bc243b181fb1a32eb..5ec5c9c2a97a6096915d439b6e498fe9ed07386e 100755 (executable)
@@ -43,7 +43,7 @@ function group_text_settings_post($a,$post) {
                return;
        set_pconfig(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
 
-       info( t('Editplain settings updated.') . EOL);
+       info( t('Group Text settings updated.') . EOL);
 }