aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2015-02-16 15:13:31 -0800
committerHabeas Codice <habeascodice@federated.social>2015-02-16 15:13:31 -0800
commitd9d029470f188796988e002eb90e9dbf96d3dd29 (patch)
treeef922432ae326f358374535bf68492729134e49e /include
parentca8e22101803454be60af35d2cf71ae80224805a (diff)
parent1d1676094dd82482f113d6de9c2a95407a1a692f (diff)
downloadvolse-hubzilla-d9d029470f188796988e002eb90e9dbf96d3dd29.tar.gz
volse-hubzilla-d9d029470f188796988e002eb90e9dbf96d3dd29.tar.bz2
volse-hubzilla-d9d029470f188796988e002eb90e9dbf96d3dd29.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php1
-rw-r--r--include/dir_fns.php2
-rw-r--r--include/socgraph.php23
-rw-r--r--include/widgets.php7
-rw-r--r--include/zot.php2
5 files changed, 10 insertions, 25 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 8f2b5bd38..749bc2334 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -625,6 +625,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
$Text = preg_replace("/\[table border=1\](.*?)\[\/table\]/sm", '<table border="1" >$1</table>' ,$Text);
$Text = preg_replace("/\[table border=0\](.*?)\[\/table\]/sm", '<table border="0" >$1</table>' ,$Text);
}
+ $Text = str_replace('</tr><br /><tr>',"</tr>\n<tr>",$Text);
$Text = str_replace('[hr]','<hr />', $Text);
// This is actually executed in prepare_body()
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 8c0161ff1..5ed626b8a 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -247,7 +247,7 @@ function sync_directories($dirmode) {
logger('rating updated');
}
else {
- $z = q("insert into xlink ( xlink_xchan, xlink_link, xlink_rating, xlink_rating_text, xlink_sig, xlink_updated, xlink_static ) values( '%s', '%s', %d, '%s', '%s', 1 ) ",
+ $z = q("insert into xlink ( xlink_xchan, xlink_link, xlink_rating, xlink_rating_text, xlink_sig, xlink_updated, xlink_static ) values( '%s', '%s', %d, '%s', '%s', '%s', 1 ) ",
dbesc($rr['channel']),
dbesc($rr['target']),
intval($rr['rating']),
diff --git a/include/socgraph.php b/include/socgraph.php
index 13957e814..59830ef1b 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -185,29 +185,6 @@ function poco_load($xchan = '',$url = null) {
$total ++;
-
- $r = q("select * from xlink where xlink_xchan = '%s' and xlink_link = '%s' and xlink_static = 0 limit 1",
- dbesc($xchan),
- dbesc($hash)
- );
-
- if(! $r) {
- q("insert into xlink ( xlink_xchan, xlink_link, xlink_rating, xlink_rating_text, xlink_updated, xlink_static ) values ( '%s', '%s', %d, '%s', '%s', 0 ) ",
- dbesc($xchan),
- dbesc($hash),
- intval($rating),
- dbesc($rating_text),
- dbesc(datetime_convert())
- );
- }
- else {
- q("update xlink set xlink_updated = '%s', xlink_rating = %d, xlink_rating_text = '%s' where xlink_id = %d",
- dbesc(datetime_convert()),
- intval($rating),
- dbesc($rating_text),
- intval($r[0]['xlink_id'])
- );
- }
}
logger("poco_load: loaded $total entries",LOGGER_DEBUG);
diff --git a/include/widgets.php b/include/widgets.php
index d457db07d..fbbc74224 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -962,4 +962,11 @@ function widget_rating($arr) {
return $o;
+}
+
+// used by site ratings pages to provide a return link
+function widget_pubsites() {
+ if(get_app()->poi)
+ return;
+ return '<div class="widget"><ul class="nav nav-pills"><li><a href="pubsites">' . t('Public Hubs') . '</a></li></ul></div>';
} \ No newline at end of file
diff --git a/include/zot.php b/include/zot.php
index cbe0c9303..852376c4b 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2447,7 +2447,7 @@ function import_site($arr,$pubkey) {
}
$directory_url = htmlspecialchars($arr['directory_url'],ENT_COMPAT,'UTF-8',false);
- $url = htmlspecialchars($arr['url'],ENT_COMPAT,'UTF-8',false);
+ $url = htmlspecialchars(strtolower($arr['url']),ENT_COMPAT,'UTF-8',false);
$sellpage = htmlspecialchars($arr['sellpage'],ENT_COMPAT,'UTF-8',false);
$site_location = htmlspecialchars($arr['location'],ENT_COMPAT,'UTF-8',false);
$site_realm = htmlspecialchars($arr['realm'],ENT_COMPAT,'UTF-8',false);