[geeklog-cvs] geeklog: DB_Query -> DB_query, for consistency
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Feb 28 12:25:17 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f65e87f65971
changeset: 6800:f65e87f65971
user: Dirk Haun <dirk at haun-online.de>
date: Sat Feb 28 09:39:18 2009 +0100
description:
DB_Query -> DB_query, for consistency
diffstat:
5 files changed, 15 insertions(+), 18 deletions(-)
plugins/spamx/MTBlackList.Examine.class.php | 5 ++---
public_html/admin/moderation.php | 2 +-
sql/updates/mssql_1.4.1_to_1.5.0.php | 2 +-
system/lib-database.php | 12 +++++-------
system/lib-security.php | 12 ++++++------
diffs (159 lines):
diff -r 4ac03f3820e2 -r f65e87f65971 plugins/spamx/MTBlackList.Examine.class.php
--- a/plugins/spamx/MTBlackList.Examine.class.php Sun Feb 22 21:22:24 2009 +0000
+++ b/plugins/spamx/MTBlackList.Examine.class.php Sat Feb 28 09:39:18 2009 +0100
@@ -5,7 +5,7 @@
* This module examines comments for entries on the MT-Blacklist
* for the Geeklog Spam-X plugin
*
- * Copyright (C) 2004-2006 by the following authors:
+ * Copyright (C) 2004-2009 by the following authors:
* Author Tom Willett tomw AT pigstye DOT net
*
* Licensed under GNU General Public License
@@ -13,7 +13,6 @@
* The MT-Blacklist was maintained by Jay Allen
* http://www.jayallen.org/comment_spam/
*
- * $Id: MTBlackList.Examine.class.php,v 1.12 2008/09/21 08:37:08 dhaun Exp $
*/
if (strpos(strtolower($_SERVER['PHP_SELF']), 'MTBlackList.Examine.class.php') !== false) {
@@ -51,7 +50,7 @@
/**
* Include Blacklist Data
*/
- $result = DB_Query ("SELECT value FROM {$_TABLES['spamx']} WHERE name = 'MTBlacklist'", 1);
+ $result = DB_query ("SELECT value FROM {$_TABLES['spamx']} WHERE name = 'MTBlacklist'", 1);
$nrows = DB_numRows ($result);
// named entities
diff -r 4ac03f3820e2 -r f65e87f65971 public_html/admin/moderation.php
--- a/public_html/admin/moderation.php Sun Feb 22 21:22:24 2009 +0000
+++ b/public_html/admin/moderation.php Sat Feb 28 09:39:18 2009 +0100
@@ -617,7 +617,7 @@
if ($nrows == 1) {
$A = DB_fetchArray($result);
$sql = "UPDATE {$_TABLES['users']} SET status=3 WHERE uid={$A['uid']}";
- DB_Query($sql);
+ DB_query($sql);
USER_createAndSendPassword ($A['username'], $A['email'], $A['uid']);
}
break;
diff -r 4ac03f3820e2 -r f65e87f65971 sql/updates/mssql_1.4.1_to_1.5.0.php
--- a/sql/updates/mssql_1.4.1_to_1.5.0.php Sun Feb 22 21:22:24 2009 +0000
+++ b/sql/updates/mssql_1.4.1_to_1.5.0.php Sat Feb 28 09:39:18 2009 +0100
@@ -69,7 +69,7 @@
ON [PRIMARY]
");
- DB_Query ("
+ DB_query ("
ALTER function [DESCRIBE](@d as varchar(100)='', @c as varchar(100)=null)
RETURNS table AS
diff -r 4ac03f3820e2 -r f65e87f65971 system/lib-database.php
--- a/system/lib-database.php Sun Feb 22 21:22:24 2009 +0000
+++ b/system/lib-database.php Sat Feb 28 09:39:18 2009 +0100
@@ -2,13 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.5 |
+// | Geeklog 1.6 |
// +---------------------------------------------------------------------------+
// | lib-database.php |
// | |
// | Geeklog database library. |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors: |
+// | Copyright (C) 2000-2009 by the following authors: |
// | |
// | Authors: Tony Bibbs, tony AT tonybibbs DOT com |
// +---------------------------------------------------------------------------+
@@ -28,8 +28,6 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
-//
-// $Id: lib-database.php,v 1.54 2008/09/21 08:37:11 dhaun Exp $
/**
* This is the high-level database layer for Geeklog (for the low-level stuff,
@@ -137,7 +135,7 @@
// +---------------------------------------------------------------------------+
// | These are the library functions. In all cases they turn around and make |
// | calls to the DBMS specific functions. These ARE to be used directly in |
-// | the code...do NOT use the $_DB methods directly
+// | the code...do NOT use the $_DB methods directly |
// +---------------------------------------------------------------------------+
/**
@@ -154,7 +152,7 @@
* @param boolean $flag true or false
*
*/
-function DB_setdebug($flag)
+function DB_setDebug($flag)
{
global $_DB;
@@ -556,7 +554,7 @@
$exists = true;
}
} elseif ($_DB_dbms == 'mssql') {
- $result = DB_Query("SELECT 1 FROM sysobjects WHERE name='{$_TABLES[$table]}' AND xtype='U'");
+ $result = DB_query("SELECT 1 FROM sysobjects WHERE name='{$_TABLES[$table]}' AND xtype='U'");
if (DB_numRows ($result) > 0) {
$exists = true;
}
diff -r 4ac03f3820e2 -r f65e87f65971 system/lib-security.php
--- a/system/lib-security.php Sun Feb 22 21:22:24 2009 +0000
+++ b/system/lib-security.php Sat Feb 28 09:39:18 2009 +0100
@@ -174,7 +174,7 @@
global $_TABLES, $_CONF;
if(!isset($_CONF['remote_users_group_id']))
{
- $result = DB_Query("SELECT grp_id FROM {$_TABLES['groups']} WHERE grp_name='Remote Users'");
+ $result = DB_query("SELECT grp_id FROM {$_TABLES['groups']} WHERE grp_name='Remote Users'");
if( $result )
{
$row = DB_fetchArray( $result );
@@ -1097,17 +1097,17 @@
$sql = "DELETE FROM {$_TABLES['tokens']} WHERE (DATE_ADD(created, INTERVAL ttl SECOND) < NOW())"
. " AND (ttl > 0)";
}
- DB_Query($sql);
+ DB_query($sql);
/* Destroy tokens for this user/url combination */
$sql = "DELETE FROM {$_TABLES['tokens']} WHERE owner_id={$_USER['uid']} AND urlfor='$pageURL'";
- DB_Query($sql);
+ DB_query($sql);
/* Create a token for this user/url combination */
/* NOTE: TTL mapping for PageURL not yet implemented */
$sql = "INSERT INTO {$_TABLES['tokens']} (token, created, owner_id, urlfor, ttl) "
. "VALUES ('$token', NOW(), {$_USER['uid']}, '$pageURL', $ttl)";
- DB_Query($sql);
+ DB_query($sql);
$last_token = $token;
@@ -1149,7 +1149,7 @@
END
FROM {$_TABLES['tokens']} WHERE token='$token'";
}
- $tokens = DB_Query($sql);
+ $tokens = DB_query($sql);
$numberOfTokens = DB_numRows($tokens);
if($numberOfTokens != 1) {
$return = false; // none, or multiple tokens. Both are invalid. (token is unique key...)
@@ -1172,7 +1172,7 @@
// It's a one time token. So eat it.
$sql = "DELETE FROM {$_TABLES['tokens']} WHERE token='$token'";
- DB_Query($sql);
+ DB_query($sql);
}
} else {
$return = false; // no token.
More information about the geeklog-cvs
mailing list