diff --git a/docs/NEWS b/docs/NEWS
index ee744094..5a5b4413 100644
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -7,6 +7,17 @@ Version 1.4 ()
extensive joins to save performance in cases where no ACLs
need to be evaluated. (garvinhicking)
+Version 1.3.1 ()
+------------------------------------------------------------------------
+
+ * Add {serendipity_getImageSize} smarty function (judebert)
+
+ * Add escaping to "Top Referrers" plugin and honor local configuration
+ of "Show links" option, thanks to Hanno Böck
+
+ * Fix some PostgreSQL implicit casts for SQL queries (changed
+ LIKE to =). (Devrim Gündüz)
+
Version 1.3 (March 18th, 2008)
------------------------------------------------------------------------
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 1aac3b97..04a76ec7 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -916,15 +916,15 @@ function serendipity_displayTopUrlList($list, $limit, $use_links = true, $interv
if ($use_links) {
printf(
'%2$s (%3$s)
',
- $row['scheme'],
- $row['host'],
- $row['total']
+ htmlspecialchars($row['scheme']),
+ htmlspecialchars($row['host']),
+ htmlspecialchars($row['total'])
);
} else {
printf(
'%1$s (%2$s)
',
- $row['host'],
- $row['total']
+ htmlspecialchars($row['host']),
+ htmlspecialchars($row['total'])
);
}
}
diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php
index 8124c2d7..4d5a4216 100644
--- a/include/functions_entries.inc.php
+++ b/include/functions_entries.inc.php
@@ -535,7 +535,7 @@ function &serendipity_fetchEntry($key, $val, $full = true, $fetchDrafts = 'false
ON e.authorid = a.authorid
{$cond['joins']}
WHERE
- e.$key LIKE '" . serendipity_db_escape_string($val) . "'
+ e.$key " . ($key == 'id' ? '=' : 'LIKE') . " '" . serendipity_db_escape_string($val) . "'
{$cond['and']}
LIMIT 1";
diff --git a/include/plugin_internal.inc.php b/include/plugin_internal.inc.php
index 83de9658..9be42bc2 100644
--- a/include/plugin_internal.inc.php
+++ b/include/plugin_internal.inc.php
@@ -584,7 +584,7 @@ class serendipity_topreferrers_plugin extends serendipity_plugin {
$propbag->add('description', SHOWS_TOP_SITES);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
- $propbag->add('version', '1.0');
+ $propbag->add('version', '1.1');
$propbag->add('configuration', array('limit', 'use_links', 'interval'));
$propbag->add('groups', array('STATISTICS'));
}
@@ -599,10 +599,10 @@ class serendipity_topreferrers_plugin extends serendipity_plugin {
$propbag->add('default', 10);
break;
- case 'interval':
- $propbag->add('type', 'string');
- $propbag->add('name', ARCHIVE_FREQUENCY);
- $propbag->add('description', ARCHIVE_FREQUENCY_DESC);
+ case 'interval':
+ $propbag->add('type', 'string');
+ $propbag->add('name', ARCHIVE_FREQUENCY);
+ $propbag->add('description', ARCHIVE_FREQUENCY_DESC);
$propbag->add('default', 7);
break;
@@ -610,7 +610,7 @@ class serendipity_topreferrers_plugin extends serendipity_plugin {
$propbag->add('type', 'tristate');
$propbag->add('name', INSTALL_TOP_AS_LINKS);
$propbag->add('description', INSTALL_TOP_AS_LINKS_DESC);
- $propbag->add('default', false);
+ $propbag->add('default', 'default');
break;
default:
@@ -631,12 +631,11 @@ class serendipity_topreferrers_plugin extends serendipity_plugin {
$global_use_link = serendipity_get_config_var('top_as_links', false, true);
// if local configuration say to use global default, do so
- if ($use_links == 'default') {
+ if ($use_links === 'default') {
$use_links = serendipity_db_bool($global_use_link);
} else {
$use_links = serendipity_db_bool($use_links);
}
-
echo serendipity_displayTopReferrers($this->get_config('limit', 10), $use_links, $this->get_config('interval', 7));
}
}
@@ -697,7 +696,7 @@ class serendipity_topexits_plugin extends serendipity_plugin {
$global_use_link = serendipity_get_config_var('top_as_links', false, true);
// if local configuration say to use global default, do so
- if ($use_links == 'default') {
+ if ($use_links === 'default') {
$use_links = serendipity_db_bool($global_use_link);
} else {
$use_links = serendipity_db_bool($use_links);