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


PHP sensitiveIO::checkXHTMLValue方法代码示例

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


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

示例1: array

             $view->setActionMessage($cms_language->getJsMessage(MESSAGE_PAGE_ERROR_UPDATE_BLOCK_CONTENT));
         }
     } else {
         CMS_grandFather::raiseError('Can\'t get block class type ' . $blockClass . ' to update content');
         $view->setActionMessage($cms_language->getJsMessage(MESSAGE_PAGE_ERROR_UPDATE_BLOCK_CONTENT));
     }
     break;
 case 'update-block-text':
 case 'update-block-varchar':
     //update block content
     if (class_exists($blockClass)) {
         $cms_block = new $blockClass();
         $cms_block->initializeFromBasicAttributes($blockId);
         if ($action == 'update-block-text') {
             $errors = '';
             if (!sensitiveIO::checkXHTMLValue($value, $errors)) {
                 //Send an error to user about his content
                 $jscontent = "\n\t\t\t\t\tAutomne.message.popup({\n\t\t\t\t\t\tmsg: \t\t\t\t'" . $cms_language->getJsMessage(MESSAGE_PAGE_COPY_PASTE_ERROR) . ($errors ? "<br /><br />" . sensitiveIO::sanitizeJSString($errors) : '') . "',\n\t\t\t\t\t\tbuttons: \t\t\tExt.MessageBox.OK,\n\t\t\t\t\t\tclosable: \t\t\ttrue,\n\t\t\t\t\t\ticon: \t\t\t\tExt.MessageBox.ERROR\n\t\t\t\t\t});";
                 $view->addJavascript($jscontent);
                 $view->show();
             }
             $value = CMS_textEditor::parseOuterContent($value);
         }
         $cms_block->writeToPersistence($cms_page->getID(), $cs, $rowTag, RESOURCE_LOCATION_EDITION, false, array("value" => $value));
         //instanciate the clientspace
         $clientSpace = CMS_moduleClientSpace_standard_catalog::getByTemplateAndTagID($tpl, $cs, $visualMode == PAGE_VISUALMODE_FORM);
         //get block's row from CS
         $row = $clientSpace->getRow($rowId, $rowTag);
         if ($row) {
             //get row datas
             $datas = $row->getData($cms_language, $cms_page, $clientSpace, PAGE_VISUALMODE_FORM);
开发者ID:davidmottet,项目名称:automne,代码行数:31,代码来源:page-content-controler.php

示例2: checkMandatory

 /**
  * check object Mandatories Values
  *
  * @param array $values : the POST result values
  * @param string prefixname : the prefix used for post names
  * @return boolean true on success, false on failure
  * @access public
  */
 function checkMandatory($values, $prefixName, $newFormat = false)
 {
     //if field is required check values
     $params = $this->getParamsValues();
     if ($this->_field->getValue('required')) {
         if (!isset($values[$prefixName . $this->_field->getID() . '_0']) || !$values[$prefixName . $this->_field->getID() . '_0']) {
             return false;
         }
     }
     //check value for copy/paste and XHTML conformity
     if ($newFormat && $params['html'] && isset($values[$prefixName . $this->_field->getID() . '_0']) && $values[$prefixName . $this->_field->getID() . '_0']) {
         $value = $values[$prefixName . $this->_field->getID() . '_0'];
         $errors = '';
         if (!sensitiveIO::checkXHTMLValue($value, $errors)) {
             //Send an error to user about his content
             global $cms_language;
             if (is_object($cms_language)) {
                 return $cms_language->getMessage(self::MESSAGE_OBJECT_TEXT_COPY_PASTE_ERROR, array($this->getFieldLabel($cms_language)), MOD_POLYMOD_CODENAME) . ($errors ? '<br /><br />' . $errors : '');
             } else {
                 return false;
             }
         }
     }
     return true;
 }
开发者ID:davidmottet,项目名称:automne,代码行数:33,代码来源:object_text.php


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