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


PHP UsersLastImport::undo方法代码示例

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


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

示例1: display

 /** 
  * display the form
  */
 public function display()
 {
     global $mod_strings, $current_user, $current_language;
     $this->ss->assign("MOD", $mod_strings);
     $this->ss->assign("IMPORT_MODULE", $_REQUEST['import_module']);
     // lookup this module's $mod_strings to get the correct module name
     $old_mod_strings = $mod_strings;
     $module_mod_strings = return_module_language($current_language, $_REQUEST['import_module']);
     $this->ss->assign("MODULENAME", $module_mod_strings['LBL_MODULE_NAME']);
     // reset old ones afterwards
     $mod_strings = $old_mod_strings;
     $last_import = new UsersLastImport();
     $this->ss->assign('UNDO_SUCCESS', $last_import->undo($_REQUEST['import_module']));
     $this->ss->assign("JAVASCRIPT", $this->_getJS());
     $this->ss->display('modules/Import/tpls/undo.tpl');
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:19,代码来源:view.undo.php

示例2: getParenttab

}
if (!isset($_REQUEST['return_id'])) {
    $_REQUEST['return_id'] = '';
}
if (!isset($_REQUEST['return_module'])) {
    $_REQUEST['return_module'] = '';
}
if (!isset($_REQUEST['return_action'])) {
    $_REQUEST['return_action'] = '';
}
$parenttab = getParenttab();
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$log->info("Import Undo");
$last_import = new UsersLastImport();
$ret_value = $last_import->undo($current_user->id);
// vtlib customization: Invoke undo import function of the module.
$module = $_REQUEST['module'];
$undo_focus = CRMEntity::getInstance($module);
if (method_exists($undo_focus, 'undo_import')) {
    $ret_value += $undo_focus->undo_import($module, $current_user->id);
}
// END
?>

<br>


<table align="center" cellpadding="5" cellspacing="0" width="95%" class="mailClient importLeadUI small">
        <tr>
         <td bgcolor="#FFFFFF" height="50" valign="middle" align="left" class="mailClientBg genHeaderSmall"> <?php 
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:ImportStepundo.php

示例3: testUndoRemovedAddedEmailAddresses

 /**
  * @ticket 21828
  */
 public function testUndoRemovedAddedEmailAddresses()
 {
     $time = date('Y-m-d H:i:s');
     $unid = uniqid();
     $focus = new Account();
     $focus->id = "Account_" . $unid;
     $focus->save();
     $last_import = new UsersLastImport();
     $last_import->assigned_user_id = $GLOBALS['current_user']->id;
     $last_import->import_module = 'Accounts';
     $last_import->bean_type = 'Account';
     $last_import->bean_id = $focus->id;
     $last_import->save();
     $this->email_addr_bean_rel_id = 'email_addr_bean_rel_' . $unid;
     $this->email_address_id = 'email_address_id_' . $unid;
     $GLOBALS['db']->query("insert into email_addr_bean_rel (id , email_address_id, bean_id, bean_module, primary_address, date_created , date_modified) values ('{$this->email_addr_bean_rel_id}', '{$this->email_address_id}', '{$focus->id}', 'Accounts', 1, '{$time}', '{$time}')");
     $GLOBALS['db']->query("insert into email_addresses (id , email_address, email_address_caps, date_created, date_modified) values ('{$this->email_address_id}', 'test@g.com', 'TEST@G.COM', '{$time}', '{$time}')");
     // setup
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $this->assertTrue($last_import->undo($last_import->import_module));
     // teardown
     unset($GLOBALS['beanList']);
     unset($GLOBALS['beanFiles']);
     $result = $GLOBALS['db']->query("SELECT * FROM email_addr_bean_rel where id = '{$this->email_addr_bean_rel_id}'");
     $rows = $GLOBALS['db']->fetchByAssoc($result);
     $this->assertFalse($rows);
     $result = $GLOBALS['db']->query("SELECT * FROM email_addresses where id = '{$this->email_address_id}'");
     $rows = $GLOBALS['db']->fetchByAssoc($result);
     $this->assertFalse($rows);
     $GLOBALS['db']->query("DELETE FROM users_last_import WHERE id = '{$last_import->id}'");
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:36,代码来源:UsersLastImportTest.php

示例4: _undoCreatedBeans

 /**
  * If a bean save is not done for some reason, this method will undo any of the beans that were created
  *
  * @param array $ids ids of user_last_import records created
  */
 protected function _undoCreatedBeans(array $ids)
 {
     $focus = new UsersLastImport();
     foreach ($ids as $id) {
         $focus->undo($id);
     }
 }
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:12,代码来源:view.step4.php


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