Skip to content

Commit

Permalink
fix wbstats upgrade.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Bleiweis committed May 1, 2017
1 parent 02e3ae2 commit 6788de5
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions wbce/modules/wbstats/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,11 @@
*
*/

defined('WB_PATH') OR die(header('Location: ../index.php'));
/* -------------------------------------------------------- */
// Must include code to stop this file being accessed directly
if(!defined('WB_PATH')) {


function _db_add_field($field, $table, $desc) {
global $database;
$table = TABLE_PREFIX.$table;
$query = $database->query("DESCRIBE $table '$field'");
if(!$query || $query->numRows() == 0) { // add field
$query = $database->query("ALTER TABLE $table ADD $field $desc");
//echo (mysql_error()?mysql_error().'<br />':'');
$query = $database->query("DESCRIBE $table '$field'");
//echo (mysql_error()?mysql_error().'<br />':'');
}
require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php');
throw new IllegalFileException();
}

//_db_add_field("`session`", "mod_wbstats_ips", "varchar(64) NOT NULL default '' AFTER `ip`");
//_db_add_field("`page`", "mod_wbstats_ips", "varchar(255) NOT NULL default '' AFTER `online`");
//_db_add_field("`loggedin`", "mod_wbstats_ips", "int(1) NOT NULL default '0' AFTER `page`");
//_db_add_field("`bots`", "mod_wbstats_day", "int(1) NOT NULL default '0' AFTER `view`");

/* -------------------------------------------------------- */

0 comments on commit 6788de5

Please sign in to comment.