本文整理汇总了PHP中Versions::are_different方法的典型用法代码示例。如果您正苦于以下问题:PHP Versions::are_different方法的具体用法?PHP Versions::are_different怎么用?PHP Versions::are_different使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Versions
的用法示例。
在下文中一共展示了Versions::are_different方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
* elements of information.
*
* Add the option 'edit_as_thread' to activate this script in some article.
*
* @author Bernard Paques
* @reference
* @license http://www.gnu.org/copyleft/lesser.txt GNU Lesser General Public License
*/
// loaded from articles/view.php
defined('YACS') or exit('Script must be included');
// process uploaded data
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
// update an existing page
if (isset($_REQUEST['id'])) {
// remember the previous version
if ($item['id'] && Versions::are_different($item, $_REQUEST)) {
Versions::save($item, 'article:' . $item['id']);
}
// stop on error
if (!Articles::put_attributes($_REQUEST) || is_object($overlay) && !$overlay->remember('update', $_REQUEST, 'article:' . $_REQUEST['id'])) {
$item = $_REQUEST;
$with_form = TRUE;
// else display the updated page
} else {
// do whatever is necessary on page update
Articles::finalize_update($anchor, $_REQUEST, $overlay, isset($_REQUEST['silent']) && $_REQUEST['silent'] == 'Y', isset($_REQUEST['notify_watchers']) && $_REQUEST['notify_watchers'] == 'Y', isset($_REQUEST['notify_followers']) && $_REQUEST['notify_followers'] == 'Y');
// cascade changes on access rights
if ($_REQUEST['active'] != $item['active']) {
Anchors::cascade('article:' . $item['id'], $_REQUEST['active']);
}
// the page has been modified