• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP event_signal函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中event_signal函数的典型用法代码示例。如果您正苦于以下问题:PHP event_signal函数的具体用法?PHP event_signal怎么用?PHP event_signal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: render_ready_function

 function render_ready_function()
 {
     $html = '<script type="text/javascript">' . "\n" . '//<![CDATA[' . "\n" . '$(document).ready(function() {' . "\n";
     $parts = event_signal('EVENT_LAYOUT_RESOURCES_JQUERY_ONLOAD');
     foreach ($parts as $part) {
         $html .= $part['onload'];
     }
     $html .= '});' . "\n" . '//]]>' . "\n" . '</script>' . "\n";
     return $html;
 }
开发者ID:74Labs,项目名称:mantisbt-jquery,代码行数:10,代码来源:jQuery.php


示例2: log_event

/**
 * Log an event
 * @param int $p_level
 * @param string $p_msg
 * @return null
 */
function log_event($p_level, $p_msg)
{
    global $g_log_levels;
    # check to see if logging is enabled
    $t_sys_log = config_get_global('log_level');
    if (0 == ($t_sys_log & $p_level)) {
        return;
    }
    $t_now = date(config_get_global('complete_date_format'));
    $t_level = $g_log_levels[$p_level];
    $t_plugin_event = '[' . $t_level . '] ' . $p_msg;
    if (function_exists('event_signal')) {
        event_signal('EVENT_LOG', array($t_plugin_event));
    }
    $t_php_event = $t_now . ' ' . $t_level . ' ' . $p_msg;
    $t_log_destination = config_get_global('log_destination');
    if (is_blank($t_log_destination)) {
        $t_destination = '';
    } else {
        # Use @ to avoid error when there is no delimiter in log destination
        @(list($t_destination, $t_modifiers) = explode(':', $t_log_destination, 2));
    }
    switch ($t_destination) {
        case 'file':
            error_log($t_php_event . PHP_EOL, 3, $t_modifiers);
            break;
        case 'firebug':
            if (!class_exists('FirePHP')) {
                if (file_exists(BASE_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php')) {
                    require_once BASE_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php';
                }
            }
            if (class_exists('FirePHP')) {
                static $firephp;
                if ($firephp === null) {
                    $firephp = FirePHP::getInstance(true);
                }
                $firephp->log($t_php_event);
                return;
            }
            // if firebug is not available, fall through
        // if firebug is not available, fall through
        default:
            # use default PHP error log settings
            error_log($t_php_event . PHP_EOL);
            break;
    }
    # If running from command line, echo log event to stdout
    if (php_sapi_name() == 'cli') {
        echo $t_php_event . PHP_EOL;
    }
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:58,代码来源:logging_api.php


示例3: get

 /**
  * Gets the avatar information for the user.  The avatars are provided by
  * plugins that can integrate with a variety of services like gravatar.com,
  * LDAP, Social Identities, etc.
  *
  * If logged in user doesn't have access to view avatars or not avatar is found,
  * then a default avatar will be used.
  *
  * Note that the provided user id may no longer has a corresponding user in the
  * system, if the user was deleted.
  *
  * @param integer $p_user_id  The user id.
  * @param integer $p_size     The desired width/height of the avatar.
  *
  * @return array The array with avatar information.
  */
 public static function get($p_user_id, $p_size = 80)
 {
     $t_enabled = config_get('show_avatar') !== OFF;
     $t_avatar = null;
     if ($t_enabled) {
         $t_user_exists = user_exists($p_user_id);
         if ($t_user_exists && access_has_project_level(config_get('show_avatar_threshold'), null, $p_user_id)) {
             $t_avatar = event_signal('EVENT_USER_AVATAR', array($p_user_id, $p_size));
         }
         if ($t_avatar === null) {
             $t_avatar = new Avatar();
         }
         $t_avatar->normalize($p_user_id, $t_user_exists);
     }
     return $t_avatar;
 }
开发者ID:spring,项目名称:spring-website,代码行数:32,代码来源:Avatar.class.php


示例4: filter_get_plugin_filters

/**
 * Allow plugins to define a set of class-based filters, and register/load
 * them here to be used by the rest of filter_api.
 * @return array Mapping of field name to filter object
 */
function filter_get_plugin_filters()
{
    static $s_field_array = null;
    if (is_null($s_field_array)) {
        $s_field_array = array();
        $t_all_plugin_filters = event_signal('EVENT_FILTER_FIELDS');
        foreach ($t_all_plugin_filters as $t_plugin => $t_plugin_filters) {
            foreach ($t_plugin_filters as $t_callback => $t_plugin_filter_array) {
                if (is_array($t_plugin_filter_array)) {
                    foreach ($t_plugin_filter_array as $t_filter_class) {
                        if (class_exists($t_filter_class) && is_subclass_of($t_filter_class, 'MantisFilter')) {
                            $t_filter_object = new $t_filter_class();
                            $t_field_name = $t_plugin . '_' . $t_filter_object->field;
                            $s_field_array[$t_field_name] = $t_filter_object;
                        }
                    }
                }
            }
        }
    }
    return $s_field_array;
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:27,代码来源:filter_api.php


示例5: columns_get_plugin_columns

/**
 * Allow plugins to define a set of class-based columns, and register/load
 * them here to be used by columns_api.
 * @return array Mapping of column name to column object
 */
function columns_get_plugin_columns()
{
    static $s_column_array = null;
    if (is_null($s_column_array)) {
        $s_column_array = array();
        $t_all_plugin_columns = event_signal('EVENT_FILTER_COLUMNS');
        foreach ($t_all_plugin_columns as $t_plugin => $t_plugin_columns) {
            foreach ($t_plugin_columns as $t_callback => $t_plugin_column_array) {
                if (is_array($t_plugin_column_array)) {
                    foreach ($t_plugin_column_array as $t_column_class) {
                        if (class_exists($t_column_class) && is_subclass_of($t_column_class, 'MantisColumn')) {
                            $t_column_object = new $t_column_class();
                            $t_column_name = utf8_strtolower($t_plugin . '_' . $t_column_object->column);
                            $s_column_array[$t_column_name] = $t_column_object;
                        }
                    }
                }
            }
        }
    }
    return $s_column_array;
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:27,代码来源:columns_api.php


示例6: helper_get_tab_index

</label>
		</th>
		<td>
			<select <?php 
    echo helper_get_tab_index();
    ?>
 id="target_version" name="target_version">
				<?php 
    print_version_option_list('', null, VERSION_FUTURE);
    ?>
			</select>
		</td>
	</tr>
<?php 
}
event_signal('EVENT_REPORT_BUG_FORM', array($t_project_id));
?>
	<tr>
		<th class="category">
			<span class="required">*</span><label for="summary"><?php 
print_documentation_link('summary');
?>
</label>
		</th>
		<td>
			<input <?php 
echo helper_get_tab_index();
?>
 type="text" id="summary" name="summary" size="105" maxlength="128" value="<?php 
echo string_attribute($f_summary);
?>
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:bug_report_page.php


示例7: init

 /**
  * Initialize the extension cache.
  */
 public static function init()
 {
     if (is_array(self::$cache) && !empty(self::$cache)) {
         return;
     }
     $t_raw_data = event_signal('EVENT_SOURCE_INTEGRATION');
     foreach ($t_raw_data as $t_plugin => $t_callbacks) {
         foreach ($t_callbacks as $t_callback => $t_object) {
             if (is_subclass_of($t_object, 'MantisSourcePlugin') && is_string($t_object->type) && !is_blank($t_object->type)) {
                 $t_type = strtolower($t_object->type);
                 self::$cache[$t_type] = new SourceVCSWrapper($t_object);
             }
         }
     }
     ksort(self::$cache);
 }
开发者ID:Sansumaki,项目名称:source-integration,代码行数:19,代码来源:Source.API.php


示例8: print_bug_attachment_header

/**
 * Prints a single textual line of information about an attachment including download link, file
 * size and upload timestamp.
 * @param array $p_attachment An attachment array from within the array returned by the file_get_visible_attachments() function.
 * @return void
 */
function print_bug_attachment_header(array $p_attachment)
{
    echo "\n";
    if ($p_attachment['exists']) {
        if ($p_attachment['can_download']) {
            echo '<a href="' . string_attribute($p_attachment['download_url']) . '">';
        }
        print_file_icon($p_attachment['display_name']);
        if ($p_attachment['can_download']) {
            echo '</a>';
        }
        echo lang_get('word_separator');
        if ($p_attachment['can_download']) {
            echo '<a href="' . string_attribute($p_attachment['download_url']) . '">';
        }
        echo string_display_line($p_attachment['display_name']);
        if ($p_attachment['can_download']) {
            echo '</a>';
        }
        echo lang_get('word_separator') . '(' . number_format($p_attachment['size']) . lang_get('word_separator') . lang_get('bytes') . ')';
        echo lang_get('word_separator') . '<span class="italic">' . date(config_get('normal_date_format'), $p_attachment['date_added']) . '</span>';
        event_signal('EVENT_VIEW_BUG_ATTACHMENT', array($p_attachment));
    } else {
        print_file_icon($p_attachment['display_name']);
        echo lang_get('word_separator') . '<span class="strike">' . string_display_line($p_attachment['display_name']) . '</span>' . lang_get('word_separator') . '(' . lang_get('attachment_missing') . ')';
    }
    if ($p_attachment['can_delete']) {
        echo lang_get('word_separator') . '[';
        print_link('bug_file_delete.php?file_id=' . $p_attachment['id'] . form_security_param('bug_file_delete'), lang_get('delete_link'), false, 'small');
        echo ']';
    }
}
开发者ID:gtn,项目名称:mantisbt,代码行数:38,代码来源:print_api.php


示例9: string_display_links

            break;
    }
    echo string_display_links($t_bugnote->note);
    ?>
	</td>
</tr>
<?php 
    event_signal('EVENT_VIEW_BUGNOTE', array($f_bug_id, $t_bugnote->id, VS_PRIVATE == $t_bugnote->view_state));
    ?>
<tr class="spacer">
	<td colspan="2"></td>
</tr>
<?php 
}
# end for loop
event_signal('EVENT_VIEW_BUGNOTES_END', $f_bug_id);
?>
</table>
<?php 
if ($t_total_time > 0 && access_has_bug_level(config_get('time_tracking_view_threshold'), $f_bug_id)) {
    echo '<p class="time-tracking-total">', sprintf(lang_get('total_time_for_issue'), '<span class="time-tracked">' . db_minutes_to_hhmm($t_total_time) . '</span>'), '</p>';
}
collapse_closed('bugnotes');
?>

<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		<?php 
collapse_icon('bugnotes');
?>
开发者ID:nextgens,项目名称:mantisbt,代码行数:31,代码来源:bugnote_view_inc.php


示例10: require_api

require_api('error_api.php');
require_api('event_api.php');
require_api('form_api.php');
require_api('gpc_api.php');
require_api('print_api.php');
require_api('string_api.php');
form_security_validate('bugnote_update');
$f_bugnote_id = gpc_get_int('bugnote_id');
$f_bugnote_text = gpc_get_string('bugnote_text', '');
$f_time_tracking = gpc_get_string('time_tracking', '0:00');
# Check if the current user is allowed to edit the bugnote
$t_user_id = auth_get_current_user_id();
$t_reporter_id = bugnote_get_field($f_bugnote_id, 'reporter_id');
if ($t_user_id == $t_reporter_id) {
    access_ensure_bugnote_level(config_get('bugnote_user_edit_threshold'), $f_bugnote_id);
} else {
    access_ensure_bugnote_level(config_get('update_bugnote_threshold'), $f_bugnote_id);
}
# Check if the bug is readonly
$t_bug_id = bugnote_get_field($f_bugnote_id, 'bug_id');
if (bug_is_readonly($t_bug_id)) {
    error_parameters($t_bug_id);
    trigger_error(ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR);
}
$f_bugnote_text = trim($f_bugnote_text) . "\n\n";
bugnote_set_text($f_bugnote_id, $f_bugnote_text);
bugnote_set_time_tracking($f_bugnote_id, $f_time_tracking);
# Plugin integration
event_signal('EVENT_BUGNOTE_EDIT', array($t_bug_id, $f_bugnote_id));
form_security_purge('bugnote_update');
print_successful_redirect(string_get_bug_view_url($t_bug_id) . '#bugnotes');
开发者ID:kaos,项目名称:mantisbt,代码行数:31,代码来源:bugnote_update.php


示例11: version_update

        }
        if (is_null($obsolete)) {
            $version->obsolete = false;
        } else {
            if ($obsolete == 'on') {
                $version->obsolete = true;
            }
        }
        if (!is_null($date_order)) {
            $new_date_order = $date_order[$version_index];
            $version->date_order = $new_date_order;
        }
        if (!is_null($type)) {
            $new_type = $type[$version_index];
            if (strlen($new_type) > 0) {
                $new_type_id = $specmanagement_database_api->get_type_id($new_type);
                $specmanagement_database_api->update_version_associated_type($project_id, $version_ids[$version_index], $new_type_id);
            } else {
                $specmanagement_database_api->update_version_associated_type($project_id, $version_ids[$version_index], 9999);
            }
        }
        if (!is_null($description)) {
            $new_description = $description[$version_index];
            $version->description = $new_description;
        }
        version_update($version);
        event_signal('EVENT_MANAGE_VERSION_UPDATE', array($version_id));
    }
}
form_security_purge('plugin_SpecManagement_manage_versions_update');
print_successful_redirect(plugin_page('manage_versions', true));
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:31,代码来源:manage_versions_update.php


