mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-14 03:09:04 +00:00
updating plugins
This commit is contained in:
parent
6b484f7cbb
commit
e44cd3d40e
2 changed files with 13 additions and 9 deletions
|
@ -157,12 +157,12 @@ function api_key_management_hook_load_db()
|
||||||
global $var_set;
|
global $var_set;
|
||||||
global $return_set;
|
global $return_set;
|
||||||
|
|
||||||
$db = new DBLayer( 'lib' );
|
$dbl = new DBLayer("lib");
|
||||||
|
|
||||||
if ( isset( $_SESSION['user'] ) )
|
if ( isset( $_SESSION['user'] ) )
|
||||||
{
|
{
|
||||||
// returns the registered keys
|
// returns the registered keys
|
||||||
$sth = $db -> select( 'ams_api_keys', array( 'user' => $_SESSION['user'] ), 'User = :user' );
|
$sth = $dbl -> select( 'ams_api_keys', array( 'user' => $_SESSION['user'] ), 'User = :user' );
|
||||||
$row = $sth -> fetchAll();
|
$row = $sth -> fetchAll();
|
||||||
$return_set['api_keys'] = $row;
|
$return_set['api_keys'] = $row;
|
||||||
|
|
||||||
|
@ -170,12 +170,16 @@ function api_key_management_hook_load_db()
|
||||||
$com = array_column( $return_set['api_keys'], 'UserCharacter' );
|
$com = array_column( $return_set['api_keys'], 'UserCharacter' );
|
||||||
|
|
||||||
// returns the characters with respect to the user id in the ring_tool->characters
|
// returns the characters with respect to the user id in the ring_tool->characters
|
||||||
$db = new DBLayer( 'ring' );
|
try {
|
||||||
$sth = $db -> selectWithParameter( 'char_name', 'characters' , array(), '1' );
|
$dbl = new DBLayer( 'ring' );
|
||||||
|
$sth = $dbl -> selectWithParameter( 'char_name', 'characters' , array(), '1' );
|
||||||
$row = $sth -> fetch();
|
$row = $sth -> fetch();
|
||||||
|
|
||||||
// loop through the character list and remove the character if already have an api key
|
// loop through the character list and remove the character if already have an api key
|
||||||
$return_set['characters'] = array_diff( $row, $com );
|
$return_set['characters'] = array_diff( $row, $com );
|
||||||
|
}catch( PDOException $e ) {
|
||||||
|
error_log($e->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,8 +119,8 @@ CREATE TABLE IF NOT EXISTS `plugins` (
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `plugins` (`Id`, `FileName`, `Name`, `Type`, `Owner`, `Permission`, `Status`, `Weight`, `Info`) VALUES
|
INSERT INTO `plugins` (`Id`, `FileName`, `Name`, `Type`, `Owner`, `Permission`, `Status`, `Weight`, `Info`) VALUES
|
||||||
(1, 'API_key_management', 'API_key_management', 'automatic', '', 'admin', 0, 0, '{"PluginName":"API Key Management","Description":"Provides public access to the API''s by generating access tokens.","Version":"1.0.0","Type":"automatic","TemplatePath":"..\\/..\\/..\\/private_php/ams\\/plugins\\/API_key_management\\/templates\\/index.tpl","":null}'),
|
(1, 'API_key_management', 'API_key_management', 'automatic', '', 'admin', 0, 0, '{"PluginName":"API Key Management","Description":"Provides public access to the API''s by generating access tokens.","Version":"1.0.0","Type":"automatic","TemplatePath":"..\\/..\\/..\\/private_php\\/ams\\/plugins\\/API_key_management\\/templates\\/index.tpl","":null}'),
|
||||||
(2, 'Achievements', 'Achievements', 'Manual', '', 'admin', 0, 0, '{"PluginName":"Achievements","Description":"Returns the achivements of a user with respect to the character =.","Version":"1.0.0","TemplatePath":"..\\/..\\/..\\/private_php/ams\\/plugins\\/Achievements\\/templates\\/index.tpl","Type":"Manual","":null}');
|
(2, 'Achievements', 'Achievements', 'Manual', '', 'admin', 0, 0, '{"PluginName":"Achievements","Description":"Returns the achivements of a user with respect to the character =.","Version":"1.0.0","TemplatePath":"..\\/..\\/..\\/private_php\\/ams\\/plugins\\/Achievements\\/templates\\/index.tpl","Type":"Manual","":null}');
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue