/** * 插件禁用 * @param null * @return mixed */ function callback_rm() { $Juser = Juser::getInstance(); #禁用插件 删除评论表mail字段的索引 $dropIndexSQl = 'DROP INDEX mail ON `' . DB_PREFIX . 'comment`'; $Juser->getDbInstance()->query($dropIndexSQl, true); }
function juser_data_backup() { global $tables; $Juser = Juser::getInstance(); $JuserModel = $Juser->getDbInstance(); $isExist = $JuserModel->query('show tables like "' . $Juser->getTable() . '"'); if ($JuserModel->num_rows($isExist) != 0) { array_push($tables, 'juser_data'); } }
function __construct() { $this->tableName = DB_PREFIX . 'comment'; $Juser = Juser::getInstance(); $this->Db = $Juser->getDbInstance(); $Filed = $this->getDbFields(); foreach ($Filed as $key => $value) { $this->tableField .= $this->parseKey($value) . ','; } $this->tableField = rtrim($this->tableField, ','); }