本文整理汇总了PHP中plugin_pop_current函数的典型用法代码示例。如果您正苦于以下问题:PHP plugin_pop_current函数的具体用法?PHP plugin_pop_current怎么用?PHP plugin_pop_current使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了plugin_pop_current函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display(BugData $p_bug, $p_columns_target)
{
plugin_push_current('RelationshipColumnView');
$p_bug_id = $p_bug->id;
echo GetRelationshipContent($p_bug_id, plugin_config_get('ShowRelationshipsColorful'), $p_columns_target == COLUMNS_TARGET_VIEW_PAGE, plugin_config_get('ShowRelationships'), plugin_config_get('ShowRelationshipIcons'));
plugin_pop_current();
}
开发者ID:QuestorX,项目名称:MantisBT-Plugin.RelationshipColumnView,代码行数:7,代码来源:RelationshipColumn.class.1.3.0.php
示例2: display
public function display($p_bug, $p_columns_target)
{
plugin_push_current('Source');
if (isset($this->changeset_cache[$p_bug->id])) {
echo '<a href="view.php?id=', $p_bug->id, '#changesets">', $this->changeset_cache[$p_bug->id], '</a>';
}
plugin_pop_current();
}
示例3: options
function options()
{
plugin_push_current('CustomerManagement');
if (access_has_global_level(plugin_config_get('view_customer_fields_threshold'))) {
$options = array(1 => lang_get('yes'), 2 => lang_get('no'));
}
plugin_pop_current();
return $options;
}
示例4: display
public function display($p_bug, $p_columns_target)
{
plugin_push_current('Timecard');
$p_bug_id = $p_bug->id;
$t_bug = TimecardBug::load($p_bug_id, true);
$t_bug->calculate();
if ($t_bug->estimate >= 0) {
echo $t_bug->estimate, plugin_lang_get('hours');
}
plugin_pop_current();
}
示例5: display
public function display($p_bug, $p_columns_target)
{
plugin_push_current('CustomerManagement');
if (access_has_global_level(plugin_config_get('view_customer_fields_threshold'))) {
$bugData = CustomerManagementDao::getBugData($p_bug->id);
if (count($bugData) > 0) {
$isBillable = CustomerManagementDao::getService($bugData['is_billable']);
echo string_display_line($isBillable ? lang_get('yes') : lang_get('no'));
}
}
plugin_pop_current();
}
示例6: options
function options()
{
plugin_push_current('CustomerManagement');
if (access_has_global_level(plugin_config_get('view_customer_fields_threshold'))) {
$options = array();
foreach (CustomerManagementDao::findAllGroups() as $group) {
$options[$group['id']] = $group['name'];
}
}
plugin_pop_current();
return $options;
}
示例7: display
public function display($p_bug, $p_columns_target)
{
plugin_push_current('CustomerManagement');
if (access_has_global_level(plugin_config_get('view_customer_fields_threshold'))) {
$bugData = CustomerManagementDao::getBugData($p_bug->id);
if (count($bugData) > 0) {
$group = CustomerManagementDao::getGroupForCustomer($bugData['customer_id']);
echo string_display_line($group['name']);
}
}
plugin_pop_current();
}
示例8: query
function query($p_filter_input)
{
$invoice = $p_filter_input;
if (is_blank($invoice)) {
return;
}
plugin_push_current('CustomerManagement');
if (access_has_global_level(plugin_config_get('view_customer_fields_threshold'))) {
$t_query = CustomerManagementDao::buildFilterArrayForInvoice($invoice);
}
plugin_pop_current();
return $t_query;
}
示例9: __call
/**
* Wrap method calls to the target object in plugin_push/pop calls.
*/
function __call($p_method, $p_args)
{
plugin_push_current($this->basename);
$value = call_user_func_array(array($this->object, $p_method), $p_args);
plugin_pop_current();
return $value;
}
示例10: print_test_row
print_test_row('Phpmailer sendmail configuration requires escapeshellarg. Please use a different phpmailer method if this is blocked.', PHPMAILER_METHOD_SENDMAIL != config_get('phpMailer_method') || PHPMAILER_METHOD_SENDMAIL == config_get('phpMailer_method') && function_exists('escapeshellarg'));
check_zend_optimiser_version();
if (plugin_is_installed('MantisGraph')) {
plugin_push_current('MantisGraph');
print_test_row('checking gd is enabled, and version 2...', get_gd_version() == 2);
if (plugin_config_get('eczlibrary', ON) == OFF) {
$t_jpgraph_path = config_get('absolute_path') . 'library' . DIRECTORY_SEPARATOR . 'jpgraph' . DIRECTORY_SEPARATOR;
if (!file_exists($t_jpgraph_path . 'jpgraph.php')) {
print_test_row('checking we can find jpgraph class files...', false);
} else {
require_once $t_jpgraph_path . 'jpgraph.php';
print_test_row('Checking Jpgraph version (if installed)...', version_compare(JPG_VERSION, '2.3.0') ? true : false, JPG_VERSION);
}
print_test_row('check configuration: jpgraph (if used) requires php bundled gd for antialiasing support', plugin_config_get('jpgraph_antialias', OFF) == OFF || function_exists('imageantialias'));
}
plugin_pop_current();
}
print_test_row('Checking if ctype is enabled in php (required for rss feeds)....', extension_loaded('ctype'));
print_test_row('Checking for mysql is at least version 4.1...', !(db_is_mysql() && version_compare($t_serverinfo['version'], '4.1.0', '<')));
print_test_row('Checking for broken mysql version ( bug 10250)...', !(db_is_mysql() && $t_serverinfo['version'] == '4.1.21'));
if (!is_blank(config_get_global('default_timezone'))) {
if (print_test_row('Checking if a timezone is set in config.inc.php....', !is_blank(config_get_global('default_timezone')), config_get_global('default_timezone'))) {
print_test_row('Checking if timezone is valid from config.inc.php....', in_array(config_get_global('default_timezone'), timezone_identifiers_list()), config_get_global('default_timezone'));
}
} else {
if (print_test_row('Checking if timezone is set in php.ini....', ini_get('date.timezone') !== '')) {
print_test_row('Checking if timezone is valid in php.ini....', in_array(ini_get('date.timezone'), timezone_identifiers_list()), ini_get('date.timezone'));
}
}
test_database_utf8();
print_test_row('Checking Register Globals is set to off', !ini_get_bool('register_globals'));
示例11: event_callback
/**
* Executes a plugin's callback function for a given event.
* @param string Event name
* @param string Callback name
* @param string Plugin basename
* @param multi Parameters for event callback
* @return multi Null if callback not found, value from callback otherwise
* @access public
*/
function event_callback( $p_event, $p_callback, $p_plugin, $p_params = null ) {
$t_value = null;
if( !is_array( $p_params ) ) {
$p_params = array(
$p_params,
);
}
if( $p_plugin !== 0 ) {
global $g_plugin_cache;
plugin_push_current( $p_plugin );
if( method_exists( $g_plugin_cache[$p_plugin], $p_callback ) ) {
$t_value = call_user_func_array( array( $g_plugin_cache[$p_plugin], $p_callback ), array_merge( array( $p_event ), $p_params ) );
}
plugin_pop_current();
} else {
if( function_exists( $p_callback ) ) {
$t_value = call_user_func_array( $p_callback, array_merge( array( $p_event ), $p_params ) );
}
}
return $t_value;
}
示例12: plugin_init
/**
* Initialize a single plugin.
* @param string Plugin basename
* @return boolean True if plugin initialized, false otherwise.
*/
function plugin_init($p_basename)
{
global $g_plugin_cache, $g_plugin_cache_init;
# handle dependent plugins
if (isset($g_plugin_cache[$p_basename])) {
$t_plugin = $g_plugin_cache[$p_basename];
# hard dependencies; return false if the dependency is not registered,
# does not meet the version requirement, or is not yet initialized.
if (is_array($t_plugin->requires)) {
foreach ($t_plugin->requires as $t_required => $t_version) {
if (plugin_dependency($t_required, $t_version, true) !== 1) {
return false;
}
}
}
# soft dependencies; only return false if the soft dependency is
# registered, but not yet initialized.
if (is_array($t_plugin->uses)) {
foreach ($t_plugin->uses as $t_used => $t_version) {
if (isset($g_plugin_cache[$t_used]) && !isset($g_plugin_cache_init[$t_used])) {
return false;
}
}
}
# if plugin schema needs an upgrade, do not initialize
if (plugin_needs_upgrade($t_plugin)) {
return false;
}
plugin_push_current($p_basename);
# load plugin error strings
global $g_lang_strings;
$t_lang = lang_get_current();
$t_plugin_errors = $t_plugin->errors();
foreach ($t_plugin_errors as $t_error_name => $t_error_string) {
$t_error_code = "plugin_{$p_basename}_{$t_error_name}";
$g_lang_strings[$t_lang]['MANTIS_ERROR'][$t_error_code] = $t_error_string;
}
# finish initializing the plugin
$t_plugin->__init();
$g_plugin_cache_init[$p_basename] = true;
plugin_pop_current();
return true;
} else {
return false;
}
}