示例12: bugnote_add

/**
 * Add a bugnote to a bug
 * return the ID of the new bugnote
 * @param int $p_bug_id bug id
 * @param string $p_bugnote_text bugnote text
 * @param string $p_time_tracking hh:mm string
 * @param bool $p_private whether bugnote is private
 * @param int $p_type bugnote type
 * @param string $p_attr
 * @param int $p_user_id user id
 * @param bool $p_send_email generate email?
 * @return false|int false or indicating bugnote id added
 * @access public
 */
function bugnote_add($p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_private = false, $p_type = BUGNOTE, $p_attr = '', $p_user_id = null, $p_send_email = TRUE, $p_log_history = TRUE)
{
    $c_bug_id = db_prepare_int($p_bug_id);
    $c_time_tracking = helper_duration_to_minutes($p_time_tracking);
    $c_type = db_prepare_int($p_type);
    if (REMINDER !== $p_type) {
        # Check if this is a time-tracking note
        $t_time_tracking_enabled = config_get('time_tracking_enabled');
        if (ON == $t_time_tracking_enabled && $c_time_tracking > 0) {
            $t_time_tracking_without_note = config_get('time_tracking_without_note');
            if (is_blank($p_bugnote_text) && OFF == $t_time_tracking_without_note) {
                error_parameters(lang_get('bugnote'));
                trigger_error(ERROR_EMPTY_FIELD, ERROR);
            }
            $c_type = TIME_TRACKING;
        } else {
            if (is_blank($p_bugnote_text)) {
                # This is not time tracking (i.e. it's a normal bugnote)
                # @todo should we not trigger an error in this case ?
                return false;
            }
        }
    }
    $t_bugnote_text_table = db_get_table('mantis_bugnote_text_table');
    $t_bugnote_table = db_get_table('mantis_bugnote_table');
    # Event integration
    $t_bugnote_text = event_signal('EVENT_BUGNOTE_DATA', $p_bugnote_text, $c_bug_id);
    # insert bugnote text
    $query = 'INSERT INTO ' . $t_bugnote_text_table . ' ( note ) VALUES ( ' . db_param() . ' )';
    db_query_bound($query, array($t_bugnote_text));
    # retrieve bugnote text id number
    $t_bugnote_text_id = db_insert_id($t_bugnote_text_table);
    # get user information
    if ($p_user_id === null) {
        $c_user_id = auth_get_current_user_id();
    } else {
        $c_user_id = db_prepare_int($p_user_id);
    }
    # Check for private bugnotes.
    # @@@ VB: Should we allow users to report private bugnotes, and possibly see only their own private ones
    if ($p_private && access_has_bug_level(config_get('private_bugnote_threshold'), $p_bug_id, $c_user_id)) {
        $t_view_state = VS_PRIVATE;
    } else {
        $t_view_state = VS_PUBLIC;
    }
    # insert bugnote info
    $query = "INSERT INTO {$t_bugnote_table}\n\t\t\t\t(bug_id, reporter_id, bugnote_text_id, view_state, date_submitted, last_modified, note_type, note_attr, time_tracking )\n\t\t\tVALUES\n\t\t\t\t(" . db_param() . ', ' . db_param() . ',' . db_param() . ', ' . db_param() . ', ' . db_param() . ',' . db_param() . ', ' . db_param() . ', ' . db_param() . ', ' . db_param() . ' )';
    db_query_bound($query, array($c_bug_id, $c_user_id, $t_bugnote_text_id, $t_view_state, db_now(), db_now(), $c_type, $p_attr, $c_time_tracking));
    # get bugnote id
    $t_bugnote_id = db_insert_id($t_bugnote_table);
    # update bug last updated
    bug_update_date($p_bug_id);
    # log new bug
    if (TRUE == $p_log_history) {
        history_log_event_special($p_bug_id, BUGNOTE_ADDED, bugnote_format_id($t_bugnote_id));
    }
    # if it was FEEDBACK its NEW_ now
    if (config_get('reassign_on_feedback') && bug_get_field($p_bug_id, 'status') == config_get('bug_feedback_status') && bug_get_field($p_bug_id, 'reporter_id') == $c_user_id) {
        if (bug_get_field($p_bug_id, 'handler_id') == 0) {
            bug_set_field($p_bug_id, 'status', config_get('bug_submit_status'));
        } else {
            bug_set_field($p_bug_id, 'status', config_get('bug_assigned_status'));
        }
    }
    # Event integration
    event_signal('EVENT_BUGNOTE_ADD', array($p_bug_id, $t_bugnote_id));
    # only send email if the text is not blank, otherwise, it is just recording of time without a comment.
    if (TRUE == $p_send_email && !is_blank($t_bugnote_text)) {
        email_bugnote_add($p_bug_id);
    }
    return $t_bugnote_id;
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:86,代码来源:bugnote_api.php


示例13: lang_get

}
echo lang_get('viewing_bugs_title');
echo " ({$v_start} - {$v_end} / {$t_bug_count})";
?>
 </span>

		<span class="floatleft small">
		<?php 
