v1.4.1-cvs-b92 on postnuke
wi777
Joined: 2003-08-05
Posts: 19 |
Posted: Wed, 2003-09-24 00:57 | |||
I got a solution of random image block for gallery v1.4.1-cvs-b92 in postnuke Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /var/www/html/modules/Gallery/classes/database/mysql/Database.php on line 37 simply copy code at v1.4 cvs b14 init.php to 1.4.1 b92 init.php gallerySanityCheck(); if (isset($GALLERY_EMBEDDED_INSIDE) && !strcmp($GALLERY_EMBEDDED_INSIDE, "nuke")) { include($GALLERY_BASEDIR . "classes/Database.php"); /* Check for PostNuke */ if (isset($GLOBALS['pnconfig']) && function_exists("authorised")) { if (!function_exists("pnUserGetVar")) { /* pre 0.7.1 */ include($GALLERY_BASEDIR . "classes/postnuke/UserDB.php"); include($GALLERY_BASEDIR . "classes/postnuke/User.php"); $gallery->database{"db"} = $GLOBALS['dbconn']; $gallery->database{"prefix"} = $GLOBALS['pnconfig']['prefix'] . "_"; } else { /* 0.7.1 and beyond */ include($GALLERY_BASEDIR . "classes/postnuke0.7.1/UserDB.php"); include($GALLERY_BASEDIR . "classes/postnuke0.7.1/User.php"); } /* Load our user database (and user object) */ $gallery->userDB = new PostNuke_UserDB; if (isset($GLOBALS['user'])) { $gallery->session->username = $GLOBALS['user']; } if (isset($GLOBALS['user']) && is_user($GLOBALS['user'])) { $user_info = getusrinfo($GLOBALS['user']); $gallery->session->username = $user_info["uname"]; $gallery->user = $gallery->userDB->getUserByUsername($gallery->session->username); } } else { include($GALLERY_BASEDIR . "classes/database/mysql/Database.php"); include($GALLERY_BASEDIR . "classes/nuke5/UserDB.php"); include($GALLERY_BASEDIR . "classes/nuke5/User.php"); $gallery->database{"nuke"} = new MySQL_Database( $GLOBALS['dbhost'], $GLOBALS['dbuname'], $GLOBALS['dbpass'], $GLOBALS['dbname']); if (isset($GLOBALS['user_prefix'])) { $gallery->database{"user_prefix"} = $GLOBALS['user_prefix'] . '_'; } else { $gallery->database{"user_prefix"} = $GLOBALS['prefix'] . '_'; } $gallery->database{"prefix"} = $GLOBALS['prefix'] . '_'; /* PHP-Nuke changed its "users" table field names in v.6.5 */
here some my patched files are:
|
||||