当前位置: 首页>>代码示例>>PHP>>正文


PHP Utils_RecordBrowserCommon::delete_record_field方法代码示例

本文整理汇总了PHP中Utils_RecordBrowserCommon::delete_record_field方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils_RecordBrowserCommon::delete_record_field方法的具体用法?PHP Utils_RecordBrowserCommon::delete_record_field怎么用?PHP Utils_RecordBrowserCommon::delete_record_field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utils_RecordBrowserCommon的用法示例。


在下文中一共展示了Utils_RecordBrowserCommon::delete_record_field方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: uninstall

 public function uninstall()
 {
     Utils_RecordBrowserCommon::delete_record_field('company', 'County');
     Utils_RecordBrowserCommon::delete_record_field('contact', 'County');
     Utils_RecordBrowserCommon::delete_record_field('contact', 'Home County');
     return true;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:7,代码来源:CountyInstall.php

示例2: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
if (DB::GetOne('SELECT 1 FROM utils_attachment_field WHERE field=%s', array('Date'))) {
    Utils_RecordBrowserCommon::new_record_field('utils_attachment', array('name' => _M('Edited on'), 'type' => 'timestamp', 'extra' => false, 'visible' => true, 'required' => false, 'display_callback' => array('Utils_AttachmentCommon', 'display_date'), 'QFfield_callback' => array('Utils_AttachmentCommon', 'QFfield_date'), 'position' => 'Date'));
    DB::Execute('UPDATE utils_attachment_data_1 SET f_edited_on=f_date');
    Utils_RecordBrowserCommon::delete_record_field('utils_attachment', 'Date');
    Utils_RecordBrowserCommon::wipe_access('utils_attachment');
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'view', 'ACCESS:employee', array('(!permission' => 2, '|:Created_by' => 'USER_ID'));
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'delete', 'ACCESS:employee', array(':Created_by' => 'USER_ID'));
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'delete', array('ACCESS:employee', 'ACCESS:manager'));
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'add', 'ACCESS:employee', array(), array('edited_on'));
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'edit', 'ACCESS:employee', array('(permission' => 0, '|:Created_by' => 'USER_ID'), array('edited_on'));
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:14,代码来源:20140621_date_to_timestamp.php

示例3: view_field