# -- Print and Export links --
echo '&#160;';
print_bracket_link('print_all_bug_page.php', lang_get('print_all_bug_page_link'));
echo '&#160;';
print_bracket_link('csv_export.php', lang_get('csv_export'));
echo '&#160;';
print_bracket_link('excel_xml_export.php', lang_get('excel_export'));
$t_event_menu_options = $t_links = event_signal('EVENT_MENU_FILTER');
foreach ($t_event_menu_options as $t_plugin => $t_plugin_menu_options) {
    foreach ($t_plugin_menu_options as $t_callback => $t_callback_menu_options) {
        if (!is_array($t_callback_menu_options)) {
            $t_callback_menu_options = array($t_callback_menu_options);
        }
        foreach ($t_callback_menu_options as $t_menu_option) {
            if ($t_menu_option) {
                print_bracket_link_prepared($t_menu_option);
            }
        }
    }
}
?>
 </span>
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:30,代码来源:view_all_inc.php


示例14: lang_get

?>
>
	<td class="category">
		<?php 
echo lang_get('obsolete');
?>
	</td>
	<td>
		<input type="checkbox" name="obsolete" <?php 
check_checked($t_version->obsolete, true);
?>
 />
	</td>
</tr>
<?php 
event_signal('EVENT_MANAGE_VERSION_UPDATE_FORM', array($t_version->id));
?>
<tr>
	<td>
		&#160;
	</td>
	<td>
		<input type="submit" class="button" value="<?php 
