[geeklog-cvs] geeklog: Our sample code should really initialize variables prop...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Oct 17 16:35:50 EDT 2009
changeset 7385:12aa30c5bdb4
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/12aa30c5bdb4
user: Dirk Haun <dirk at haun-online.de>
date: Sat Oct 17 20:02:27 2009 +0200
description:
Our sample code should really initialize variables properly ...
diffstat:
system/lib-custom.php.dist | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diffs (57 lines):
diff -r 062fc7ef2c35 -r 12aa30c5bdb4 system/lib-custom.php.dist
--- a/system/lib-custom.php.dist Sat Oct 17 19:54:49 2009 +0200
+++ b/system/lib-custom.php.dist Sat Oct 17 20:02:27 2009 +0200
@@ -63,6 +63,8 @@
{
global $_RIGHTS, $_CST_VERBOSE;
+ $retval = '';
+
if ($_CST_VERBOSE) {
COM_errorLog('**** Inside phpblock_showrights in lib-custom.php ****', 1);
}
@@ -224,6 +226,8 @@
{
global $_CONF, $_TABLES;
+ $retval = '';
+
$var = "Value from custom table";
$retval .= '<tr>
<td align="right"><b>Custom Fields:</b></td>
@@ -249,6 +253,8 @@
{
global $_CONF, $_TABLES;
+ $retval = '';
+
$var = "Value from custom table";
$cookietimeout = DB_getitem($_TABLES['users'], 'cookietimeout', $uid);
$selection = '<select name="cooktime">' . LB;
@@ -299,6 +305,8 @@
{
global $_CONF, $_TABLES, $LANG04;
+ $retval = '';
+
if (!empty ($msg) && ($msg != 'new')) {
$retval .= COM_startBlock($LANG04[21]) . $msg . COM_endBlock();
}
@@ -374,7 +382,9 @@
function CUSTOM_userCheck ($username, $email='')
{
global $MESSAGE;
+
$retval = '';
+
// Example, check that the full name has been entered
// and complain if it's missing
if (empty($_POST['fullname'])) {
@@ -407,6 +417,7 @@
global $_CONF, $_USER, $_TABLES;
$retval = '';
+
if( !isset( $_USER['noboxes'] )) {
if( !empty( $_USER['uid'] )) {
$noboxes = DB_getItem( $_TABLES['userindex'], 'noboxes', "uid = {$_USER['uid']}" );
More information about the geeklog-cvs
mailing list