aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-11-25 22:41:50 -0800
committerfriendica <info@friendica.com>2011-11-25 22:41:50 -0800
commit0f4a42f550b5bc863cec7c7a3fca26a028599dcc (patch)
treef86801eac577e77ee654d9b0365037a4b558f500
parent6b93324c11439e739bfe32e0be6ddd07f72ea294 (diff)
downloadvolse-hubzilla-0f4a42f550b5bc863cec7c7a3fca26a028599dcc.tar.gz
volse-hubzilla-0f4a42f550b5bc863cec7c7a3fca26a028599dcc.tar.bz2
volse-hubzilla-0f4a42f550b5bc863cec7c7a3fca26a028599dcc.zip
start on bug #227 - more to do
-rw-r--r--boot.php2
-rw-r--r--include/dba.php23
-rw-r--r--include/text.php3
-rw-r--r--mod/events.php3
4 files changed, 25 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index 640b0b8af..ff5d23847 100644
--- 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 );
diff --git a/include/dba.php b/include/dba.php
index 70c27515c..e9d47cd1a 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -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';
diff --git a/include/text.php b/include/text.php
index 08803cc9b..c4fd76e3e 100644
--- a/include/text.php
+++ b/include/text.php
@@ -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;
}
}
diff --git a/mod/events.php b/mod/events.php
index fb68d53db..660a92df0 100644
--- a/mod/events.php
+++ b/mod/events.php
@@ -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'])