PluginProbe
The WP Remote WordPress Plugin / 6.76
The WP Remote WordPress Plugin v6.76
6.76 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 All 54 releases
← All changes | callback/wings/actlog.php +15 -4 6.476.76 View file →
@@ -8,9 +8,9 @@
8 8 class WPRActLogCallback extends WPRCallbackBase {
9 9 public $db;
10 10 public $settings;
11 11
12 - const ACTLOG_WING_VERSION = 1.0;
12 + const ACTLOG_WING_VERSION = 1.2;
13 13
14 14 public function __construct($callback_handler) {
15 15 $this->db = $callback_handler->db;
16 16 $this->settings = $callback_handler->settings;
@@ -29,10 +29,10 @@
29 29 site_id int NOT NULL,
30 30 user_id int DEFAULT 0,
31 31 username text DEFAULT '',
32 32 request_id text DEFAULT '',
33 - ip varchar(20) DEFAULT '',
34 - event_type varchar(40) NOT NULL DEFAULT '',
33 + ip varchar(50) DEFAULT '',
34 + event_type varchar(60) NOT NULL DEFAULT '',
35 35 event_data mediumtext NOT NULL,
36 36 time int,
37 37 PRIMARY KEY (id)
38 38 ) $charset_collate;";
@@ -38,8 +38,16 @@
38 38 ) $charset_collate;";
39 39 return $db->createTable($query, BVWPActLog::$actlog_table, $usedbdelta);
40 40 }
41 41
42 + # The server confirms this migration before enabling the modern capture policy.
43 + public function alterActLogTable() {
44 + $table = $this->db->getBVTable(BVWPActLog::$actlog_table);
45 + $query = "ALTER TABLE $table MODIFY ip varchar(" . BVWPActLog::IP_MAX_LENGTH . ") DEFAULT '', " .
46 + "MODIFY event_type varchar(" . BVWPActLog::EVENT_TYPE_MAX_LENGTH . ") NOT NULL DEFAULT ''";
47 + return $this->db->alterBVTable($query, BVWPActLog::$actlog_table);
48 + }
49 +
42 50 public function process($request) {
43 51 $settings = $this->settings;
44 52 $params = $request->params;
45 53 switch ($request->method) {
@@ -52,8 +60,11 @@
52 60 case "createactlogtable":
53 61 $usedbdelta = array_key_exists('usedbdelta', $params);
54 62 $resp = array("status" => $this->createActLogTable($usedbdelta));
55 63 break;
64 + case "alteractlogtable":
65 + $resp = array("status" => $this->alterActLogTable());
66 + break;
56 67 default:
57 68 $resp = false;
58 69 }
59 70 return $resp;
@@ -58,5 +69,5 @@
58 69 }
59 70 return $resp;
60 71 }
61 72 }
62 -endif;
73 +endif;