Ejemplo n.º 1
0
/**
 * 插件禁用
 * @param null
 * @return mixed
 */
function callback_rm()
{
    $Juser = Juser::getInstance();
    #禁用插件 删除评论表mail字段的索引
    $dropIndexSQl = 'DROP INDEX mail ON `' . DB_PREFIX . 'comment`';
    $Juser->getDbInstance()->query($dropIndexSQl, true);
}
Ejemplo n.º 2
0
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');
    }
}
Ejemplo n.º 3
0
 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, ',');
 }