]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'master' into notify
authorfriendica <info@friendica.com>
Thu, 22 Dec 2011 23:42:01 +0000 (15:42 -0800)
committerfriendica <info@friendica.com>
Thu, 22 Dec 2011 23:42:01 +0000 (15:42 -0800)
1  2 
boot.php
mod/profile.php

diff --combined boot.php
index 522eee2e174971f3c721e159cf97d5b477ac7048,adca90bd597c594ba4c435b421aaec61d6bd680f..2c12ed508569d94e767ad206e21483aa82dbd5ed
+++ b/boot.php
@@@ -9,9 -9,9 +9,9 @@@ require_once('include/nav.php')
  require_once('include/cache.php');
  
  define ( 'FRIENDICA_PLATFORM',     'Friendica');
- define ( 'FRIENDICA_VERSION',      '2.3.1193' );
+ define ( 'FRIENDICA_VERSION',      '2.3.1203' );
  define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
- define ( 'DB_UPDATE_VERSION',      1111      );
+ define ( 'DB_UPDATE_VERSION',      1112      );
  
  define ( 'EOL',                    "<br />\r\n"     );
  define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@@ -830,7 -830,7 +830,7 @@@ function profile_load(&$a, $nickname, $
        }
  
        if(($r === false) || (! count($r))) {
 -              notice( t('No profile') . EOL );
 +              notice( t('Requested profile is not available.') . EOL );
                $a->error = 404;
                return;
        }
@@@ -1036,6 -1036,8 +1036,8 @@@ function get_birthdays() 
        if($r && count($r)) {
                $total = 0;
                $now = strtotime('now');
+               $cids = array();
                $istoday = false;
                foreach($r as $rr) {
                        if(strlen($rr['name']))
                        foreach($r as $rr) {
                                if(! strlen($rr['name']))
                                        continue;
+                               // avoid duplicates
+                               if(in_array($rr['cid'],$cids))
+                                       continue;
+                               $cids[] = $rr['cid'];
                                $today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false); 
                                $sparkle = '';
                                $url = $rr['url'];
diff --combined mod/profile.php
index a619703c608863efcf4afa4621c38bd68af41381,d2f9d7e29875bc0f7dad450b09eab08503041dcf..946499895bf4ab207b1ce1470523acbb2847a171
@@@ -7,15 -7,9 +7,15 @@@ function profile_init(&$a) 
        if($a->argc > 1)
                $which = $a->argv[1];
        else {
 -              notice( t('No profile') . EOL );
 -              $a->error = 404;
 -              return;
 +              $r = q("select nickname from user where blocked = 0 and account_expired = 0 and verified = 1 order by rand() limit 1");
 +              if(count($r)) {
 +                      $which = $r[0]['nickname'];
 +              }
 +              else {
 +                      notice( t('Requested profile is not available.') . EOL );
 +                      $a->error = 404;
 +                      return;
 +              }
        }
  
        $profile = 0;
@@@ -38,7 -32,7 +38,7 @@@
  
        if(! $blocked) {
                $keywords = ((x($a->profile,'pub_keywords')) ? $a->profile['pub_keywords'] : '');
-               $keywords = str_replace(array(',',' ',',,'),array(' ',',',','),$keywords);
+               $keywords = str_replace(array('#',',',' ',',,'),array('',' ',',',','),$keywords);
                if(strlen($keywords))
                        $a->page['htmlhead'] .= '<meta name="keywords" content="' . $keywords . '" />' . "\r\n" ;
        }