echo lang_get('update_version_button');
?>
" />
	</td>
</tr>
</table>
</form>
</div>
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:manage_proj_ver_edit_page.php


示例15: plugin_init_installed

/**
 * Initialize all installed plugins.
 * Post-signals EVENT_PLUGIN_INIT.
 */
function plugin_init_installed()
{
    if (OFF == config_get_global('plugins_enabled') || !db_table_exists(db_get_table('plugin'))) {
        return;
    }
    global $g_plugin_cache, $g_plugin_current, $g_plugin_cache_priority, $g_plugin_cache_protected, $g_plugin_cache_init;
    $g_plugin_cache = array();
    $g_plugin_current = array();
    $g_plugin_cache_init = array();
    $g_plugin_cache_priority = array();
    $g_plugin_cache_protected = array();
    plugin_register('MantisCore');
    plugin_register_installed();
    $t_plugins = array_keys($g_plugin_cache);
    do {
        $t_continue = false;
        $t_plugins_retry = array();
        foreach ($t_plugins as $t_basename) {
            if (plugin_init($t_basename)) {
                $t_continue = true;
            } else {
                # Dependent plugin
                $t_plugins_retry[] = $t_basename;
            }
        }
        $t_plugins = $t_plugins_retry;
    } while ($t_continue);
    event_signal('EVENT_PLUGIN_INIT');
}
开发者ID:Kirill,项目名称:mantisbt,代码行数:33,代码来源:plugin_api.php


