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


PHP Versions::are_different方法代码示例

本文整理汇总了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
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:edit_as_thread.php


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