Esempio n. 1
0
 function dln_core_install_notification()
 {
     $sql = array();
     $charset_collate = dln_core_set_charset();
     $dln_prefix = dln_core_get_table_prefix();
     $sql[] = "CREATE TABLE {$dln_prefix}dln_notifications (\n\t  \t\t    id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t  \t\t    bp_id bigint(20) NOT NULL,\n\t\t\t    user_id bigint(20) NOT NULL,\n\t\t\t    item_id bigint(20) NOT NULL,\n\t\t\t    secondary_item_id bigint(20),\n\t  \t\t    component_name varchar(75) NOT NULL,\n\t\t\t    component_action varchar(75) NOT NULL,\n\t  \t\t    date_notified datetime NOT NULL,\n\t\t\t    is_new bool NOT NULL DEFAULT 0,\n\t\t        KEY item_id (item_id),\n\t\t\t    KEY secondary_item_id (secondary_item_id),\n\t\t\t    KEY user_id (user_id),\n\t\t\t    KEY is_new (is_new),\n\t\t\t    KEY component_name (component_name),\n\t \t   \t    KEY component_action (component_action),\n\t\t\t    KEY useritem (user_id,is_new)\n\t\t       ) {$charset_collate};";
     dbDelta($sql);
 }
Esempio n. 2
0
 private function setup_globals()
 {
     if (empty($this->table_prefix)) {
         $this->table_prefix = dln_core_get_table_prefix();
     }
     // Notifications Table
     $this->core = new stdClass();
     $this->core->table_name_notifications = $this->table_prefix . 'dln_notifications';
 }