示例16: require_api

    require_api('authentication_api.php');
    if (auth_is_user_authenticated()) {
        require_api('user_pref_api.php');
        $t_user_timezone = user_pref_get_pref(auth_get_current_user_id(), 'timezone');
        if (!is_blank($t_user_timezone)) {
            date_default_timezone_set($t_user_timezone);
        }
    }
}
if (!defined('MANTIS_MAINTENANCE_MODE')) {
    require_api('collapse_api.php');
    collapse_cache_token();
}
# Load custom functions
require_api('custom_function_api.php');
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'custom_functions_inc.php')) {
    require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'custom_functions_inc.php';
}
# Set HTTP response headers
require_api('http_api.php');
http_all_headers();
# Push default language to speed calls to lang_get
if (!defined('LANG_LOAD_DISABLED')) {
    require_api('lang_api.php');
    lang_push(lang_get_default());
}
# Signal plugins that the core system is loaded
if (!defined('PLUGINS_DISABLED') && !defined('MANTIS_MAINTENANCE_MODE')) {
    require_api('event_api.php');
    event_signal('EVENT_CORE_READY');
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:31,代码来源:core.php


示例17: bugnote_get_all_bugnotes

    # copy notes from parent
    if ($f_copy_notes_from_parent) {
        $t_parent_bugnotes = bugnote_get_all_bugnotes($f_master_bug_id);
        foreach ($t_parent_bugnotes as $t_parent_bugnote) {
            $t_private = $t_parent_bugnote->view_state == VS_PRIVATE;
            bugnote_add($t_bug_id, $t_parent_bugnote->note, $t_parent_bugnote->time_tracking, $t_private, $t_parent_bugnote->note_type, $t_parent_bugnote->note_attr, $t_parent_bugnote->reporter_id, FALSE, FALSE);
        }
    }
    # copy attachments from parent
    if ($f_copy_attachments_from_parent) {
        file_copy_attachments($f_master_bug_id, $t_bug_id);
    }
}
helper_call_custom_function('issue_create_notify', array($t_bug_id));
# Allow plugins to post-process bug data with the new bug ID
event_signal('EVENT_REPORT_BUG', array($t_bug_data, $t_bug_id));
email_new_bug($t_bug_id);
// log status and resolution changes if they differ from the default
if ($t_bug_data->status != config_get('bug_submit_status')) {
    history_log_event($t_bug_id, 'status', config_get('bug_submit_status'));
}
if ($t_bug_data->resolution != config_get('default_bug_resolution')) {
    history_log_event($t_bug_id, 'resolution', config_get('default_bug_resolution'));
}
form_security_purge('bug_report');
html_page_top1();
if (!$f_report_stay) {
    html_meta_redirect('view_all_bug_page.php');
}
html_page_top2();
?>
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:31,代码来源:bug_report.php


