PluginProbe
The WP Remote WordPress Plugin / 6.36
The WP Remote WordPress Plugin v6.36
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | callback/wings/account.php +17 -9 5.226.36 View file →
@@ -5,9 +5,9 @@
5 5 class BVAccountCallback extends BVCallbackBase {
6 6 public $account;
7 7 public $settings;
8 8
9 - const ACCOUNT_WING_VERSION = 1.1;
9 + const ACCOUNT_WING_VERSION = 1.2;
10 10
11 11 public function __construct($callback_handler) {
12 12 $this->account = $callback_handler->account;
13 13 $this->settings = $callback_handler->settings;
@@ -46,24 +46,24 @@
46 46 $account = $this->account;
47 47 $settings = $this->settings;
48 48 switch ($request->method) {
49 49 case "addacc":
50 - WPRAccount::addAccount($this->settings, $params['public'], $params['secret']);
51 - $resp = array("status" => WPRAccount::exists($this->settings, $params['public']));
50 + WPRAccount::addAccount($settings, $params['public'], $params['secret']);
51 + $resp = array("status" => WPRAccount::exists($settings, $params['public']));
52 52 break;
53 53 case "rmacc":
54 - $resp = array("status" => WPRAccount::remove($this->settings, $params['public']));
54 + $resp = array("status" => WPRAccount::remove($settings, $params['public']));
55 55 break;
56 56 case "updt":
57 57 $account->updateInfo($params);
58 - $resp = array("status" => WPRAccount::exists($this->settings, $params['pubkey']));
58 + $resp = array("status" => WPRAccount::exists($settings, $params['pubkey']));
59 59 break;
60 60 case "updtapikey":
61 - WPRAccount::updateApiPublicKey($this->settings, $params['pubkey']);
62 - $resp = array("status" => $this->settings->getOption(WPRAccount::$api_public_key));
61 + WPRAccount::updateApiPublicKey($settings, $params['pubkey']);
62 + $resp = array("status" => $settings->getOption(WPRAccount::$api_public_key));
63 63 break;
64 64 case "rmbvscrt":
65 - $resp = array("status" => $settings->deleteOption('bvSecretKey'));
65 + $resp = array("status" => WPRRecover::deleteDefaultSecret($settings));
66 66 break;
67 67 case "rmbvkeys":
68 68 $resp = array("status" => $settings->deleteOption('bvKeys'));
69 69 break;
@@ -73,9 +73,17 @@
73 73 case "rmoldbvacc":
74 74 $resp = array("status" => $settings->deleteOption('bvAccounts'));
75 75 break;
76 76 case "fetch":
77 - $resp = array("status" => WPRAccount::allAccounts($this->settings));
77 + $accounts = WPRAccount::allAccounts($settings);
78 + if (!isset($params['full'])) {
79 + foreach ($accounts as &$account) {
80 + if (isset($account['secret'])) {
81 + unset($account['secret']);
82 + }
83 + }
84 + }
85 + $resp = array("status" => $accounts);
78 86 break;
79 87 case "updtinfo":
80 88 $resp = $this->updateInfo($params);
81 89 break;