mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
bug fix in plugin installation
This commit is contained in:
parent
4087169084
commit
771070ab19
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
|
// check for the version for the plugin
|
||||||
$db = new DBLayer( "lib" );
|
$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 = $sth -> fetch();
|
||||||
$info['Info'] = json_decode( $info['Info'] );
|
$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.
|
// then there MUST be an increment in the Y value.
|
||||||
// When there is increment in the X value , Y and Z MUST be 0.
|
// When there is increment in the X value , Y and Z MUST be 0.
|
||||||
// comparing if there is some change
|
// comparing if there is some change
|
||||||
if ( !array_intersect( $new_version , $pre_version ) )
|
if ( !array_diff( $new_version , $pre_version ) )
|
||||||
{
|
{
|
||||||
// removing the uploaded file
|
// removing the uploaded file
|
||||||
Plugincache :: rrmdir( $tempPath . "/test/" . $fileName );
|
Plugincache :: rrmdir( $tempPath . "/test/" . $fileName );
|
||||||
return '2';
|
return '2'; //plugin already exists
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -186,7 +186,7 @@
|
||||||
CREATE TABLE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`.`plugins` (
|
CREATE TABLE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`.`plugins` (
|
||||||
`Id` INT(10) NOT NULL AUTO_INCREMENT,
|
`Id` INT(10) NOT NULL AUTO_INCREMENT,
|
||||||
`FileName` VARCHAR(255) NOT NULL,
|
`FileName` VARCHAR(255) NOT NULL,
|
||||||
`Name` VARCHAR(11) NOT NULL,
|
`Name` VARCHAR(56) NOT NULL,
|
||||||
`Type` VARCHAR(12) NOT NULL,
|
`Type` VARCHAR(12) NOT NULL,
|
||||||
`Owner` VARCHAR(25) NOT NULL,
|
`Owner` VARCHAR(25) NOT NULL,
|
||||||
`Permission` VARCHAR(5) NOT NULL,
|
`Permission` VARCHAR(5) NOT NULL,
|
||||||
|
|
Loading…
Reference in a new issue