PluginProbe
The WP Remote WordPress Plugin / 5.72
The WP Remote WordPress Plugin v5.72
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
wpremote / protect / logger / db.php

db.php in The WP Remote WordPress Plugin 5.72, at protect/logger/db.php

26 lines 679 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH') && !defined('MCDATAPATH')) exit;
3
4 if (!class_exists('WPRProtectLoggerDB_V572')) :
5 class WPRProtectLoggerDB_V572 {
6 private $tablename;
7 private $bv_tablename;
8
9 const MAXROWCOUNT = 100000;
10
11 function __construct($tablename) {
12 $this->tablename = $tablename;
13 $this->bv_tablename = WPRProtect_V572::$db->getBVTable($tablename);
14 }
15
16 public function log($data) {
17 if (is_array($data)) {
18 if (WPRProtect_V572::$db->rowsCount($this->bv_tablename) > WPRProtectLoggerDB_V572::MAXROWCOUNT) {
19 WPRProtect_V572::$db->deleteRowsFromtable($this->tablename, 1);
20 }
21
22 WPRProtect_V572::$db->replaceIntoBVTable($this->tablename, $data);
23 }
24 }
25 }
26 endif;