Project

General

Profile

« Previous | Next » 

Revision 319

Added by stefan over 18 years ago

Added permission check to admin/pages/add.php to fix ticket #68. Also used get_page_permission, get_user_details, get_page_details in some places.

View differences:

admin.php
108 108
$results_array = $results->fetchRow();
109 109

  
110 110
// Get display name of person who last modified the page
111
$query_user = "SELECT username,display_name FROM ".TABLE_PREFIX."users WHERE user_id = '".$results_array['modified_by']."'";
112
$get_user = $database->query($query_user);
113
if($get_user->numRows() != 0) {
114
	$user = $get_user->fetchRow();
115
} else {
116
	$user['display_name'] = 'Unknown';
117
	$user['username'] = 'unknown';
118
}
111
$user=$admin->get_user_details($results_array['modified_by']);
112

  
119 113
// Convert the unix ts for modified_when to human a readable form
120 114
if($results_array['modified_when'] != 0) {
121 115
	$modified_ts = gmdate(TIME_FORMAT.', '.DATE_FORMAT, $results_array['modified_when']+TIMEZONE);

Also available in: Unified diff