mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
bug fix in plugin installation
--HG-- branch : Gsoc14-ryzomAppImprovements
This commit is contained in:
parent
750ded21bd
commit
a01e331639
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue