1
0
This commit is contained in:
Garvin Hicking
2008-03-20 09:15:07 +00:00
parent 8265e171e9
commit eaf4c57a99
4 changed files with 25 additions and 15 deletions

View File

@ -7,6 +7,17 @@ Version 1.4 ()
extensive joins to save performance in cases where no ACLs extensive joins to save performance in cases where no ACLs
need to be evaluated. (garvinhicking) 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<6E>z)
Version 1.3 (March 18th, 2008) Version 1.3 (March 18th, 2008)
------------------------------------------------------------------------ ------------------------------------------------------------------------

View File

@ -916,15 +916,15 @@ function serendipity_displayTopUrlList($list, $limit, $use_links = true, $interv
if ($use_links) { if ($use_links) {
printf( printf(
'<a href="%1$s://%2$s" title="%2$s" >%2$s</a> (%3$s)<br />', '<a href="%1$s://%2$s" title="%2$s" >%2$s</a> (%3$s)<br />',
$row['scheme'], htmlspecialchars($row['scheme']),
$row['host'], htmlspecialchars($row['host']),
$row['total'] htmlspecialchars($row['total'])
); );
} else { } else {
printf( printf(
'%1$s (%2$s)<br />', '%1$s (%2$s)<br />',
$row['host'], htmlspecialchars($row['host']),
$row['total'] htmlspecialchars($row['total'])
); );
} }
} }

View File

@ -535,7 +535,7 @@ function &serendipity_fetchEntry($key, $val, $full = true, $fetchDrafts = 'false
ON e.authorid = a.authorid ON e.authorid = a.authorid
{$cond['joins']} {$cond['joins']}
WHERE WHERE
e.$key LIKE '" . serendipity_db_escape_string($val) . "' e.$key " . ($key == 'id' ? '=' : 'LIKE') . " '" . serendipity_db_escape_string($val) . "'
{$cond['and']} {$cond['and']}
LIMIT 1"; LIMIT 1";

View File

@ -584,7 +584,7 @@ class serendipity_topreferrers_plugin extends serendipity_plugin {
$propbag->add('description', SHOWS_TOP_SITES); $propbag->add('description', SHOWS_TOP_SITES);
$propbag->add('stackable', false); $propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team'); $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('configuration', array('limit', 'use_links', 'interval'));
$propbag->add('groups', array('STATISTICS')); $propbag->add('groups', array('STATISTICS'));
} }
@ -599,10 +599,10 @@ class serendipity_topreferrers_plugin extends serendipity_plugin {
$propbag->add('default', 10); $propbag->add('default', 10);
break; break;
case 'interval': case 'interval':
$propbag->add('type', 'string'); $propbag->add('type', 'string');
$propbag->add('name', ARCHIVE_FREQUENCY); $propbag->add('name', ARCHIVE_FREQUENCY);
$propbag->add('description', ARCHIVE_FREQUENCY_DESC); $propbag->add('description', ARCHIVE_FREQUENCY_DESC);
$propbag->add('default', 7); $propbag->add('default', 7);
break; break;
@ -610,7 +610,7 @@ class serendipity_topreferrers_plugin extends serendipity_plugin {
$propbag->add('type', 'tristate'); $propbag->add('type', 'tristate');
$propbag->add('name', INSTALL_TOP_AS_LINKS); $propbag->add('name', INSTALL_TOP_AS_LINKS);
$propbag->add('description', INSTALL_TOP_AS_LINKS_DESC); $propbag->add('description', INSTALL_TOP_AS_LINKS_DESC);
$propbag->add('default', false); $propbag->add('default', 'default');
break; break;
default: default:
@ -631,12 +631,11 @@ class serendipity_topreferrers_plugin extends serendipity_plugin {
$global_use_link = serendipity_get_config_var('top_as_links', false, true); $global_use_link = serendipity_get_config_var('top_as_links', false, true);
// if local configuration say to use global default, do so // 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); $use_links = serendipity_db_bool($global_use_link);
} else { } else {
$use_links = serendipity_db_bool($use_links); $use_links = serendipity_db_bool($use_links);
} }
echo serendipity_displayTopReferrers($this->get_config('limit', 10), $use_links, $this->get_config('interval', 7)); 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); $global_use_link = serendipity_get_config_var('top_as_links', false, true);
// if local configuration say to use global default, do so // 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); $use_links = serendipity_db_bool($global_use_link);
} else { } else {
$use_links = serendipity_db_bool($use_links); $use_links = serendipity_db_bool($use_links);