Beispiel #1
0
	public function uninstall() {
		global $database;
		$ret = true;
		$ret &= DB::DropTable('utils_commondata_tree');
		Base_ThemeCommon::uninstall_default_theme($this->get_type());
		return $ret;
	}
Beispiel #2
0
 public function uninstall()
 {
     $ret = true;
     $ret &= DB::DropTable('utils_custommenu_entry');
     $ret &= DB::DropTable('utils_custommenu_page');
     return $ret;
 }
Beispiel #3
0
 public function uninstall()
 {
     $ret = true;
     $ret &= DB::DropTable('utils_filestorage_link');
     $ret &= DB::DropTable('utils_filestorage_files');
     return $ret;
 }
Beispiel #4
0
 public function uninstall()
 {
     Base_AclCommon::delete_permission('Calendar');
     DB::DropTable('crm_calendar_custom_events_handlers');
     Base_ThemeCommon::uninstall_default_theme('CRM/Calendar');
     return true;
 }
Beispiel #5
0
 public function uninstall()
 {
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     DB::DropTable('base_home_page');
     DB::DropTable('base_home_page_clearance');
     return true;
 }
Beispiel #6
0
	public function uninstall() {
		Base_AclCommon::delete_permission('Messenger Alerts');
		$ret = true;
		$ret &= DB::DropTable('utils_messenger_users');
		$ret &= DB::DropTable('utils_messenger_message');
		return $ret;
	}
Beispiel #7
0
 public function uninstall()
 {
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     DB::DropTable('epesi_store_modules');
     $this->remove_data_dir();
     return true;
 }
Beispiel #8
0
 public function uninstall()
 {
     $ret = true;
     $ret &= DB::DropTable('apps_shoutbox_messages');
     Base_AclCommon::delete_permission('Shoutbox');
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     return $ret;
 }
Beispiel #9
0
 public function uninstall()
 {
     Base_ThemeCommon::uninstall_default_theme(Base_User_LoginInstall::module_name());
     Variable::delete('host_ban_time');
     Variable::delete('host_ban_nr_of_tries');
     Variable::delete('host_ban_by_login');
     return DB::DropTable('user_password') && DB::DropTable('user_login_ban') && DB::DropTable('user_autologin') && DB::DropTable('user_reset_pass');
 }
Beispiel #10
0
 public function uninstall()
 {
     $ret = true;
     $ret &= DB::DropTable('base_notify');
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     Utils_CommonDataCommon::remove('Base_Notify');
     return $ret;
 }
Beispiel #11
0
 public function uninstall()
 {
     Base_AclCommon::delete_permission('Manage Perspective');
     $ret = true;
     $ret &= DB::DropTable('crm_filters_contacts');
     $ret &= DB::DropTable('crm_filters_group');
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     return $ret;
 }
Beispiel #12
0
	public function uninstall() {
		Base_ThemeCommon::uninstall_default_theme($this->get_type());
		$ret = true;
		$ret &= DB::DropTable('utils_watchdog_subscription');
		$ret &= DB::DropTable('utils_watchdog_category_subscription');
		$ret &= DB::DropTable('utils_watchdog_event');
		$ret &= DB::DropTable('utils_watchdog_category');
		return $ret;
	}
Beispiel #13
0
 public function uninstall()
 {
     Base_AclCommon::delete_permission('Advanced User Settings');
     global $database;
     $ret = true;
     $ret &= DB::DropTable('base_user_settings');
     Base_ThemeCommon::uninstall_default_theme(Base_User_SettingsInstall::module_name());
     return $ret;
 }
Beispiel #14
0
 public function uninstall()
 {
     Base_ThemeCommon::uninstall_default_theme('CRM/Contacts/Activities');
     Utils_RecordBrowserCommon::set_tpl('contact', Base_ThemeCommon::get_template_filename('CRM/Contacts', 'Contact'));
     Utils_RecordBrowserCommon::unregister_processing_callback('contact', array('CRM_Contacts_PhotoCommon', 'submit_contact'));
     $this->remove_data_dir();
     DB::DropTable(CRM_Contacts_PhotoCommon::table_name);
     return true;
 }
