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


PHP DynamicField::deleteCache方法代码示例

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


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

示例1: process

 function process($option)
 {
     switch ($option) {
         case 'ViewCustomFields':
             parent::process($option);
             require_once 'modules/Studio/EditCustomFields/ListView.php';
             break;
         case 'CreateCustomFields':
             if (empty($_REQUEST['to_pdf'])) {
                 parent::process($option);
             }
             require_once 'modules/Studio/EditCustomFields/EditView.php';
             break;
         case 'SaveCustomField':
             require_once 'modules/Studio/EditCustomFields/Save.php';
             break;
         case 'DeleteCustomField':
             require_once 'modules/Studio/EditCustomFields/Delete.php';
             break;
         case 'EditCustomField':
             parent::process($option);
             require_once 'modules/Studio/EditCustomFields/EditView.php';
             break;
         case 'ClearCache':
             require_once 'modules/DynamicFields/DynamicField.php';
             DynamicField::deleteCache();
             echo '<script>YAHOO.util.Event.addListener(window, "load", function(){ajaxStatus.showStatus("cache cleared");window.setTimeout(\'ajaxStatus.hideStatus();\', 2000);});</script>';
             parent::process($option);
             break;
         case 'RepairCustomFields':
             header('Location: index.php?module=Administration&action=UpgradeFields');
             sugar_cleanup(true);
         default:
             parent::process($option);
     }
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:36,代码来源:EditCustomFieldsWizard.php

示例2: drop_tables

 /**
  * Delete the primary table for the module implementing the class.
  * If custom fields were added to this table/module, the custom table will be removed too, along with the cache
  * entries that define the custom fields.
  *
  */
 function drop_tables()
 {
     global $dictionary;
     $key = $this->getObjectName();
     if (!array_key_exists($key, $dictionary)) {
         $GLOBALS['log']->fatal("drop_tables: Metadata for table " . $this->table_name . " does not exist");
         echo "meta data absent for table " . $this->table_name . "<br>\n";
     } else {
         if (empty($this->table_name)) {
             return;
         }
         if ($this->db->tableExists($this->table_name)) {
             $this->dbManager->dropTable($this);
         }
         if ($this->db->tableExists($this->table_name . '_cstm')) {
             $this->dbManager->dropTableName($this->table_name . '_cstm');
             DynamicField::deleteCache();
         }
         if ($this->db->tableExists($this->get_audit_table_name())) {
             $this->dbManager->dropTableName($this->get_audit_table_name());
         }
     }
 }
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:29,代码来源:SugarBean.php

示例3: unset

            }
            unset($fields[$col]);
            echo "Dropping Column {$col} from {$mod->table_name}" . "_cstm for module {$the_module}<br>";
        } else {
            if ($col != 'id_c') {
                //$db_data_type = $dbManager->helper->getColumnType(strtolower($the_field->data_type));
                $db_data_type = strtolower(str_replace(' ', '', $the_field->get_db_type()));
                $type = strtolower(str_replace(' ', '', $type));
                if (strcmp($db_data_type, $type) != 0) {
                    echo "Fixing Column Type for {$col} changing {$type} to " . $db_data_type . "<br>";
                    if (!$simulate) {
                        $db->query($the_field->get_db_modify_alter_table($mod->table_name . '_cstm'));
                    }
                }
            }
            unset($fields[$col]);
        }
    }
    echo sizeof($fields) . " field(s) missing from {$mod->table_name}" . "_cstm<br>";
    foreach ($fields as $field) {
        echo "Adding Column {$field} to {$mod->table_name}" . "_cstm<br>";
        if (!$simulate) {
            $mod->custom_fields->add_existing_custom_field($field);
        }
    }
}
DynamicField::deleteCache();
echo '<br>Done<br>';
if ($simulate) {
    echo '<a href="index.php?module=Administration&action=UpgradeFields&run=true">Execute non-simulation mode</a>';
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:UpgradeFields.php

示例4: dropFieldById

 function dropFieldById($id)
 {
     $result = $GLOBALS['db']->query("SELECT custom_module, name FROM fields_meta_data WHERE id='{$id}'");
     if ($row = $GLOBALS['db']->fetchByAssoc($result)) {
         $GLOBALS['db']->query("DELETE FROM  fields_meta_data WHERE id='{$id}'");
         $db_name = ' COLUMN ' . $row['name'];
         $module = $row['custom_module'];
         if (!empty($GLOBALS['beanList'][$module])) {
             $class = $GLOBALS['beanList'][$module];
             require_once $GLOBALS['beanFiles'][$class];
             $mod = new $class();
             $GLOBALS['db']->query("ALTER TABLE " . $mod->table_name . "_cstm DROP {$db_name}");
         }
     }
     DynamicField::deleteCache();
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:16,代码来源:DynamicField.php


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