Project

General

Profile

« Previous | Next » 

Revision 1692

Added by darkviper over 12 years ago

corrected pageID in forwarding links and
changed request of permission to ami_group_member() and is_group_match()

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12
===============================================================================
13 13

  
14
08 Aug-2012 Build 1692 Werner v.d.Decken(DarkViper)
15
# corrected pageID in forwarding links
16
! changed request of permission to ami_group_member() and is_group_match()
14 17
10 Jun-2012 Build 1691 Werner v.d.Decken(DarkViper)
15 18
# fixed the order of loading languages
16 19
31 May-2012 Build 1690 Werner v.d.Decken(DarkViper)
branches/2.8.x/wb/admin/pages/save.php
67 67
$sql .= 'WHERE `page_id` = '.$page_id;
68 68
$results = $database->query($sql);
69 69
$results_array = $results->fetchRow();
70
$old_admin_groups = explode(',', str_replace('_', '', $results_array['admin_groups']));
71
$old_admin_users = explode(',', str_replace('_', '', $results_array['admin_users']));
72
$in_old_group = FALSE;
73
foreach($admin->get_groups_id() as $cur_gid)
70
if(!$admin->ami_group_member($results_array['admin_users']) && 
71
   !$admin->is_group_match($admin->get_groups_id(), $results_array['admin_groups']))
74 72
{
75
    if (in_array($cur_gid, $old_admin_groups))
76
    {
77
        $in_old_group = TRUE;
78
    }
79
}
80
if((!$in_old_group) && !is_numeric(array_search($admin->get_user_id(), $old_admin_users)))
81
{
82 73
	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
83 74
}
84 75
// Get page module
85 76
$sql  = 'SELECT `module` FROM `'.TABLE_PREFIX.'sections` ';
86 77
$sql .= 'WHERE `page_id`='.$page_id.' AND `section_id`='.$section_id;
87 78
$module = $database->get_one($sql);
88
if(!$module)
89
{
79
if(!$module) {
90 80
	$admin->print_error( $database->is_error() ? $database->get_error() : $MESSAGE['PAGES']['NOT_FOUND']);
91 81
}
92
//$results = $database->query($sql);
93
//if($database->is_error()) {
94
//	$admin->print_error($database->get_error());
95
//}
96
//if($results->numRows() == 0) {
97
//	$admin->print_error($MESSAGE['PAGES']['NOT_FOUND']);
98
//}
99
//$results_array = $results->fetchRow();
100
//$module = $results_array['module'];
101

  
102 82
// Update the pages table
103 83
$now = time();
104 84
$sql  = 'UPDATE `'.TABLE_PREFIX.'pages` SET ';
......
114 94
// Check if there is a db error, otherwise say successful
115 95
if($database->is_error())
116 96
{
117
	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$results_array['page_id'] );
97
	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id );
118 98
} else {
119
	$admin->print_success($MESSAGE['PAGES']['SAVED'], ADMIN_URL.'/pages/modify.php?page_id='.$results_array['page_id'] );
99
	$admin->print_success($MESSAGE['PAGES']['SAVED'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id );
120 100
}
121 101

  
122 102
// Print admin footer
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1691');
54
if(!defined('REVISION')) define('REVISION', '1692');
55 55
if(!defined('SP')) define('SP', '');

Also available in: Unified diff