示例18: log_event

/**
 * Log an event
 * @param int $p_level Valid debug log level
 * @param string|array $p_msg Either a string, or an array structured as (string,execution time)
 * @param object $p_backtrace [Optional] debug_backtrace() stack to use 
 * @return null
 */
function log_event($p_level, $p_msg, $p_backtrace = null)
{
    global $g_log_levels;
    # check to see if logging is enabled
    $t_sys_log = config_get_global('log_level');
    if (0 == ($t_sys_log & $p_level)) {
        return;
    }
    if (is_array($p_msg)) {
        $t_event = $p_msg;
        $s_msg = var_export($p_msg, true);
    } else {
        $t_event = array($p_msg, 0);
        $s_msg = $p_msg;
    }
    if ($p_backtrace === null) {
        $t_backtrace = debug_backtrace();
    } else {
        $t_backtrace = $p_backtrace;
    }
    $t_caller = basename($t_backtrace[0]['file']);
    $t_caller .= ":" . $t_backtrace[0]['line'];
    # Is this called from another function?
    if (isset($t_backtrace[1])) {
        $t_caller .= ' ' . $t_backtrace[1]['function'] . '()';
    } else {
        # or from a script directly?
        $t_caller .= ' ' . $_SERVER['SCRIPT_NAME'];
    }
    $t_now = date(config_get_global('complete_date_format'));
    $t_level = $g_log_levels[$p_level];
    $t_plugin_event = '[' . $t_level . '] ' . $p_msg;
    if (function_exists('event_signal')) {
        event_signal('EVENT_LOG', array($t_plugin_event));
    }
    $t_log_destination = config_get_global('log_destination');
    if (is_blank($t_log_destination)) {
        $t_destination = '';
    } else {
        @(list($t_destination, $t_modifiers) = explode(':', $t_log_destination, 2));
    }
    switch ($t_destination) {
        case 'none':
            break;
        case 'file':
            $t_php_event = $t_now . ' ' . $t_level . ' ' . $s_msg;
            error_log($t_php_event . PHP_EOL, 3, $t_modifiers);
            break;
        case 'page':
            global $g_log_events;
            $g_log_events[] = array(time(), $p_level, $t_event, $t_caller);
            break;
        case 'firebug':
            if (!class_exists('FirePHP')) {
                if (file_exists(config_get_global('library_path') . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php')) {
                    require_lib('FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php');
                }
            }
            if (class_exists('FirePHP')) {
                static $firephp;
                if ($firephp === null) {
                    $firephp = FirePHP::getInstance(true);
                }
                $t_php_event = $t_now . ' ' . $t_level . ' ' . $s_msg;
                $firephp->log($p_msg, $t_php_event);
                return;
            }
            // if firebug is not available, fall through
        // if firebug is not available, fall through
        default:
            # use default PHP error log settings
            $t_php_event = $t_now . ' ' . $t_level . ' ' . $s_msg;
            error_log($t_php_event . PHP_EOL);
            break;
    }
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:83,代码来源:logging_api.php


示例19: lang_get

					<span class="input"><input type="text" id="project-file-path" name="file_path" size="60" maxlength="250" value="<?php 
    echo $t_file_path;
    ?>
" /></span>
					<span class="label-style"></span>
				</div><?php 
}
?>
			<div class="field-container">
				<label for="project-description"><span><?php 
echo lang_get('description');
?>
</span></label>
				<span class="textarea"><textarea id="project-description" name="description" cols="70" rows="5"></textarea></span>
				<span class="label-style"></span>
			</div>

			<?php 
event_signal('EVENT_MANAGE_PROJECT_CREATE_FORM');
?>

			<span class="submit-button"><input type="submit" class="button" value="<?php 
echo lang_get('add_project_button');
?>
" /></span>
		</fieldset>
	</form>
</div>

<?php 
html_page_bottom();
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:manage_proj_create_page.php


示例20: helper_alternate_class

    ?>
</b></td>
</tr>
<tr <?php 
    echo helper_alternate_class();
    ?>
>
	<td><?php 
    echo plugin_lang_get('manage_settings_license_info');
    ?>
</td>
	<td class="left" style="height:230px">
		<div class="applet-row">
		<?php 
    if (plugin_is_loaded('agileMantisExpert')) {
        event_signal('EVENT_LOAD_SETTINGS', array(auth_get_current_user_id()));
    } else {
        ?>
		<a href="<?php 
        echo AGILEMANTIS_EXPERT_DOWNLOAD_LINK;
        ?>
"><?php 
        echo plugin_lang_get('license_download');
        ?>
</a>
		<a href="<?php 
        echo AGILEMANTIS_ORDER_PAGE_URL;
        ?>
" style="padding-left:20px"><?php 
        echo plugin_lang_get('license_buy');
        ?>
开发者ID:CarlosPinedaT,项目名称:agileMantis,代码行数:31,代码来源:config.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP event_socket_create函数代码示例发布时间:2022-05-15
下一篇:
PHP event_set函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap