Dotclear

source: plugins/dcRevisions/_admin.php @ 721:e48539cccdbd

Revision 721:e48539cccdbd, 1.1 KB checked in by Tomtom33 <tbouron@…>, 14 years ago (diff)

Improved diff UI

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ----------------------------------
3# This file is part of dcRevisions, a plugin for Dotclear.
4#
5# Copyright (c) 2011 Tomtom and contributors
6# http://blog.zenstyle.fr/
7#
8# Licensed under the GPL version 2.0 license.
9# A copy of this license is available in LICENSE file or at
10# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11# -- END LICENSE BLOCK ------------------------------------
12
13if (!defined('DC_CONTEXT_ADMIN')) { return; }
14
15$core->addBehavior('adminPostForm',array('dcRevisionsBehaviors','adminPostForm'));
16$core->addBehavior('adminPostHeaders',array('dcRevisionsBehaviors','adminPostHeaders'));
17$core->addBehavior('adminBeforePostUpdate',array('dcRevisionsBehaviors','adminBeforeUpdate'));
18$core->addBehavior('adminBeforePageUpdate',array('dcRevisionsBehaviors','adminBeforeUpdate'));
19
20$core->rest->addFunction('getPatch',array('dcRevisionsRestMethods','getPatch'));
21
22$core->blog->revisions = new dcRevisions($core);
23
24if (isset($_GET['id']) && isset($_GET['patch']) && preg_match('/post.php\?id=[0-9]+(.*)$/',$_SERVER['REQUEST_URI'])) {
25     $core->blog->revisions->setPatch($_GET['id'],$_GET['patch']);
26}
27
28?>
Note: See TracBrowser for help on using the repository browser.

Sites map