Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7349030
)
session_new() returns id, fixed db_count()
author
jason
<jason@lappy.(none)>
Fri, 11 Apr 2008 22:42:22 +0000
(18:42 -0400)
committer
jason
<jason@lappy.(none)>
Fri, 11 Apr 2008 22:42:22 +0000
(18:42 -0400)
db.php
patch
|
blob
|
history
session.php
patch
|
blob
|
history
diff --git
a/db.php
b/db.php
index
9390035
..
0a1369f
100644
(file)
--- a/
db.php
+++ b/
db.php
@@
-212,7
+212,9
@@
function db_get_value($table, $columns, $where = '') {
}
function db_count($table, $where = '') {
}
function db_count($table, $where = '') {
- return db_get_value($table, 'count(*)', $where);
+ $args = func_get_args();
+ array_splice($args, 1, 0, array('count(*)'));
+ return call_user_func_array('db_get_value', $args);
}
# call either of these ways:
}
# call either of these ways:
diff --git
a/session.php
b/session.php
index
4bbaea9
..
4efec20
100644
(file)
--- a/
session.php
+++ b/
session.php
@@
-71,6
+71,7
@@
function session_new($length = 86400) {
$GLOBALS['session_key'] = $session_key;
$_REQUEST['session_key'] = $session_key; #just in case someone calls session_exists() after session_new()
session_touch($length);
$GLOBALS['session_key'] = $session_key;
$_REQUEST['session_key'] = $session_key; #just in case someone calls session_exists() after session_new()
session_touch($length);
+ return $GLOBALS['session_key'];
}
# call to renew the timeout for the session.
}
# call to renew the timeout for the session.