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


PHP rcmail::raise_error方法代码示例

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


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

示例1: init

 /**
  * Plugin initialization
  */
 public function init()
 {
     // check requirements first
     if (!class_exists('ZipArchive', false)) {
         rcmail::raise_error(array('code' => 520, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "php_zip extension is required for the zipdownload plugin"), true, false);
         return;
     }
     $rcmail = rcmail::get_instance();
     $this->load_config();
     $this->charset = $rcmail->config->get('zipdownload_charset', RCUBE_CHARSET);
     $this->add_texts('localization');
     if ($rcmail->config->get('zipdownload_attachments', 1) > -1 && ($rcmail->action == 'show' || $rcmail->action == 'preview')) {
         $this->add_hook('template_object_messageattachments', array($this, 'attachment_ziplink'));
     }
     $this->register_action('plugin.zipdownload.zip_attachments', array($this, 'download_attachments'));
     $this->register_action('plugin.zipdownload.zip_messages', array($this, 'download_selection'));
     $this->register_action('plugin.zipdownload.zip_folder', array($this, 'download_folder'));
     if ($rcmail->config->get('zipdownload_folder', false) || $rcmail->config->get('zipdownload_selection', false)) {
         $this->include_script('zipdownload.js');
         $this->api->output->set_env('zipdownload_selection', $rcmail->config->get('zipdownload_selection', false));
         if ($rcmail->config->get('zipdownload_folder', false) && ($rcmail->action == '' || $rcmail->action == 'show')) {
             $zipdownload = $this->api->output->button(array('command' => 'plugin.zipdownload.zip_folder', 'type' => 'link', 'classact' => 'active', 'content' => $this->gettext('downloadfolder')));
             $this->api->add_content(html::tag('li', array('class' => 'separator_above'), $zipdownload), 'mailboxoptions');
         }
     }
 }
开发者ID:rasky,项目名称:roundcubemail,代码行数:29,代码来源:zipdownload.php

示例2: init

 /**
  * Plugin initialization
  */
 public function init()
 {
     // check requirements first
     if (!class_exists('ZipArchive', false)) {
         rcmail::raise_error(array('code' => 520, 'file' => __FILE__, 'line' => __LINE__, 'message' => "php_zip extension is required for the zipdownload plugin"), true, false);
         return;
     }
     $rcmail = rcmail::get_instance();
     $this->load_config();
     $this->charset = $rcmail->config->get('zipdownload_charset', RCUBE_CHARSET);
     $this->add_texts('localization');
     if ($rcmail->config->get('zipdownload_attachments', 1) > -1 && ($rcmail->action == 'show' || $rcmail->action == 'preview')) {
         $this->add_hook('template_object_messageattachments', array($this, 'attachment_ziplink'));
     }
     $this->register_action('plugin.zipdownload.attachments', array($this, 'download_attachments'));
     $this->register_action('plugin.zipdownload.messages', array($this, 'download_messages'));
     if (!$rcmail->action && $rcmail->config->get('zipdownload_selection')) {
         $this->download_menu();
     }
 }
开发者ID:alecchisi,项目名称:roundcubemail,代码行数:23,代码来源:zipdownload.php

示例3: while

while ($redirects < 5) {
    // execute a plugin action
    if ($RCMAIL->plugins->is_plugin_task($RCMAIL->task)) {
        if (!$RCMAIL->action) {
            $RCMAIL->action = 'index';
        }
        $RCMAIL->plugins->exec_action($RCMAIL->task . '.' . $RCMAIL->action);
        break;
    } else {
        if (preg_match('/^plugin\\./', $RCMAIL->action)) {
            $RCMAIL->plugins->exec_action($RCMAIL->action);
            break;
        } else {
            if (($stepfile = $RCMAIL->get_action_file()) && is_file($incfile = INSTALL_PATH . 'program/steps/' . $RCMAIL->task . '/' . $stepfile)) {
                // include action file only once (in case it don't exit)
                include_once $incfile;
                $redirects++;
            } else {
                break;
            }
        }
    }
}
if ($RCMAIL->action == 'refresh') {
    $RCMAIL->plugins->exec_hook('refresh', array('last' => intval(rcube_utils::get_input_value('_last', rcube_utils::INPUT_GPC))));
}
// parse main template (default)
$OUTPUT->send($RCMAIL->task);
// if we arrive here, something went wrong
rcmail::raise_error(array('code' => 404, 'type' => 'php', 'line' => __LINE__, 'file' => __FILE__, 'message' => "Invalid request"), true, true);
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:30,代码来源:index.php

示例4: __pear_error

/**
 * Local callback function for PEAR errors
 */
function __pear_error($err)
{
    rcmail::raise_error(array('code' => $err->getCode(), 'message' => $err->getMessage()));
}
开发者ID:netcon-source,项目名称:roundcubemail,代码行数:7,代码来源:utils.php

示例5: raise_error

function raise_error($arg = array(), $log = false, $terminate = false)
{
    rcmail::raise_error($arg, $log, $terminate);
}
开发者ID:noikiy,项目名称:roundcubemail,代码行数:4,代码来源:bc.php

示例6: raise_error

function raise_error($arg = array(), $log = false, $terminate = false)
{
    _deprecation_warning(__FUNCTION__);
    rcmail::raise_error($arg, $log, $terminate);
}
开发者ID:JotapePinheiro,项目名称:roundcubemail,代码行数:5,代码来源:bc.php


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