//.........这里部分代码省略.........
			$form->freeze('rset');
		}
		
		if ($action=='edit') {
			$display_callbacback = DB::GetOne('SELECT callback FROM '.$this->tab.'_callback WHERE freezed=1 AND field=%s', array($field));
			$QFfield_callbacback = DB::GetOne('SELECT callback FROM '.$this->tab.'_callback WHERE freezed=0 AND field=%s', array($field));
			$form->setDefaults(array('display_callback'=>$display_callbacback));
			$form->setDefaults(array('QFfield_callback'=>$QFfield_callbacback));
		}

        if ($form->validate()) {
            $data = $form->exportValues();
            $data['caption'] = trim($data['caption']);
            $data['field'] = trim($data['field']);
			$type = DB::GetOne('SELECT type FROM '.$this->tab.'_field WHERE field=%s', array($field));
			if (!isset($data['select_data_type'])) $data['select_data_type'] = $type;
            if ($action=='add')
                $field = $data['field'];
            $id = preg_replace('/[^a-z0-9]/','_',strtolower($field));
            $new_id = preg_replace('/[^a-z0-9]/','_',strtolower($data['field']));
            if (preg_match('/^[a-z0-9_]*$/',$id)==0) trigger_error('Invalid column name: '.$field);
            if (preg_match('/^[a-z0-9_]*$/',$new_id)==0) trigger_error('Invalid new column name: '.$data['field']);
			$param = '';
			switch ($data['select_data_type']) {
                case 'autonumber':
                    $data['required'] = false;
                    $data['filter'] = false;
                    $param = Utils_RecordBrowserCommon::encode_autonumber_param(
                            $data['autonumber_prefix'],
                            $data['autonumber_pad_length'],
                            $data['autonumber_pad_mask']);
                    // delete field and add again later to generate values
                    if ($action != 'add') {
                        Utils_RecordBrowserCommon::delete_record_field($this->tab, $field);
                        $action = 'add';
                        $field = $data['field'];
                    }
                    break;
				case 'checkbox': 
							$data['required'] = false;
							break;
				case 'text': if ($action=='add') $param = $data['text_length'];
							else {
								if ($data['text_length']<$row['param']) trigger_error('Invalid field length', E_USER_ERROR);
								$param = $data['text_length'];
								if ($data['text_length']!=$row['param']) {
									if(DB::is_postgresql())
										DB::Execute('ALTER TABLE '.$this->tab.'_data_1 ALTER COLUMN f_'.$id.' TYPE VARCHAR('.$param.')');
									else
										DB::Execute('ALTER TABLE '.$this->tab.'_data_1 MODIFY f_'.$id.' VARCHAR('.$param.')');
								}
							}
							break;
				case 'select':
							if ($data['data_source']=='commondata') {
								if ($data['select_type']=='select') {
									$param = Utils_RecordBrowserCommon::encode_commondata_param(array('order_by_key'=>$data['order_by']=='key', 'array_id'=>$data['commondata_table']));
									$data['select_data_type'] = 'commondata';
								} else {
									$param = '__COMMON__::'.$data['commondata_table'].'::'.$data['order_by'];
									$data['select_data_type'] = 'multiselect';
								}
							} else {
								$data['select_data_type'] = $data['select_type'];
								if (!isset($row) || !isset($row['param'])) $row['param'] = ';::';
								$props = explode(';', $row['param']);
开发者ID:62BRAINS,项目名称:EPESI,代码行数:67,代码来源:RecordBrowser_0.php

示例4: uninstall

 public function uninstall()
 {
     Utils_RecordBrowserCommon::delete_addon('company', 'CRM_Contacts_ParentCompany', 'parent_company_addon');
     Utils_RecordBrowserCommon::delete_record_field('company', 'Parent Company');
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:6,代码来源:ParentCompanyInstall.php

示例5: delete_record_field

 public function delete_record_field($field_name)
 {
     Utils_RecordBrowserCommon::delete_record_field($this->tab, $field_name);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:4,代码来源:Recordset.php

示例6: uninstall

 public function uninstall()
 {
     Utils_RecordBrowserCommon::delete_record_field('company', 'Account Manager');
     Utils_RecordBrowserCommon::delete_browse_mode_details_callback('company', 'CRM/Contacts/AccountManager', 'browse_mode_details');
     return true;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:6,代码来源:AccountManagerInstall.php

示例7: defined

defined("_VALID_ACCESS") || die('Direct access forbidden');
$deadline_field_is_not_timestamp = !DB::GetOne('SELECT 1 FROM task_field WHERE field=%s AND type=%s', array('Deadline', 'timestamp'));
if ($deadline_field_is_not_timestamp) {
    PatchUtil::db_alter_column('task_data_1', 'f_deadline', 'T');
    DB::Execute('UPDATE task_field SET type=%s WHERE field=%s', array('timestamp', 'Deadline'));
}
$tab = 'task';
$field = array('name' => _M('Timeless'), 'type' => 'checkbox', 'required' => false, 'extra' => false, 'position' => 'Deadline', 'QFfield_callback' => 'CRM_TasksCommon::QFfield_timeless');
Utils_RecordBrowserCommon::new_record_field($tab, $field);
$deadline_time_field_exists = DB::GetOne('SELECT 1 FROM task_field WHERE field=%s', array('Deadline Time'));
$sql = false;
if ($deadline_time_field_exists) {
    if (DB::is_mysql()) {
        $sql = 'UPDATE task_data_1 SET f_deadline = TIMESTAMP(f_deadline, TIME(f_deadline_time)), f_timeless = (f_deadline_time IS NULL)';
    } else {
        $sql = 'UPDATE task_data_1 SET f_deadline = f_deadline + CAST(f_deadline_time as time), f_timeless = (f_deadline_time IS NULL)::int';
    }
} elseif ($deadline_field_is_not_timestamp) {
    if (DB::is_mysql()) {
        $sql = 'UPDATE task_data_1 SET f_deadline = TIMESTAMP(f_deadline, \'12:00:00\'), f_timeless = 1';
    } else {
        $sql = 'UPDATE task_data_1 SET f_deadline = f_deadline + CAST(\'12:00:00\' as time), f_timeless = 1';
    }
}
if ($sql) {
    DB::Execute($sql);
}
if ($deadline_time_field_exists) {
    Utils_RecordBrowserCommon::delete_record_field('task', 'Deadline Time');
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:30,代码来源:20151109_timeless_task.php

示例8: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
//addons table
$fields = array(array('name' => _M('Recordset'), 'type' => 'text', 'param' => 64, 'display_callback' => array('CRM_PhoneCallCommon', 'display_recordset'), 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_recordset'), 'required' => true, 'extra' => false, 'visible' => true));
Utils_RecordBrowserCommon::install_new_recordset('phonecall_related', $fields);
Utils_RecordBrowserCommon::set_caption('phonecall_related', _M('Meeting Related Recordsets'));
Utils_RecordBrowserCommon::register_processing_callback('phonecall_related', array('CRM_PhoneCallCommon', 'processing_related'));
Utils_RecordBrowserCommon::add_access('phonecall_related', 'view', 'ACCESS:employee');
Utils_RecordBrowserCommon::add_access('phonecall_related', 'add', 'ADMIN');
Utils_RecordBrowserCommon::add_access('phonecall_related', 'edit', 'SUPERADMIN');
Utils_RecordBrowserCommon::add_access('phonecall_related', 'delete', 'SUPERADMIN');
Utils_RecordBrowserCommon::new_record_field('phonecall', array('name' => _M('Related'), 'type' => 'multiselect', 'param' => '__RECORDSETS__::;CRM_PhoneCallCommon::related_crits', 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_related'), 'extra' => false, 'required' => false, 'visible' => true));
$rel = Utils_RecordBrowserCommon::get_records('phonecall', array('!related_to' => ''));
foreach ($rel as $r) {
    $rr = array();
    foreach ($r['related_to'] as $id) {
        $rr[] = 'contact/' . $id;
    }
    Utils_RecordBrowserCommon::update_record('phonecall', $r['id'], array('related' => $rr), false, null, true);
}
Utils_RecordBrowserCommon::delete_record_field('phonecall', 'Related to');
开发者ID:cretzu89,项目名称:EPESI,代码行数:22,代码来源:20141218_related.php

示例9: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
if (ModuleManager::is_installed('CRM_Roundcube') >= 0) {
    Utils_RecordBrowserCommon::delete_record_field('rc_mails', 'Direction');
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:6,代码来源:crm_roundcube_remove_direction.php


注:本文中的Utils_RecordBrowserCommon::delete_record_field方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。