本文整理汇总了PHP中EntryManager::validateFieldsXSLT方法的典型用法代码示例。如果您正苦于以下问题:PHP EntryManager::validateFieldsXSLT方法的具体用法?PHP EntryManager::validateFieldsXSLT怎么用?PHP EntryManager::validateFieldsXSLT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntryManager
的用法示例。
在下文中一共展示了EntryManager::validateFieldsXSLT方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
* Copyright 2004–2006 Twenty One Degrees Pty. Ltd.
*
* @version 1.7
* @licence https://github.com/symphonycms/symphony-1.7/blob/master/LICENCE
*
***/
if (array_key_exists("save", $_POST['action']) || array_key_exists("done", $_POST['action'])) {
$fields = array();
##IMPORTANT. MUST Initialize this incase register globals is on
include_once TOOLKIT . "/class.entrymanager.php";
$entryManager = new EntryManager($Admin);
$data = $_POST['fields'];
$section_id = intval($_REQUEST['_sid']);
$entry_id = intval($_REQUEST['id']);
if ($Admin->getConfigVar('strict_section_field_validation', 'symphony') == '1') {
$errors = $entryManager->validateFieldsXSLT($section_id, $data['custom'], $entry_id);
} else {
$errors = $entryManager->validateFields($section_id, $data['custom']);
}
if (is_array($errors) && !empty($errors)) {
define("__SYM_ENTRY_MISSINGFIELDS__", true);
} elseif (!defined('__SYM_ENTRY_VALIDATION_ERROR__') && !defined('__SYM_ENTRY_FIELD_XSLT_ERROR__')) {
$newPublishTimestamp = NULL;
if (isset($data['time']) && isset($data['publish_date'])) {
##Do some processing to ensure all the text is in the correct format
$date = $Admin->getDateObj();
$date->setFormat("Y-m-d H:i:s");
##User has specified the time, grab it as GMT
if ($data['time'] == "Automatic" || $data['time'] == "") {
$data['time'] = date("h:i:sa", $date->get(true, false));
}