Beispiel #15
0
	public function uninstall() {
        DB::DropTable('recordbrowser_clipboard_pattern');
		DB::DropTable('recordbrowser_browse_mode_definitions');
		DB::DropTable('recordbrowser_addon');
		DB::DropTable('recordbrowser_table_properties');
		DB::DropTable('recordbrowser_datatype');
        Base_PrintCommon::unregister_printer('Utils_RecordBrowser_RecordPrinter');
		Base_ThemeCommon::uninstall_default_theme('Utils/RecordBrowser');
		return true;
	}
Beispiel #16
0
 public function uninstall()
 {
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     return DB::DropTable('available_modules') && Variable::delete('anonymous_setup') && Variable::delete('simple_setup');
 }
Beispiel #17
0
 public function uninstall()
 {
     DB::DropTable('utils_bbcode');
     return true;
 }
Beispiel #18
0
 public function uninstall()
 {
     return DB::DropTable('base_login_audit');
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     return true;
 }
<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
@DB::DropTable('home_page');
@DB::CreateTable('base_home_page', 'id I4 AUTO KEY,' . 'priority I4,' . 'home_page C(64)', array('constraints' => ''));
@DB::CreateTable('base_home_page_clearance', 'id I4 AUTO KEY,' . 'home_page_id I,' . 'clearance C(64)', array('constraints' => ', FOREIGN KEY (home_page_id) REFERENCES base_home_page(id)'));
Base_HomePageCommon::set_home_page(_M('Dashboard'), array('ACCESS:employee'));
Base_HomePageCommon::set_home_page(_M('My Contact'), array());
Beispiel #20
0
	public function uninstall() {
		Base_ThemeCommon::uninstall_default_theme($this->get_type());
		DB::DropTable('libs_tcpdf_pdf_index');
		return true;
	}
Beispiel #21
0
	public function uninstall() {
		Base_AclCommon::delete_permission('Attachments - view full download history');
		$ret = true;
		Variable::delete('utils_attachments_google_user');
		Variable::delete('utils_attachments_google_pass');

		DB::DropTable('utils_attachment_googledocs');
		$ret &= DB::DropTable('utils_attachment_download');
		$ret &= DB::DropTable('utils_attachment_file');
		$ret &= DB::DropTable('utils_attachment_local');
        Utils_RecordBrowserCommon::uninstall_recordset('utils_attachment');
		Base_ThemeCommon::uninstall_default_theme($this->get_type());
		return $ret;
	}
 public function uninstall()
 {
     DB::DropTable('recordbrowser_custom_recordsets');
     return true;
 }
Beispiel #23
0
 $exists = @DB::GetOne('SELECT 1 FROM modules WHERE NOT EXISTS (SELECT 1 FROM test WHERE 1=2)');
 if (!$exists) {
     $create = @DB::CreateTable('test', 'id I4 AUTO KEY', array('constraints' => ''));
     $alter = @DB::Execute('ALTER TABLE test ADD COLUMN field_name INTEGER');
 } else {
     $alter = $create = null;
 }
 $insert = @DB::Execute('INSERT INTO test (id) VALUES (1)');
 $update = @DB::Execute('UPDATE test SET id=1 WHERE id=1');
 if (DB::is_mysql()) {
     $lock = DB::GetOne('SELECT GET_LOCK(%s,%d)', array('test', ini_get('max_execution_time')));
     $lock &= !DB::GetOne('SELECT IS_FREE_LOCK(%s)', array('test'));
     $end_lock = DB::GetOne('SELECT RELEASE_LOCK(%s)', array('test'));
 }
 $delete = @DB::Execute('DELETE FROM test');
 $drop = @DB::DropTable('test');
 ob_end_clean();
 $db_tests = array();
 if ($create === null) {
     $db_tests[] = array('label' => 'CREATE permission', 'status' => 'Unknown', 'severity' => 1);
 } else {
     $db_tests[] = array('label' => 'CREATE permission', 'status' => $create ? 'OK' : 'Failed', 'severity' => $create ? 0 : 2);
 }
 if ($alter === null) {
     $db_tests[] = array('label' => 'ALTER permission', 'status' => 'Unknown', 'severity' => 1);
 } else {
     $db_tests[] = array('label' => 'ALTER permission', 'status' => $alter ? 'OK' : 'Failed', 'severity' => $alter ? 0 : 2);
 }
 $db_tests[] = array('label' => 'INSERT permission', 'status' => $insert ? 'OK' : 'Failed', 'severity' => $insert ? 0 : 2);
 $db_tests[] = array('label' => 'UPDATE permission', 'status' => $update ? 'OK' : 'Failed', 'severity' => $update ? 0 : 2);
 if (DB::is_mysql()) {
Beispiel #24
0
 public function uninstall()
 {
     Base_AclCommon::delete_permission('Dashboard');
     Base_ThemeCommon::uninstall_default_theme($this->get_type());
     $ret = true;
     $ret &= DB::DropTable('base_dashboard_settings');
     $ret &= DB::DropTable('base_dashboard_applets');
     $ret &= DB::DropTable('base_dashboard_default_settings');
     $ret &= DB::DropTable('base_dashboard_default_applets');
     $ret &= DB::DropTable('base_dashboard_users');
     return $ret;
 }
Beispiel #25
0
	public function uninstall() {
		$ret = true;
		$ret &= DB::DropTable('utils_filedownload_files');
		return $ret;
	}
 public static function uninstall_recordset($tab)
 {
     if (!self::check_table_name($tab, true)) {
         return;
     }
     self::$clear_get_val_cache = true;
     Utils_WatchdogCommon::unregister_category($tab);
     DB::DropTable($tab . '_callback');
     DB::DropTable($tab . '_recent');
     DB::DropTable($tab . '_favorite');
     DB::DropTable($tab . '_edit_history_data');
     DB::DropTable($tab . '_edit_history');
     DB::DropTable($tab . '_field');
     DB::DropTable($tab . '_data_1');
     DB::DropTable($tab . '_access_clearance');
     DB::DropTable($tab . '_access_fields');
     DB::DropTable($tab . '_access');
     DB::Execute('DELETE FROM recordbrowser_table_properties WHERE tab=%s', array($tab));
     DB::Execute('DELETE FROM recordbrowser_processing_methods WHERE tab=%s', array($tab));
     DB::Execute('DELETE FROM recordbrowser_browse_mode_definitions WHERE tab=%s', array($tab));
     DB::Execute('DELETE FROM recordbrowser_clipboard_pattern WHERE tab=%s', array($tab));
     DB::Execute('DELETE FROM recordbrowser_addon WHERE tab=%s', array($tab));
     return true;
 }
Beispiel #27
0
            $group_type = 'aro';
            $table = 'aro_groups';
            $query = 'SELECT id, parent_id, value, name, lft, rgt FROM ' . $table . ' WHERE id=' . $group_id;
            $arr = DB::GetRow($query);
            // END
            if ($arr[3] == $group) {
                return true;
            }
        }
        return false;
    }
}
foreach ($tables as $tab) {
    @DB::DropTable($tab . '_access_clearance');
    @DB::DropTable($tab . '_access_fields');
    @DB::DropTable($tab . '_access');
    DB::CreateTable($tab . '_access', 'id I AUTO KEY,' . 'action C(16),' . 'crits C(255)', array('constraints' => ''));
    DB::CreateTable($tab . '_access_fields', 'rule_id I,' . 'block_field C(32)', array('constraints' => ', FOREIGN KEY (rule_id) REFERENCES ' . $tab . '_access(id)'));
    DB::CreateTable($tab . '_access_clearance', 'rule_id I,' . 'clearance C(32)', array('constraints' => ', FOREIGN KEY (rule_id) REFERENCES ' . $tab . '_access(id)'));
}
Utils_RecordBrowserCommon::new_record_field('contact', array('name' => _M('Login Panel'), 'type' => 'page_split', 'param' => 1));
$fields = array(array('name' => _M('Username'), 'type' => 'calculated', 'required' => false, 'extra' => true, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_username')), array('name' => _M('Set Password'), 'type' => 'calculated', 'required' => false, 'extra' => true, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_password')), array('name' => _M('Confirm Password'), 'type' => 'calculated', 'required' => false, 'extra' => true, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_repassword')), array('name' => _M('Admin'), 'type' => 'calculated', 'required' => false, 'extra' => true, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_admin')), array('name' => _M('Access'), 'type' => 'multiselect', 'required' => false, 'param' => Utils_RecordBrowserCommon::multiselect_from_common('Contacts/Access'), 'extra' => true, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_access')));
foreach ($fields as $f) {
    Utils_RecordBrowserCommon::new_record_field('contact', $f);
}
$pos = DB::GetOne('SELECT position FROM contact_field WHERE field=%s', array('Login'));
$pos2 = DB::GetOne('SELECT position FROM contact_field WHERE field=%s', array('Username'));
DB::Execute('UPDATE contact_field SET position=position-1 WHERE position>%d AND position<%d', array($pos, $pos2));
DB::Execute('UPDATE contact_field SET position=%d, style=%s WHERE field=%s', array($pos2 - 1, '', 'Login'));
Utils_CommonDataCommon::extend_array('Contacts/Access', array('manager' => _M('Manager')));
$ret = DB::Execute('SELECT * FROM user_login');
Beispiel #28
0
	public function uninstall() {
		Base_ThemeCommon::uninstall_default_theme('Utils/Comment');
		return DB::DropTable('comment_report')
			&& DB::DropTable('comment');
	}
Beispiel #29
0
<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
if (ModuleManager::is_installed('Base_Acl') == -1) {
    return;
}
@DB::DropTable('base_acl_clearance');
DB::CreateTable('base_acl_clearance', 'id I4 AUTO KEY,' . 'callback C(128)', array('constraints' => ''));
DB::Execute('INSERT INTO base_acl_clearance (callback) VALUES (%s)', array('Base_AclCommon::basic_clearance'));
if (ModuleManager::is_installed('CRM_Contacts') == -1) {
    return;
}
DB::Execute('INSERT INTO base_acl_clearance (callback) VALUES (%s)', array('CRM_ContactsCommon::crm_clearance'));
Beispiel #30
0
function clean_database()
{
    require_once 'include/config.php';
    require_once 'include/database.php';
    $tables_db = DB::MetaTables();
    $tables = array();
    if (DB::is_mysql()) {
        DB::Execute('SET FOREIGN_KEY_CHECKS=0');
    }
    if (DB::is_postgresql() && strpos(DB::GetOne('SELECT version()'), 'PostgreSQL 8.2') !== false) {
        foreach ($tables_db as $t) {
            $idxs = DB::Execute('SELECT t.tgargs as args FROM pg_trigger t,pg_class c,pg_proc p WHERE t.tgenabled AND t.tgrelid = c.oid AND t.tgfoid = p.oid AND p.proname = \'RI_FKey_check_ins\' AND c.relname = \'' . strtolower($t) . '\' ORDER BY t.tgrelid');
            $matches = array(1 => array());
            while ($i = $idxs->FetchRow()) {
                $data = explode(chr(0), $i[0]);
                $matches[1][] = $data[0];
            }
            $num_keys = count($matches[1]);
            for ($i = 0; $i < $num_keys; $i++) {
                DB::Execute('ALTER TABLE ' . $t . ' DROP CONSTRAINT ' . $matches[1][$i]);
            }
        }
    }
    foreach ($tables_db as $t) {
        DB::DropTable($t);
    }
    if (DB::is_mysql()) {
        DB::Execute('SET FOREIGN_KEY_CHECKS=1');
    }
}