Project

General

Profile

« Previous | Next » 

Revision 1457

Added by Dietmar over 13 years ago

Preparing 2.8.2 stable, last tests

View differences:

add.php
19 19
// Create new admin object and print admin header
20 20
require('../../config.php');
21 21
require_once(WB_PATH.'/framework/class.admin.php');
22
$admin = new admin('Pages', 'pages_add');
23

  
22
// suppress to print the header, so no new FTAN will be set
23
$admin = new admin('Pages', 'pages_add', false);
24 24
if (!$admin->checkFTAN())
25 25
{
26
	$admin->print_header();
26 27
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']);
27
	exit();
28 28
}
29
// After check print the header
30
$admin->print_header();
29 31

  
30 32
// Include the WB functions file
31 33
require_once(WB_PATH.'/framework/functions.php');
......
41 43
$viewing_groups = $admin->get_post('viewing_groups');
42 44

  
43 45
// Work-out if we should check for existing page_code
44
$sql = 'DESCRIBE `'.TABLE_PREFIX.'pages` `page_code`';
45
$field_sql = $database->query($sql);
46
$field_set = $field_sql->numRows();
46
$field_set = $database->field_exists(TABLE_PREFIX.'pages', 'page_code');
47 47

  
48 48
// add Admin to admin and viewing-groups
49 49
$admin_groups[] = 1;
50 50

  

Also available in: Unified diff