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


PHP Note::convertNote方法代码示例

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


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

示例1: convertNote

 /**
  * @param int $issue_id
  * @param int $note_id
  * @param string $target
  * @param bool $authorize_sender
  * @return string
  * @access protected
  */
 public function convertNote($issue_id, $note_id, $target, $authorize_sender)
 {
     AuthCookie::setProjectCookie(Issue::getProjectID($issue_id));
     $res = Note::convertNote($note_id, $target, $authorize_sender);
     if (empty($res)) {
         throw new RemoteApiException('Error converting note');
     }
     return 'OK';
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:17,代码来源:RemoteApi.php

示例2: Template_API

// +----------------------------------------------------------------------+
//
// @(#) $Id$
//
include_once "config.inc.php";
include_once APP_INC_PATH . "db_access.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.note.php";
include_once APP_INC_PATH . "class.draft.php";
include_once APP_INC_PATH . "class.support.php";
include_once APP_INC_PATH . "class.mime_helper.php";
include_once APP_INC_PATH . "class.mail.php";
include_once APP_INC_PATH . "class.date.php";
include_once APP_INC_PATH . "class.issue.php";
include_once APP_INC_PATH . "class.notification.php";
$tpl = new Template_API();
$tpl->setTemplate("convert_note.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
if (@$HTTP_POST_VARS['cat'] == 'convert') {
    if (@$HTTP_POST_VARS["add_authorized_replier"] == 1) {
        $authorize_sender = true;
    } else {
        $authorize_sender = false;
    }
    $tpl->assign("convert_result", Note::convertNote($HTTP_POST_VARS['note_id'], $HTTP_POST_VARS['target'], $authorize_sender));
} else {
    $tpl->assign("note_id", $HTTP_GET_VARS['id']);
}
$tpl->assign("current_user_prefs", Prefs::get(Auth::getUserID()));
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:convert_note.php

示例3: convertNote

function convertNote($p)
{
    $email = XML_RPC_decode($p->getParam(0));
    $password = XML_RPC_decode($p->getParam(1));
    $auth = authenticate($email, $password);
    if (is_object($auth)) {
        return $auth;
    }
    $issue_id = XML_RPC_decode($p->getParam(2));
    $note_id = XML_RPC_decode($p->getParam(3));
    $target = XML_RPC_decode($p->getParam(4));
    $authorize_sender = XML_RPC_decode($p->getParam(5));
    createFakeCookie($email, Issue::getProjectID($issue_id));
    $res = Note::convertNote($note_id, $target, $authorize_sender);
    if ($res) {
        return new XML_RPC_Response(XML_RPC_Encode("OK"));
    } else {
        return new XML_RPC_Response(0, $XML_RPC_erruser + 1, "Error converting note");
    }
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:20,代码来源:xmlrpc.php

示例4: dirname

// | 51 Franklin Street, Suite 330                                          |
// | Boston, MA 02110-1301, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com>                             |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('convert_note.tpl.html');
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$usr_id = Auth::getUserID();
$note_id = !empty($_GET['id']) ? $_GET['id'] : $_POST['note_id'];
$note = Note::getDetails($note_id);
$issue_id = $note['not_iss_id'];
if (User::getRoleByUser($usr_id, Issue::getProjectID($issue_id)) < User::getRoleID('Standard User') || !Access::canConvertNote($issue_id, Auth::getUserID())) {
    $tpl->setTemplate('permission_denied.tpl.html');
    $tpl->displayTemplate();
    exit;
}
if (@$_POST['cat'] == 'convert') {
    if (@$_POST['add_authorized_replier'] == 1) {
        $authorize_sender = true;
    } else {
        $authorize_sender = false;
    }
    $tpl->assign('convert_result', Note::convertNote($_POST['note_id'], $_POST['target'], $authorize_sender));
} else {
    $tpl->assign('note_id', $_GET['id']);
}
$tpl->assign('current_user_prefs', Prefs::get(Auth::getUserID()));
$tpl->assign('issue_id', $issue_id);
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:convert_note.php


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