Project

General

Profile

« Previous | Next » 

Revision 1212

Added by MaGnaL almost 15 years ago

Bugfix of rev. 1211 search_modext.php (ticket #863): Use isset and given unknown-user instead of counting all users.

View differences:

search_modext.php
52 52
// make username and displayname for "last modified by... on ..."-string
53 53
function get_page_modified_by($page_modified_by, $users) {
54 54
	global $TEXT;
55
	if ( ($page_modified_by > 0) && (count($users) > $page_modified_by) ) {
56
			$username = $users[$page_modified_by]['username'];
57
			$displayname = $users[$page_modified_by]['display_name'];
58
		} else {
59
			$username = "";
60
			$displayname = $TEXT['UNKNOWN'];
61
		}
55
	// check for existing user-id
56
	if(!isset($users[$page_modified_by]))
57
		$page_modified_by = 0;
58
	
59
	$username = $users[$page_modified_by]['username'];
60
	$displayname = $users[$page_modified_by]['display_name'];
62 61
	return array($username, $displayname);
63 62
}
64 63

  

Also available in: Unified diff