Plugin Directory

Changeset 941280


Ignore:
Timestamp:
06/30/2014 11:45:31 PM (12 years ago)
Author:
momen2009
Message:

[wp-member-page]It supports the site prefix is different in the same database.

Location:
wp-member-page/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-member-page/trunk/dao/WpMemberPageDao.php

    r940629 r941280  
    55class WpMemberPageDao extends Dao{
    66   
     7    private $table;
     8   
     9    public function __construct(){
     10        global $wpdb;
     11        $this->table = $wpdb->prefix."member_page";
     12    }
     13   
    714    public function search($array){
    8         $sql = "select * from wp_member_page where ";
     15        $sql = "select * from {$this->table} where ";
    916        $index = 0;
    1017        foreach($array as $key => $value){
     
    3643        $password = $this -> quote_smart($this -> encryption($entity -> getPassword()));
    3744        global $wpdb;
    38         $sql = $wpdb->prepare("update wp_member_page set id = '%s',
     45        $sql = $wpdb->prepare("update {$this->table} set id = '%s',
    3946                              post_id = '%s',
    4047                            member_id = '%s',
     
    5057        $password = $this -> quote_smart($this -> encryption($entity -> getPassword()));
    5158        global $wpdb;
    52         $sql = $wpdb->prepare("insert into wp_member_page(post_id,
     59        $sql = $wpdb->prepare("insert into {$this->table}(post_id,
    5360                                         member_id,
    5461                                          password)
     
    6370        $id = $this -> quote_smart($id);
    6471        global $wpdb;
    65         $sql = $wpdb->prepare("delete from wp_member_page where id = %s",$id);
     72        $sql = $wpdb->prepare("delete from {$this->table} where id = %s",$id);
    6673        return $this -> sendQuery($sql);
    6774    }
  • wp-member-page/trunk/readme.txt

    r940954 r941280  
    44Requires at least: 3.0
    55Tested up to: 3.0
    6 Stable tag: 1.2
     6Stable tag: 1.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2929= 1.2 =
    3030* To change the display style of the first row and the first row of the member list page.
     31
     32= 1.3 =
     33* It supports the site prefix is different in the same database.
  • wp-member-page/trunk/wp-member-page.php

    r940958 r941280  
    44Plugin URI: http://www.elegants.biz/Products/WpMemberPage
    55Description: Plug-in to create a membership page with basic authentication.
    6 Version: 1.2
     6Version: 1.3
    77Author: momen2009
    88Author URI: http://www.elegants.biz/
     
    3939class WpMemberPage{
    4040   
    41     var $table = "wp_member_page";
     41    var $table;
    4242    var $version = 0.1;
     43    var $db_version;
    4344   
    4445    function activate(){
     
    9394    function __construct(){
    9495        global $wpdb;
    95         $this->db = $wpdb->prefix.$this->db;
     96        $this->table = $wpdb->prefix."member_page";
    9697        $this->db_version = get_option('afb_db_version', 0);
    9798    }
Note: See TracChangeset for help on using the changeset viewer.