]> git.mxchange.org Git - friendica.git/commitdiff
start on bug #227 - more to do
authorfriendica <info@friendica.com>
Sat, 26 Nov 2011 06:41:50 +0000 (22:41 -0800)
committerfriendica <info@friendica.com>
Sat, 26 Nov 2011 06:41:50 +0000 (22:41 -0800)
boot.php
include/dba.php
include/text.php
mod/events.php

index 640b0b8af92ef0a440d5b65e17efb6f899a0520b..ff5d238479ea1b052d17c96ba729da409d839411 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -9,7 +9,7 @@ require_once('include/nav.php');
 require_once('include/cache.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
-define ( 'FRIENDICA_VERSION',      '2.3.1175' );
+define ( 'FRIENDICA_VERSION',      '2.3.1176' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
 define ( 'DB_UPDATE_VERSION',      1105      );
 
index 70c27515c4499d268327285c7809183cc65a5890..e9d47cd1a00718cd742ffe066c0b2dfbc91e7501 100644 (file)
@@ -36,11 +36,19 @@ class dba {
                        }
                }
 
-               $this->db = @new mysqli($server,$user,$pass,$db);
-               if(! mysqli_connect_errno()) {
-                       $this->connected = true;
+               if(class_exists('mysqli')) {
+                       $this->db = @new mysqli($server,$user,$pass,$db);
+                       if(! mysqli_connect_errno()) {
+                               $this->connected = true;
+                       }
                }
                else {
+                       $this->db = mysql_connect($server,$user,$pass);
+                       if($this->db && mysql_select_db($db,$this->db)) {
+                               $this->connected = true;
+                       }
+               }
+               if(! $this->connected) {
                        $this->db = null;
                        if(! $install)
                                system_unavailable();
@@ -56,14 +64,19 @@ class dba {
                if((! $this->db) || (! $this->connected))
                        return false;
                
-               $result = @$this->db->query($sql);
+               if(class_exists('mysqli'))
+                       $result = @$this->db->query($sql);
+               else
+                       $result = @mysql_query($sql,$this->db);
 
                if($this->debug) {
 
                        $mesg = '';
 
-                       if($this->db->errno)
+                       if(class_exists('mysqli') && $this->db->errno)
                                logger('dba: ' . $this->db->error);
+                       else
+                               logger('dba: ' . mysql_error($this->db));
 
                        if($result === false)
                                $mesg = 'false';
index 08803cc9b7be5b54bb7f4b9ceb8b6e980e520939..c4fd76e3e8f904495fdfe36d6fd1a4b93517579c 100644 (file)
@@ -492,6 +492,9 @@ function get_tags($s) {
                        // ignore strictly numeric tags like #1
                        if((strpos($mtch,'#') === 0) && ctype_digit(substr($mtch,1)))
                                continue;
+                       // try not to catch url fragments
+                       if(strpos($s,$mtch) && preg_match('/[a-zA-z0-9\/]/',substr($s,strpos($s,$mtch)-1,1)))
+                               continue;
                        $ret[] = $mtch;
                }
        }
index fb68d53dbc020593ca5cdd282a85735af0a165f6..660a92df044cd3208b77c0f6eb9d0e8cece025b3 100644 (file)
@@ -228,6 +228,9 @@ function events_content(&$a) {
                                if($d !== $last_date)
                                        $o .= '<hr /><a name="link-' . $j . '" ><div class="event-list-date">' . $d . '</div></a>';
                                $last_date = $d;
+                               if($rr['author-name']) {
+                                       $o .= '<a href="' . $rr['author-link'] . '" ><img src="' . $rr['author-avatar'] . '" height="32" width="32" />' . $rr['author-name'] . '</a>';
+                               }
                                $o .= format_event_html($rr);
                                $o .= ((! $rr['cid']) ? '<a href="' . $a->get_baseurl() . '/events/event/' . $rr['id'] . '" title="' . t('Edit event') . '" class="edit-event-link icon pencil"></a>' : '');
                                if($rr['plink'])