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


PHP Context::setBrowserTitle方法代码示例

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


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

示例1: getHtmlPage

 /**
  * @brief 외부 http로 요청되는 파일일 경우 파일을 받아와서 저장 후 return
  **/
 function getHtmlPage($path, $caching_interval, $cache_file)
 {
     // 캐시 검사
     if ($caching_interval > 0 && file_exists($cache_file) && filemtime($cache_file) + $caching_interval * 60 > time()) {
         $content = FileHandler::readFile($cache_file);
     } else {
         FileHandler::getRemoteFile($path, $cache_file);
         $content = FileHandler::readFile($cache_file);
     }
     // opage controller 생성
     $oOpageController =& getController('opage');
     // 외부 서버의 페이지 일 경우 이미지, css, javascript등의 url을 변경
     $content = $oOpageController->replaceSrc($content, $path);
     // 해당 문서를 utf-8로 변경
     $buff->content = $content;
     $buff = Context::convertEncoding($buff);
     $content = $buff->content;
     // title 추출
     $title = $oOpageController->getTitle($content);
     if ($title) {
         Context::setBrowserTitle($title);
     }
     // header script 추출
     $head_script = $oOpageController->getHeadScript($content);
     if ($head_script) {
         Context::addHtmlHeader($head_script);
     }
     // body 내용 추출
     $body_script = $oOpageController->getBodyScript($content);
     if (!$body_script) {
         $body_script = $content;
     }
     return $content;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:37,代码来源:opage.view.php

示例2: dispDocumentPrint

 /**
  * Document printing
  * I make it out to find the geulman;;
  * @return void|Object
  */
 function dispDocumentPrint()
 {
     // Bring a list of variables needed to implement
     $document_srl = Context::get('document_srl');
     // module_info not use in UI
     //$oModuleModel = &getModel('module');
     //$module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl);
     // Create the document object. If the document module of basic data structures, write it all works .. -_-;
     $oDocumentModel =& getModel('document');
     // Creates an object for displaying the selected document
     $oDocument = $oDocumentModel->getDocument($document_srl, $this->grant->manager);
     if (!$oDocument->isExists()) {
         return new Object(-1, 'msg_invalid_request');
     }
     // Check permissions
     if (!$oDocument->isAccessible()) {
         return new Object(-1, 'msg_not_permitted');
     }
     // Information setting module
     //Context::set('module_info', $module_info);	//module_info not use in UI
     // Browser title settings
     Context::setBrowserTitle($oDocument->getTitleText());
     Context::set('oDocument', $oDocument);
     Context::set('layout', 'none');
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('print_page');
 }
开发者ID:relip,项目名称:xe-core,代码行数:32,代码来源:document.view.php

示例3: procTrackbackSend

 /**
  * @brief 트랙백 발송
  **/
 function procTrackbackSend()
 {
     // 게시물 번호와 발송하려는 엮인글 주소를 구함
     $document_srl = Context::get('target_srl');
     $trackback_url = Context::get('trackback_url');
     $charset = Context::get('charset');
     if (!$document_srl || !$trackback_url || !$charset) {
         return new Object(-1, 'msg_invalid_request');
     }
     // 로그인 정보 구함
     $logged_info = Context::get('logged_info');
     if (!$logged_info->member_srl) {
         return new Object(-1, 'msg_not_permitted');
     }
     // 게시물의 정보를 구해와서 있는지 여부와 권한을 체크
     $oDocumentModel =& getModel('document');
     $oDocument = $oDocumentModel->getDocument($document_srl);
     if (!$oDocument->isExists()) {
         return new Object(-1, 'msg_invalid_request');
     }
     if ($oDocument->getMemberSrl() != $logged_info->member_srl) {
         return new Object(-1, 'msg_not_permitted');
     }
     // 현재 글이 있는 모듈의 타이틀 지정
     $oModuleModel =& getModel('module');
     $module_info = $oModuleModel->getModuleInfoByModuleSrl($oDocument->get('module_srl'));
     Context::setBrowserTitle($module_info->browser_title);
     // 엮인글 발송
     return $this->sendTrackback($oDocument, $trackback_url, $charset);
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:33,代码来源:trackback.controller.php

示例4: init

 /**
  * @brief Initialization
  */
 function init()
 {
     // Stop if already installed.
     if (Context::isInstalled()) {
         return $this->stop('msg_already_installed');
     }
     // Set the browser title.
     Context::setBrowserTitle(Context::getLang('introduce_title'));
     // Specify the template path.
     $this->setTemplatePath($this->module_path . 'tpl');
     // Check the environment.
     $oInstallController = getController('install');
     self::$checkEnv = $oInstallController->checkInstallEnv();
     if (self::$checkEnv) {
         $oInstallController->makeDefaultDirectory();
     }
 }
开发者ID:kkkyyy03,项目名称:coffeemix,代码行数:20,代码来源:install.view.php

示例5: init

 /**
  * @brief Initialization
  */
 function init()
 {
     // Set browser title
     Context::setBrowserTitle(Context::getLang('introduce_title'));
     // Specify the template path
     $this->setTemplatePath($this->module_path . 'tpl');
     // Error occurs if already installed
     if (Context::isInstalled()) {
         return $this->stop('msg_already_installed');
     }
     // Install a controller
     $oInstallController = getController('install');
     $this->install_enable = $oInstallController->checkInstallEnv();
     // If the environment is installable, execute installController::makeDefaultDirectory()
     if ($this->install_enable) {
         $oInstallController->makeDefaultDirectory();
     }
 }
开发者ID:Gunmania,项目名称:xe-core,代码行数:21,代码来源:install.view.php

示例6: procTrackbackSend

 /**
  * Trackbacks sent
  * @return object
  */
 function procTrackbackSend()
 {
     // Yeokingeul to post numbers and shipping addresses Wanted
     $document_srl = Context::get('target_srl');
     $trackback_url = Context::get('trackback_url');
     $charset = Context::get('charset');
     if (!$document_srl || !$trackback_url || !$charset) {
         return new Object(-1, 'msg_invalid_request');
     }
     // Login Information Wanted
     $logged_info = Context::get('logged_info');
     if (!$logged_info->member_srl) {
         return new Object(-1, 'msg_not_permitted');
     }
     // Posts of the information obtained permission to come and check whether
     $oDocumentModel =& getModel('document');
     $oDocument = $oDocumentModel->getDocument($document_srl);
     if (!$oDocument->isExists() || !$oDocument->getSummary()) {
         return new Object(-1, 'msg_invalid_request');
     }
     if ($oDocument->getMemberSrl() != $logged_info->member_srl) {
         return new Object(-1, 'msg_not_permitted');
     }
     // Specify the title of the module, the current article
     $oModuleModel =& getModel('module');
     $module_info = $oModuleModel->getModuleInfoByModuleSrl($oDocument->get('module_srl'));
     Context::setBrowserTitle($module_info->browser_title);
     // Shipping yeokingeul
     $output = $this->sendTrackback($oDocument, $trackback_url, $charset);
     if ($output->toBool() && !in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) {
         global $lang;
         htmlHeader();
         alertScript($lang->success_registed);
         reload(true);
         closePopupScript();
         htmlFooter();
         Context::close();
         exit;
     }
     return $output;
 }
开发者ID:relip,项目名称:xe-core,代码行数:45,代码来源:trackback.controller.php

示例7: dispDocumentPrint

 /**
  * @brief 문서 인쇄 기능
  * 해당 글만 찾아서 그냥 출력해버린다;;
  **/
 function dispDocumentPrint()
 {
     // 목록 구현에 필요한 변수들을 가져온다
     $document_srl = Context::get('document_srl');
     // document 객체를 생성. 기본 데이터 구조의 경우 document모듈만 쓰면 만사 해결.. -_-;
     $oDocumentModel =& getModel('document');
     // 선택된 문서 표시를 위한 객체 생성
     $oDocument = $oDocumentModel->getDocument($document_srl, $this->grant->manager);
     if (!$oDocument->isExists()) {
         return new Object(-1, 'msg_invalid_request');
     }
     // 권한 체크
     if (!$oDocument->isAccessible()) {
         return new Object(-1, 'msg_not_permitted');
     }
     // 브라우저 타이틀 설정
     Context::setBrowserTitle($oDocument->getTitleText());
     Context::set('oDocument', $oDocument);
     Context::set('layout', 'none');
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('print_page');
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:26,代码来源:document.view.php

示例8: dispMaterialPopup

 /**
  * @brief 글감 수집기 팝업
  **/
 function dispMaterialPopup()
 {
     global $lang;
     $mid = Context::get('mid');
     $auth = Context::get('auth');
     Context::set('site_module_info', null);
     $oMaterialModel =& getModel('material');
     $oModuleModel =& getModel('module');
     $module_info = $oModuleModel->getModuleInfoByMid($mid, $site_srl = 0);
     $module_srl = $module_info->module_srl;
     $member_srl = $oMaterialModel->getMemberSrlByAuth($auth);
     if (!$member_srl) {
         Context::set('error', true);
     }
     // 템플릿 변수
     $objects = explode("\t", Context::get('objects'));
     $images = explode("\t", Context::get('images'));
     $objects = array_unique($objects);
     $images = array_unique($images);
     $img = array();
     foreach ($images as $key => $image) {
         if (preg_match('/\\.(gif|jpg|jpeg|png)(\\?.*|)$/i', $image)) {
             $img[] = $image;
         }
     }
     Context::set('objects', $objects);
     Context::set('images', $img);
     if (!Context::get('title')) {
         Context::set('title', Context::get('url'));
     }
     Context::setBrowserTitle($lang->material->popup_title);
     // 템플릿 지정
     $this->setLayoutFile("popup_layout");
     $this->setTemplateFile('popup');
     Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_material.xml');
 }
开发者ID:TheProjecter,项目名称:xe-material,代码行数:39,代码来源:material.view.php

示例9: htmlspecialchars

<?php

if (!defined('__XE__')) {
    exit;
}
if ($called_position != "before_display_content") {
    return;
}
// 컨텐츠를 표시하는 시점에 호출되어야 합니다.
$title = Context::getBrowserTitle() . ' ' . $addon_info->title_sep . ' ' . $addon_info->homepage_title;
// 문서의 제목을 가져옵니다.
$title = htmlspecialchars($title);
// 이스케이프는 언제 어디서나 필수!
Context::setBrowserTitle($title);
// 설정.
开发者ID:kkkyyy03,项目名称:XE_title_control,代码行数:15,代码来源:title_contol.addon.php

示例10: dispSocialxeTextyleTool

 function dispSocialxeTextyleTool()
 {
     // 텍스타일의 최신 버전이 아니면 직접 처리
     $oTextyleView =& getView('textyle');
     if (!method_exists($oTextyleView, 'initTool')) {
         $oTextyleModel =& getModel('textyle');
         $site_module_info = Context::get('site_module_info');
         $textyle = $oTextyleModel->getTextyle($site_module_info->index_module_srl);
         Context::set('textyle', $textyle);
         Context::set('custom_menu', $oTextyleModel->getTextyleCustomMenu());
         $template_path = sprintf("%stpl", $oTextyleView->module_path);
         $this->setLayoutPath($template_path);
         $this->setLayoutFile('_tool_layout');
         if ($_COOKIE['tclnb']) {
             Context::addBodyClass('lnbClose');
         } else {
             Context::addBodyClass('lnbToggleOpen');
         }
         // browser title 지정
         Context::setBrowserTitle($textyle->get('browser_title') . ' - admin');
         Context::addHtmlHeader('<link rel="shortcut icon" href="' . $textyle->getFaviconSrc() . '" />');
     }
     // 설정 정보를 받아옴
     Context::set('config', $this->config);
     // 서비스 목록
     $provider_list = $this->providerManager->getFullProviderList();
     Context::set('provider_list', $provider_list);
     // 템플릿 파일 지정
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('textyleConfig');
 }
开发者ID:leehankyeol,项目名称:JaWeTip,代码行数:31,代码来源:socialxe.view.php

示例11: init

 /**
  * @brief 초기화
  **/
 function init()
 {
     // template path 지정
     $this->setTemplatePath($this->module_path . 'tpl');
     // 접속 사용자에 대한 체크
     $oMemberModel =& getModel('member');
     $logged_info = $oMemberModel->getLoggedInfo();
     // 관리자가 아니면 금지
     if ($logged_info->is_admin != 'Y') {
         return $this->stop("msg_is_not_administrator");
     }
     // 관리자용 레이아웃으로 변경
     $this->setLayoutPath($this->getTemplatePath());
     $this->setLayoutFile('layout.html');
     // 설치된 모듈 목록 가져와서 적절히 분리
     $oModuleModel =& getModel('module');
     $installed_module_list = $oModuleModel->getModulesXmlInfo();
     $installed_modules = $package_modules = array();
     $package_idx = 0;
     foreach ($installed_module_list as $key => $val) {
         if ($val->module == 'admin' || !$val->admin_index_act) {
             continue;
         }
         // action 정보 구함
         $action_spec = $oModuleModel->getModuleActionXml($val->module);
         $actions = array();
         if ($action_spec->default_index_act) {
             $actions[] = $action_spec->default_index_act;
         }
         if ($action_spec->admin_index_act) {
             $actions[] = $action_spec->admin_index_act;
         }
         if ($action_spec->action) {
             foreach ($action_spec->action as $k => $v) {
                 $actions[] = $k;
             }
         }
         $obj = null;
         $obj->category = $val->category;
         $obj->title = $val->title;
         $obj->description = $val->description;
         $obj->index_act = $val->admin_index_act;
         if (in_array(Context::get('act'), $actions)) {
             $obj->selected = true;
         }
         // 패키지 모듈
         if ($val->category == 'package') {
             if ($package_idx == 0) {
                 $obj->position = "first";
             } else {
                 $obj->position = "mid";
             }
             $package_modules[] = $obj;
             $package_idx++;
             if ($obj->selected) {
                 Context::set('package_selected', true);
             }
             // 일반 모듈
         } else {
             $installed_modules[] = $obj;
         }
         if ($obj->selected) {
             Context::set('selected_module_category', $val->category);
             Context::set('selected_module_info', $val);
         }
     }
     if (count($package_modules)) {
         $package_modules[count($package_modules) - 1]->position = 'end';
     }
     Context::set('package_modules', $package_modules);
     Context::set('installed_modules', $installed_modules);
     $db_info = Context::getDBInfo();
     Context::set('time_zone_list', $GLOBALS['time_zone']);
     Context::set('time_zone', $GLOBALS['_time_zone']);
     Context::set('use_rewrite', $db_info->use_rewrite == 'Y' ? 'Y' : 'N');
     Context::set('use_optimizer', $db_info->use_optimizer != 'N' ? 'Y' : 'N');
     Context::set('qmail_compatibility', $db_info->qmail_compatibility == 'Y' ? 'Y' : 'N');
     Context::set('use_db_session', $db_info->use_db_session == 'N' ? 'N' : 'Y');
     Context::set('use_ssl', $db_info->use_ssl ? $db_info->use_ssl : "none");
     if ($db_info->http_port) {
         Context::set('http_port', $db_info->http_port);
     }
     if ($db_info->https_port) {
         Context::set('https_port', $db_info->https_port);
     }
     Context::setBrowserTitle("XE Admin Page");
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:90,代码来源:admin.admin.view.php

示例12: dispTextyle

 function dispTextyle()
 {
     $oTextyleModel =& getModel('textyle');
     $oTextyleController =& getController('textyle');
     $oDocumentModel =& getModel('document');
     $args->category_srl = Context::get('category_srl');
     $args->search_target = Context::get('search_target');
     $args->search_keyword = Context::get('search_keyword');
     $args->module_srl = $this->module_srl;
     $args->site_srl = $this->site_srl;
     $args->page = Context::get('page');
     $args->page = $args->page > 0 ? $args->page : 1;
     Context::set('page', $args->page);
     // set category
     $category_list = $oDocumentModel->getCategoryList($this->module_srl);
     Context::set('category_list', $category_list);
     $document_srl = Context::get('document_srl');
     if ($document_srl) {
         $oDocument = $oDocumentModel->getDocument($document_srl, false, false);
         if ($oDocument->isExists()) {
             if ($oDocument->get('module_srl') != $this->module_info->module_srl) {
                 return $this->stop('msg_invalid_request');
             }
             Context::setBrowserTitle($this->textyle->get('browser_title') . ' »  ' . $oDocument->getTitle());
             // meta keywords category + tag
             $tag_array = $oDocument->get('tag_list');
             if ($tag_array) {
                 $tag = htmlspecialchars(join(', ', $tag_array));
             } else {
                 $tag = '';
             }
             $category_srl = $oDocument->get('category_srl');
             if ($tag && $category_srl > 0) {
                 $tag = $category_list[$category_srl]->title . ', ' . $tag;
             }
             Context::addHtmlHeader(sprintf('<meta name="keywords" content="%s" />', $tag));
             if ($this->grant->manager) {
                 $oDocument->setGrant();
             }
         } else {
             Context::set('document_srl', '', true);
             $oDocument = $oDocumentModel->getDocument(0, false, false);
         }
     }
     if (!$document_srl) {
         if ($args->category_srl || $args->search_target && $args->search_keyword) {
             $args->list_count = 10;
             $output = $oDocumentModel->getDocumentList($args, false, false);
             $document_list = $output->data;
             Context::set('page_navigation', $output->page_navigation);
             Context::set('document_list', $document_list);
             $this->setTemplateFile('list');
         }
     }
     if ((!$oDocument || !$oDocument->isExists()) && !$document_list) {
         $args->list_count = 1;
         $output = $oDocumentModel->getDocumentList($args, false, false);
         if ($output->data && count($output->data)) {
             $oDocument = array_pop($output->data);
         }
     }
     if ($oDocument && $oDocument->isExists()) {
         $args->document_srl = $oDocument->document_srl;
         $output = executeQuery('textyle.getNextDocument', $args);
         if ($output->data->document_srl) {
             Context::set('prev_document', new documentItem($output->data->document_srl, false));
         }
         $output = executeQuery('textyle.getPrevDocument', $args);
         if ($output->data->document_srl) {
             Context::set('next_document', new documentItem($output->data->document_srl, false));
         }
         Context::set('oDocument', $oDocument);
         $this->setTemplateFile('read');
         Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_comment.xml');
     }
 }
开发者ID:google-code-backups,项目名称:xe-textyle,代码行数:76,代码来源:textyle.mobile.php

示例13: dispMember_ExpireAdminListMoved

 /**
  * 별도저장 회원 목록을 표시하는 메소드.
  */
 public function dispMember_ExpireAdminListMoved()
 {
     // 현재 설정을 불러온다.
     $config = $this->getConfig();
     Context::set('mex_config', $config);
     // 검색 조건을 불러온다.
     $search_target = Context::get('search_target');
     $search_keyword = Context::get('search_keyword');
     if (!in_array($search_target, array('email_address', 'user_id', 'user_name', 'nick_name')) || !$search_keyword) {
         Context::set('search_target', $search_target = null);
         Context::set('search_keyword', $search_keyword = null);
     }
     // 휴면계정 목록을 불러온다.
     $obj = new stdClass();
     if ($search_target && $search_keyword) {
         $obj->{$search_target} = trim($search_keyword);
     }
     $moved_members_count = executeQuery('member_expire.countMovedMembers', $obj);
     $moved_members_count = $moved_members_count->toBool() ? $moved_members_count->data->count : 0;
     $obj->page = $page = Context::get('page') ? Context::get('page') : 1;
     $obj->orderby = 'desc';
     $moved_members = executeQuery('member_expire.getMovedMembers', $obj);
     $moved_members = $moved_members->toBool() ? $moved_members->data : array();
     Context::set('expire_threshold', $this->translateThreshold($config->expire_threshold));
     Context::set('moved_members_count', $moved_members_count);
     Context::set('moved_members', $moved_members);
     // 페이징을 처리한다.
     $paging = new Object();
     $paging->total_count = $moved_members_count;
     $paging->total_page = max(1, ceil($moved_members_count / 10));
     $paging->page = $page;
     $paging->page_navigation = new PageHandler($paging->total_count, $paging->total_page, $page, 10);
     Context::set('paging', $paging);
     Context::set('page', $page);
     // 템플릿을 지정한다.
     Context::setBrowserTitle('별도저장 회원 목록 - XE Admin');
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('list_moved');
 }
开发者ID:ned3y2k,项目名称:xe-member-expire,代码行数:42,代码来源:member_expire.admin.view.php

示例14: dispMember_ExpireAdminListExceptions

 /**
  * 예외 목록 화면을 표시하는 메소드.
  */
 public function dispMember_ExpireAdminListExceptions()
 {
     // 현재 설정을 불러온다.
     $config = $this->getConfig();
     Context::set('mex_config', $config);
     // 검색 조건을 불러온다.
     $search_target = Context::get('search_target');
     $search_keyword = Context::get('search_keyword');
     if (!in_array($search_target, array('email_address', 'user_id', 'user_name', 'nick_name')) || !$search_keyword) {
         Context::set('search_target', $search_target = null);
         Context::set('search_keyword', $search_keyword = null);
     }
     $valid_list_counts = array(10, 20, 30, 50, 100, 200, 300);
     $list_count = intval(Context::get('list_count'));
     if (!in_array($list_count, $valid_list_counts)) {
         $list_count = 10;
     }
     Context::set('list_count', $list_count);
     // 발송 내역을 불러온다.
     $obj = new stdClass();
     if ($search_target && $search_keyword) {
         $obj->{$search_target} = trim($search_keyword);
     }
     $exception_count = executeQuery('member_expire.countExceptions', $obj);
     $exception_count = $exception_count->toBool() ? $exception_count->data->count : 0;
     $obj->list_count = $list_count;
     $obj->page = $page = Context::get('page') ? Context::get('page') : 1;
     $obj->orderby = 'desc';
     $exceptions = executeQuery('member_expire.getExceptions', $obj);
     $exceptions = $exceptions->toBool() ? $exceptions->data : array();
     $member_srls = array();
     foreach ($exceptions as $member) {
         $member_srls[] = $member->member_srl;
     }
     $exceptions_groups = getModel('member')->getMembersGroups($member_srls);
     Context::set('exception_count', $exception_count);
     Context::set('exceptions', $exceptions);
     Context::set('exceptions_groups', $exceptions_groups);
     // 페이징을 처리한다.
     $paging = new Object();
     $paging->total_count = $exception_count;
     $paging->total_page = max(1, ceil($exception_count / $list_count));
     $paging->page = $page;
     $paging->page_navigation = new PageHandler($paging->total_count, $paging->total_page, $page, $list_count);
     Context::set('paging', $paging);
     Context::set('page', $page);
     // 템플릿을 지정한다.
     Context::setBrowserTitle('예외 목록 - XE Admin');
     $this->setTemplatePath($this->module_path . 'tpl');
     $this->setTemplateFile('exceptions');
 }
开发者ID:kijin,项目名称:xe-member-expire,代码行数:54,代码来源:member_expire.admin.view.php

示例15: dispBoardContentView

 /**
  * @brief display the board conent view
  **/
 function dispBoardContentView()
 {
     // get the variable value
     $document_srl = Context::get('document_srl');
     $page = Context::get('page');
     // generate document model object
     $oDocumentModel = getModel('document');
     /**
      * if the document exists, then get the document information
      **/
     if ($document_srl) {
         $oDocument = $oDocumentModel->getDocument($document_srl, false, true);
         // if the document is existed
         if ($oDocument->isExists()) {
             // if the module srl is not consistent
             if ($oDocument->get('module_srl') != $this->module_info->module_srl) {
                 return $this->stop('msg_invalid_request');
             }
             // check the manage grant
             if ($this->grant->manager) {
                 $oDocument->setGrant();
             }
             // if the consultation function is enabled, and the document is not a notice
             if ($this->consultation && !$oDocument->isNotice()) {
                 $logged_info = Context::get('logged_info');
                 if ($oDocument->get('member_srl') != $logged_info->member_srl) {
                     $oDocument = $oDocumentModel->getDocument(0);
                 }
             }
             // if the document is TEMP saved, check Grant
             if ($oDocument->getStatus() == 'TEMP') {
                 if (!$oDocument->isGranted()) {
                     $oDocument = $oDocumentModel->getDocument(0);
                 }
             }
         } else {
             // if the document is not existed, then alert a warning message
             Context::set('document_srl', '', true);
             $this->alertMessage('msg_not_founded');
         }
         /**
          * if the document is not existed, get an empty document
          **/
     } else {
         $oDocument = $oDocumentModel->getDocument(0);
     }
     /**
      *check the document view grant
      **/
     if ($oDocument->isExists()) {
         if (!$this->grant->view && !$oDocument->isGranted()) {
             $oDocument = $oDocumentModel->getDocument(0);
             Context::set('document_srl', '', true);
             $this->alertMessage('msg_not_permitted');
         } else {
             // add the document title to the browser
             Context::setCanonicalURL($oDocument->getPermanentUrl());
             $seo_title = config('seo.document_title') ?: '$SITE_TITLE - $DOCUMENT_TITLE';
             getController('module')->replaceDefinedLangCode($seo_title);
             Context::setBrowserTitle($seo_title, array('site_title' => Context::getSiteTitle(), 'site_subtitle' => Context::getSiteSubtitle(), 'subpage_title' => $this->module_info->browser_title, 'document_title' => $oDocument->getTitleText(), 'page' => Context::get('page') ?: 1));
             // update the document view count (if the document is not secret)
             if (!$oDocument->isSecret() || $oDocument->isGranted()) {
                 $oDocument->updateReadedCount();
             }
             // disappear the document if it is secret
             if ($oDocument->isSecret() && !$oDocument->isGranted()) {
                 $oDocument->add('content', lang('thisissecret'));
             }
         }
     }
     Context::set('update_view', $this->grant->update_view);
     // setup the document oject on context
     $oDocument->add('module_srl', $this->module_srl);
     Context::set('oDocument', $oDocument);
     /**
      * add javascript filters
      **/
     Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_comment.xml');
     //            return new Object();
 }
开发者ID:rhymix,项目名称:rhymix,代码行数:83,代码来源:board.view.php


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