]> git.mjollnir.org Git - s9y.git/commitdiff
(no commit message)
authorgarvinhicking <garvinhicking>
Thu, 20 Mar 2008 09:17:25 +0000 (09:17 +0000)
committergarvinhicking <garvinhicking>
Thu, 20 Mar 2008 09:17:25 +0000 (09:17 +0000)
docs/NEWS
include/functions.inc.php
include/functions_entries.inc.php
include/plugin_internal.inc.php

index 9081e789e1f26fc78ea9ae1d1f1df0ee9b68da14..968f92a4892b67d43b913ad1063813d695fb6897 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -1,5 +1,16 @@
 # $Id$
 
+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)
 ------------------------------------------------------------------------
 
index 1aac3b9754e72790ac98d6af3202d36108c1e970..04a76ec722f35ff654fa5eaaf2de8fa8ddc8f40b 100644 (file)
@@ -916,15 +916,15 @@ function serendipity_displayTopUrlList($list, $limit, $use_links = true, $interv
             if ($use_links) {
                 printf(
                     '<a href="%1$s://%2$s" title="%2$s" >%2$s</a> (%3$s)<br />',
-                    $row['scheme'],
-                    $row['host'],
-                    $row['total']
+                    htmlspecialchars($row['scheme']),
+                    htmlspecialchars($row['host']),
+                    htmlspecialchars($row['total'])
                 );
             } else {
                 printf(
                     '%1$s (%2$s)<br />',
-                    $row['host'],
-                    $row['total']
+                    htmlspecialchars($row['host']),
+                    htmlspecialchars($row['total'])
                 );
             }
         }
index 8124c2d7ababc4eb20115c30227903e292ded060..4d5a42165ae66dd2713173b435aa23bb13235e63 100644 (file)
@@ -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";
 
index 83de96585316d5c0cb391c00d291797a5556f3d7..9be42bc2766dae9374e08cdbcfcf84c67e6234be 100644 (file)
@@ -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);