Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_entrylinks
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7354
Modified Files:
serendipity_plugin_entrylinks.php
Log Message:
fixed pgsql errors (thanks to Mauri Sahlberg!)
Index: serendipity_plugin_entrylinks.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_entrylinks/serendipity_plugin_entrylinks.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- serendipity_plugin_entrylinks.php 2 Dec 2004 10:55:07 -0000 1.8
+++ serendipity_plugin_entrylinks.php 20 Dec 2004 12:59:32 -0000 1.9
@@ -147,7 +147,7 @@
$counter = array();
if ($this->get_config('show_exits', 'true') == 'true') {
- $exits = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}exits WHERE entry_id = " . $id . " GROUP BY fulllink");
+ $exits = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}exits WHERE entry_id = " . $id . " GROUP BY scheme,host,port,path,query");
if (is_array($exits)) {
foreach($exits AS $key => $row) {
$url = sprintf('%s://%s%s%s%s',
@@ -163,7 +163,7 @@
}
}
- $references = serendipity_db_query("SELECT link, name FROM {$serendipity['dbPrefix']}references WHERE entry_id = " . $id . " GROUP BY link");
+ $references = serendipity_db_query("SELECT link, max(name) as name FROM {$serendipity['dbPrefix']}references WHERE entry_id = " . $id . " GROUP BY link");
if (is_array($references)) {
$links = '<ul style="margin: 5px; padding: 10px; text-align: left">';
foreach($references AS $key => $row) {
@@ -185,7 +185,7 @@
}
if ($this->get_config('show_referers', 'true') == 'true') {
- $ref = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}referrers WHERE entry_id = " . $id . " GROUP BY fulllink ORDER BY $orderby DESC LIMIT $maxref");
+ $ref = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}referrers WHERE entry_id = " . $id . " GROUP BY scheme,host,port,path,query ORDER BY $orderby DESC LIMIT $maxref");
if (is_array($ref)) {
echo PLUGIN_ENTRYLINKS_REFERERS . '<ul style="margin: 5px; padding: 10px; text-align: left">';
foreach($ref AS $key => $row) {
|