1
|
<?php
|
2
|
/**
|
3
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
4
|
*
|
5
|
* This program is free software: you can redistribute it and/or modify
|
6
|
* it under the terms of the GNU General Public License as published by
|
7
|
* the Free Software Foundation, either version 3 of the License, or
|
8
|
* (at your option) any later version.
|
9
|
*
|
10
|
* This program is distributed in the hope that it will be useful,
|
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
* GNU General Public License for more details.
|
14
|
*
|
15
|
* You should have received a copy of the GNU General Public License
|
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
|
*
|
18
|
* @category modules
|
19
|
* @package news
|
20
|
* @subpackage reorgPosition
|
21
|
* @author Dietmar Wöllbrink
|
22
|
* @copyright WebsiteBaker Org. e.V.
|
23
|
* @link http://websitebaker.org/
|
24
|
* @license http://www.gnu.org/licenses/gpl.html
|
25
|
* @platform WebsiteBaker 2.8.3
|
26
|
* @requirements PHP 5.3.6 and higher
|
27
|
* @version $Id: reorgPosition.php 2 2017-07-02 15:14:29Z Manuela $
|
28
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/trunk/modules/news/reorgPosition.php $
|
29
|
* @lastmodified $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
|
30
|
*
|
31
|
*/
|
32
|
|
33
|
if ( !defined( 'WB_PATH' ) ){ require( dirname(dirname((__DIR__))).'/config.php' ); }
|
34
|
require(WB_PATH.'/modules/admin.php');
|
35
|
$backlink = ADMIN_URL.'/pages/modify.php?page_id='.(int)$page_id;
|
36
|
if(!$admin->checkFTAN('GET')) {
|
37
|
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
|
38
|
}
|
39
|
if ( !class_exists('order', false) ) { require(WB_PATH.'/framework/class.order.php'); }
|
40
|
$news = new order(TABLE_PREFIX.'mod_news_posts', 'position', 'post_id', 'section_id');
|
41
|
$news->clean( $section_id );
|
42
|
|
43
|
$groups = new order(TABLE_PREFIX.'mod_news_groups', 'position', 'group_id', 'section_id');
|
44
|
$groups->clean( $section_id );
|
45
|
|
46
|
$admin->print_success($TEXT['SUCCESS'], $backlink );
|
47
|
|