Author: dgoette Date: Wed Apr 15 16:12:25 2009 New Revision: 371
URL: http://svn.reactos.org/svn/reactos?rev=371&view=rev Log: * fix a problem in subsystem_wiki, wrong user_id was used and resulted in an error message * remove some queries that inserted a new mapping, where only the subsystem data should be updated
Modified: branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_Bugzilla.class.php branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_PHPBB.class.php branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_Wiki.class.php
Modified: branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_Bugzilla.class.php URL: http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ros... ============================================================================== --- branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_Bugzilla.class.php [iso-8859-1] (original) +++ branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_Bugzilla.class.php [iso-8859-1] Wed Apr 15 16:12:25 2009 @@ -235,16 +235,8 @@ if (false === self::updateUserPrivate($user_id, $user['name'], $user['email'],$user['register'], $bz_user_id)){ return false; } - - // Insert a row in the mapping table - $stmt=&DBConnection::getInstance()->prepare("INSERT INTO ".ROSCMST_SUBSYS." (user_id, subsys, subsys_user_id) VALUES(:roscms_user, 'bugzilla', :bugzilla_user)"); - $stmt->bindParam('roscms_user',$user_id,PDO::PARAM_INT); - $stmt->bindParam('bugzilla_user',$bz_user_id,PDO::PARAM_INT); - $stmt->execute() or die('DB error (subsys_bugzilla #9)'); - - return true; - } - return false; + } + return true; } // end of member function addMapping
Modified: branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_PHPBB.class.php URL: http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ros... ============================================================================== --- branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_PHPBB.class.php [iso-8859-1] (original) +++ branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_PHPBB.class.php [iso-8859-1] Wed Apr 15 16:12:25 2009 @@ -232,22 +232,8 @@ if (false === self::updateUserPrivate($user_id, $user['name'], $user['email'],$user['register'], $phpbb_user_id)){ return false; } - - $stmt=&DBConnection::getInstance()->prepare("SELECT 1 FROM ".ROSCMST_SUBSYS." WHERE user_id=:roscms_user AND subsys='phpbb' AND subsys_user_id=:phpbb_user"); - $stmt->bindParam('roscms_user',$user_id,PDO::PARAM_INT); - $stmt->bindParam('phpbb_user',$phpbb_user_id,PDO::PARAM_INT); - $stmt->execute(); - if ($stmt->fetchColumn() === false) { - - // Insert a row in the mapping table - $stmt=&DBConnection::getInstance()->prepare("INSERT INTO ".ROSCMST_SUBSYS." (user_id, subsys, subsys_user_id) VALUES(:roscms_user, 'phpbb', :phpbb_user)"); - $stmt->bindParam('roscms_user',$user_id,PDO::PARAM_INT); - $stmt->bindParam('phpbb_user',$phpbb_user_id,PDO::PARAM_INT); - $stmt->execute() or die('DB error (subsys_phpbb #9)'); - } - - return true; - } + } + return true; } // end of member function addUser
Modified: branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_Wiki.class.php URL: http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/ros... ============================================================================== --- branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_Wiki.class.php [iso-8859-1] (original) +++ branches/danny-web/reactos.org/htdocs/roscms/lib/subsystem/Subsystem_Wiki.class.php [iso-8859-1] Wed Apr 15 16:12:25 2009 @@ -120,7 +120,7 @@ $stmt=&DBConnection::getInstance()->prepare("SELECT COUNT(*) FROM ".$this->user_table." WHERE (LOWER(user_name) = LOWER(:user_name) OR LOWER(user_email) = LOWER(:user_email)) AND user_id <> :user_id"); $stmt->bindParam('user_name',$wiki_user_name,PDO::PARAM_STR); $stmt->bindParam('user_email',$user_email,PDO::PARAM_STR); - $stmt->bindParam('user_id',$user_id,PDO::PARAM_INT); + $stmt->bindParam('user_id',$subsys_user,PDO::PARAM_INT); $stmt->execute() or die('DB error (subsys_wiki #7)');
// stop if one of both already exists @@ -214,13 +214,8 @@ if (false === self::updateUserPrivate($user_id, $user['name'], $user['email'], $user['fullname'], $wiki_user_id)) { return false; } - - // Insert a row in the mapping table - $stmt=&DBConnection::getInstance()->prepare("INSERT INTO ".ROSCMST_SUBSYS." (user_id, subsys, subsys_user_id) VALUES(:roscms_user, 'wiki', :wiki_user)"); - $stmt->bindParam('roscms_user',$user_id,PDO::PARAM_INT); - $stmt->bindParam('wiki_user',$wiki_user_id,PDO::PARAM_INT); - return $stmt->execute(); - } + } + return true; } // end of member function addUser