PluginProbe
The WP Remote WordPress Plugin / 4.79
The WP Remote WordPress Plugin v4.79
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 / wp / logger.php

logger.php in The WP Remote WordPress Plugin 4.79, at protect/wp/logger.php

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