本文整理汇总了PHP中config_flush_cache函数的典型用法代码示例。如果您正苦于以下问题:PHP config_flush_cache函数的具体用法?PHP config_flush_cache怎么用?PHP config_flush_cache使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了config_flush_cache函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: config_delete_project
/**
* delete the config entry
*
* @param integer $p_project A project identifier.
* @return void
*/
function config_delete_project($p_project = ALL_PROJECTS)
{
$t_query = 'DELETE FROM {config} WHERE project_id=' . db_param();
db_query($t_query, array($p_project));
# flush cache here in case some of the deleted configs are in use.
config_flush_cache();
}
示例2: array
exit;
}
}
$t_failed_ids = array();
if (0 != $f_custom_field_id) {
$t_custom_field_def = custom_field_get_definition($f_custom_field_id);
}
foreach ($f_bug_arr as $t_bug_id) {
bug_ensure_exists($t_bug_id);
$t_bug = bug_get($t_bug_id, true);
if ($t_bug->project_id != helper_get_current_project()) {
# in case the current project is not the same project of the bug we are viewing...
# ... override the current project. This to avoid problems with categories and handlers lists etc.
$g_project_override = $t_bug->project_id;
# @todo (thraxisp) the next line goes away if the cache was smarter and used project
config_flush_cache();
# flush the config cache so that configs are refetched
}
$t_status = $t_bug->status;
switch ($f_action) {
case 'CLOSE':
$t_closed = config_get('bug_closed_status_threshold');
if (access_can_close_bug($t_bug)) {
if ($t_status < $t_closed && bug_check_workflow($t_status, $t_closed)) {
# @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $f_bug_id, $t_bug_data, $f_bugnote_text ) );
bug_close($t_bug_id, $f_bug_notetext, $f_bug_noteprivate);
helper_call_custom_function('issue_update_notify', array($t_bug_id));
} else {
$t_failed_ids[$t_bug_id] = lang_get('bug_actiongroup_status');
}
} else {
示例3: config_delete_project
function config_delete_project( $p_project = ALL_PROJECTS ) {
global $g_cache_config, $g_cache_config_access;
$t_config_table = db_get_table( 'config' );
$c_project = db_prepare_int( $p_project );
$query = "DELETE FROM $t_config_table
WHERE project_id=" . db_param();
$result = @db_query_bound( $query, Array( $c_project ) );
# flush cache here in case some of the deleted configs are in use.
config_flush_cache();
}
示例4: install_check_config_serialization
/**
* Schema update to migrate config data from php serialization to json.
* This ensures it is not possible to execute code during un-serialization
*/
function install_check_config_serialization()
{
$query = 'SELECT * FROM {config} WHERE type=3';
$t_result = db_query($query);
while ($t_row = db_fetch_array($t_result)) {
$config_id = $t_row['config_id'];
$project_id = (int) $t_row['project_id'];
$user_id = (int) $t_row['user_id'];
$value = $t_row['value'];
$t_config = unserialize($value);
if ($t_config === false) {
return 1;
# Fatal: invalid data found in config table
}
$t_json_config = json_encode($t_config);
$t_query = 'UPDATE {config} SET value=' . db_param() . ' WHERE config_id=' . db_param() . ' AND project_id=' . db_param() . ' AND user_id=' . db_param();
db_query($t_query, array($t_json_config, $config_id, $project_id, $user_id));
}
# flush config here as we've changed the format of the configuration table
config_flush_cache();
# Return 2 because that's what ADOdb/DataDict does when things happen properly
return 2;
}
示例5: config_delete_project
function config_delete_project($p_project = ALL_PROJECTS)
{
global $g_cache_config, $g_cache_config_access;
$t_config_table = config_get_global('mantis_config_table');
$c_project = db_prepare_int($p_project);
$query = "DELETE FROM {$t_config_table}\r\n\t\t\t\tWHERE project_id={$c_project}";
$result = @db_query($query);
# flush cache here in case some of the deleted configs are in use.
config_flush_cache();
}
示例6: array
$t_failed_ids = array();
if ( 0 != $f_custom_field_id ) {
$t_custom_field_def = custom_field_get_definition( $f_custom_field_id );
}
foreach( $f_bug_arr as $t_bug_id ) {
bug_ensure_exists( $t_bug_id );
$t_bug = bug_get( $t_bug_id, true );
if( $t_bug->project_id != helper_get_current_project() ) {
# in case the current project is not the same project of the bug we are viewing...
# ... override the current project. This to avoid problems with categories and handlers lists etc.
$g_project_override = $t_bug->project_id;
/** @todo (thraxisp) the next line goes away if the cache was smarter and used project */
config_flush_cache(); # flush the config cache so that configs are refetched
}
$t_status = $t_bug->status;
switch ( $f_action ) {
case 'CLOSE':
$t_closed = config_get( 'bug_closed_status_threshold' );
if ( access_can_close_bug( $t_bug_id ) &&
( $t_status < $t_closed ) &&
bug_check_workflow( $t_status, $t_closed ) ) {
/** @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $f_bug_id, $t_bug_data, $f_bugnote_text ) ); */
bug_close( $t_bug_id, $f_bug_notetext, $f_bug_noteprivate );
helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
示例7: config_delete_project
/**
* delete the config entry
*
* @param int $p_project project id
*/
function config_delete_project($p_project = ALL_PROJECTS)
{
$t_config_table = db_get_table('config');
$query = "DELETE FROM {$t_config_table}\n\t\t\t\tWHERE project_id=" . db_param();
$result = db_query_bound($query, array($p_project));
# flush cache here in case some of the deleted configs are in use.
config_flush_cache();
}