Skip to:
Content

BuddyPress.org

Changeset 15 for trunk/bp_messages.php


Ignore:
Timestamp:
04/07/2008 09:35:36 PM (19 years ago)
Author:
apeatling
Message:

Fixed DB errors on field adding, saving and deleting (all caused by fields with no children). Made sure that field children are deleted in the DB when their parent is deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp_messages.php

    r14 r15  
    2626
    2727        $sql = "CREATE TABLE ". $table_name ." (
    28                   id mediumint(9) NOT NULL AUTO_INCREMENT,
    29                   sender_id mediumint(9) NOT NULL,
    30                   recipient_id mediumint(9) NOT NULL,
     28                  id int(11) NOT NULL AUTO_INCREMENT,
     29                  sender_id int(11) NOT NULL,
     30                  recipient_id int(11) NOT NULL,
     31                  folder_id tinyint(1) NOT NULL DEFAULT 1,
    3132                  subject varchar(200) NOT NULL,
    3233                  message longtext NOT NULL,
    … …  
    7071
    7172        /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */
    72         if($wpdb->get_var("show tables like '$table_name'") != $table_name) messages_install();
     73        if($wpdb->get_var("show tables like '%" . $table_name . "%'") == false) messages_install();
    7374}
    7475add_action('admin_menu','messages_add_menu');
Note: See TracChangeset for help on using the changeset viewer.