diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/install_plugin.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/install_plugin.php index 1ea950d38..052d4f14b 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/install_plugin.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/install_plugin.php @@ -220,7 +220,7 @@ function checkForUpdate( $fileName, $findPath, $tempFile, $tempPath ) // check for the version for the plugin $db = new DBLayer( "lib" ); - $sth = $db -> select( "plugins", array( ':name' => $result['PluginName'] ), "Name = :name" ); + $sth = $db -> select( "plugins", array( 'Name' => $result['PluginName'] ), "Name = :Name" ); $info = $sth -> fetch(); $info['Info'] = json_decode( $info['Info'] ); @@ -237,11 +237,11 @@ function checkForUpdate( $fileName, $findPath, $tempFile, $tempPath ) // then there MUST be an increment in the Y value. // When there is increment in the X value , Y and Z MUST be 0. // comparing if there is some change - if ( !array_intersect( $new_version , $pre_version ) ) + if ( !array_diff( $new_version , $pre_version ) ) { // removing the uploaded file Plugincache :: rrmdir( $tempPath . "/test/" . $fileName ); - return '2'; + return '2'; //plugin already exists } else { diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 6fb5981d3..77a5269f7 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -186,7 +186,7 @@ CREATE TABLE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`.`plugins` ( `Id` INT(10) NOT NULL AUTO_INCREMENT, `FileName` VARCHAR(255) NOT NULL, - `Name` VARCHAR(11) NOT NULL, + `Name` VARCHAR(56) NOT NULL, `Type` VARCHAR(12) NOT NULL, `Owner` VARCHAR(25) NOT NULL, `Permission` VARCHAR(5) NOT NULL,