- Dec 06, 2007
-
-
Gábor Hojtsy authored
-
- Aug 02, 2007
-
-
Dries Buytaert authored
-
- May 01, 2007
-
-
Dries Buytaert authored
-
- Feb 15, 2007
-
-
Dries Buytaert authored
-
- Oct 15, 2006
-
-
Dries Buytaert authored
-
- Aug 27, 2006
-
-
Dries Buytaert authored
-
- Aug 24, 2006
-
-
Neil Drumm authored
-
- Aug 16, 2006
-
-
Dries Buytaert authored
-
- Jul 05, 2006
-
-
Dries Buytaert authored
-
- Apr 13, 2006
-
-
Gerhard Killesreiter authored
-
- Jan 15, 2006
-
-
Dries Buytaert authored
-
Steven Wittens authored
-
- Jan 14, 2006
-
-
Dries Buytaert authored
-
- Oct 22, 2005
-
-
Dries Buytaert authored
-
- Oct 21, 2005
-
-
Steven Wittens authored
-
- Aug 25, 2005
-
-
Dries Buytaert authored
-
- Aug 10, 2005
-
-
Dries Buytaert authored
-
- Jul 30, 2005
-
-
Steven Wittens authored
-
- May 25, 2005
-
-
Steven Wittens authored
-
Steven Wittens authored
-
- Mar 31, 2005
-
-
Steven Wittens authored
-
- Jan 28, 2005
-
-
Dries Buytaert authored
-
- Jan 27, 2005
-
-
Dries Buytaert authored
-
Dries Buytaert authored
-
Dries Buytaert authored
- Patch #16273 by Jeremy: improved the themability of the pager.
-
- Dec 06, 2004
-
-
Steven Wittens authored
-
- Dec 04, 2004
-
-
Dries Buytaert authored
- Patch by Steven: fixed bug in pager_query().
-
- Dec 02, 2004
-
-
Steven Wittens authored
-
- Nov 29, 2004
-
-
Dries Buytaert authored
- Patch #13581 by Steven: Db_query() allows a variable amount of parameters so you can pass the query arguments in. There is however an alternative syntax: instead of passing the query arguments as function arguments, you can also pass a single array with the query arguments in it. For example the following two statements are equivalent: db_query($query, $a, $b, $c); db_query($query, array($a, $b, $c)); This usage is particularly interesting when the query is constructed dynamically, and the amount of arguments to pass varies. In that case we use the second method to avoid using call_user_func_array(). This behaviour is not documented explicitly, but it is used in several places. However, db_query_range() and pager_query() do not support this syntax properly, which means there are several pieces of code which still revert to the ugly call_user_func_array() call. This patch updates db_query_range() and pager_query() so they support the array-passing method. I also added documentation about this method to each of the db functions. I also cleaned up the code for db_query (it was weird and hard to understand) and moved db_query() and db_queryd() from database.xxxxx.inc to database.inc: it was the same between both mysql and pgsql, as it doesn't do anything database specific. It just prefixes the tables and inserts the arguments. The actual db query is performed in _db_query(), which is still in database.xxxxx.inc. Finally, I updated several places with the new syntax, and the code is a lot cleaner. For example: - array_unshift($params, "SELECT u.* FROM {users} u WHERE $query u.status < 3"); - $params[] = 0; - $params[] = 1; - $result = call_user_func_array('db_query_range', $params); + $result = db_query_range("SELECT u.* FROM {users} u WHERE $query u.status < 3", $params, 0, 1); and - return call_user_func_array('db_query_range', array_merge(array($query), $args, array((int)$pager_from_array[$element], (int)$limit))); + return db_query_range($query, $args, (int)$pager_from_array[$element], (int)$limit); I've tested it on mysql. I didn't alter the actual db behaviour, so pgsql should be okay too. This patch is important because many people avoid the call_user_func_array() method and put data directly into the db query. This is very, very bad because the database prefix will be applied to it, and strip out braces. It's also generally bad form as you have to call check_query() yourself. With the new, documented syntax, there is no more excuse to put data directly in the query.
-
- Oct 31, 2004
-
-
Dries Buytaert authored
- Patch #7161 by jhriggs: fixed probem with 'last page' link not being correct under certain circumstances.
-
- Sep 09, 2004
-
-
Dries Buytaert authored
- Patch #10663 by JonBob: documentation improvements: fixed some typos and improved consistency to the use of Doxygen/api.module commands in the comments.
-
- Aug 12, 2004
-
-
Dries Buytaert authored
-
- Jul 25, 2004
-
-
Dries Buytaert authored
- Patch #9478 by JonBob: allow printf-style arguments in pager_query. Currently pager_query() is the black sheep of the database query family, because it does not allow for printf-style arguments to be inserted in the query. This is a problem because it introduces developer confusion when moving from an unpaged query to a paged one, and it encourages substitution of variables directly into the query, which can bypass our check_query() security feature. This patch adds this ability to pager_query(). The change is backwards-compatible, but a couple calls to the function in core have been changed to use the new capability.
-
- Jul 22, 2004
-
-
Steven Wittens authored
-
- Jul 02, 2004
-
-
Dries Buytaert authored
- Patch #8973 by JonBob: Drupal contains many undefined variables and array indices, which makes PHP throw a lot of warnings when the reporting level is set to E_ALL. Things run fine with these warnings, but as a matter of code style if nothing else we should probably strive to avoid them. The attached fixes most of the more egregious offenders (about 95% of the warnings when I load /node on my test site).
-
- Jun 22, 2004
-
-
Dries Buytaert authored
-
- Jun 21, 2004
-
-
Dries Buytaert authored
-
- Jun 19, 2004
-
-
Dries Buytaert authored
- Patch #7696 by TDobes: renamed 'static' to 'sticky' which is a more logical name. Requires a database upgrade.
-
- Apr 15, 2004
-
-
Dries Buytaert authored
-
- Feb 15, 2004
-
-
Dries Buytaert authored
- Patch 5834 by Jeremy: made multiple pagers on one page work.
-