Revision 1335
Added by Dietmar over 14 years ago
admin.php | ||
---|---|---|
97 | 97 |
// $admin->print_header(); don't know why |
98 | 98 |
$admin->print_error($database->get_error()); |
99 | 99 |
} |
100 |
if($results->numRows() == 0)
|
|
100 |
if($res_pages->numRows() == 0)
|
|
101 | 101 |
{ |
102 | 102 |
// $admin->print_header(); don't know why |
103 | 103 |
$admin->print_error($MESSAGE['PAGES']['NOT_FOUND']); |
104 | 104 |
} else { |
105 |
$res_pages = $results->fetchRow();
|
|
105 |
$rec_pages = $res_pages->fetchRow();
|
|
106 | 106 |
} |
107 | 107 |
|
108 | 108 |
// Get display name of person who last modified the page |
109 |
$user = $admin->get_user_details($res_pages['modified_by']);
|
|
109 |
$user = $admin->get_user_details($rec_pages['modified_by']);
|
|
110 | 110 |
|
111 | 111 |
// Convert the unix ts for modified_when to human a readable form |
112 |
if($res_pages['modified_when'] != 0)
|
|
112 |
if($rec_pages['modified_when'] != 0)
|
|
113 | 113 |
{ |
114 |
$modified_ts = gmdate(TIME_FORMAT.', '.DATE_FORMAT, $res_pages['modified_when']+TIMEZONE);
|
|
114 |
$modified_ts = gmdate(TIME_FORMAT.', '.DATE_FORMAT, $rec_pages['modified_when']+TIMEZONE);
|
|
115 | 115 |
} else { |
116 | 116 |
$modified_ts = 'Unknown'; |
117 | 117 |
} |
... | ... | |
121 | 121 |
$template->set_file('page', 'pages_modify.htt'); |
122 | 122 |
$template->set_block('page', 'main_block', 'main'); |
123 | 123 |
$template->set_var(array( |
124 |
'PAGE_ID' => $res_pages['page_id'],
|
|
125 |
'PAGE_TITLE' => ($res_pages['page_title']),
|
|
124 |
'PAGE_ID' => $rec_pages['page_id'],
|
|
125 |
'PAGE_TITLE' => ($rec_pages['page_title']),
|
|
126 | 126 |
'MODIFIED_BY' => $user['display_name'], |
127 | 127 |
'MODIFIED_BY_USERNAME' => $user['username'], |
128 | 128 |
'MODIFIED_WHEN' => $modified_ts, |
129 | 129 |
'ADMIN_URL' => ADMIN_URL |
130 | 130 |
)); |
131 | 131 |
|
132 |
$template->set_block('main_block', 'show_modify_block', 'show_modify'); |
|
132 | 133 |
if($modified_ts == 'Unknown') |
133 | 134 |
{ |
135 |
$template->set_block('show_modify', ''); |
|
134 | 136 |
$template->set_var('CLASS_DISPLAY_MODIFIED', 'hide'); |
135 | 137 |
} else { |
136 | 138 |
$template->set_var('CLASS_DISPLAY_MODIFIED', ''); |
139 |
$template->parse('show_modify', 'show_modify_block', true); |
|
137 | 140 |
} |
138 | 141 |
|
142 |
$template->set_block('main_block', 'show_section_block', 'show_section'); |
|
139 | 143 |
// Work-out if we should show the "manage sections" link |
140 | 144 |
$sql = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` '; |
141 | 145 |
$sql .= 'WHERE `page_id` = '.intval($page_id).' AND `module` = "menu_link"'; |
... | ... | |
143 | 147 |
{ |
144 | 148 |
if($res_sections->numRows() > 0) |
145 | 149 |
{ |
150 |
$template->set_block('show_section', ''); |
|
146 | 151 |
$template->set_var('DISPLAY_MANAGE_SECTIONS', 'none'); |
147 | 152 |
}elseif(MANAGE_SECTIONS == 'enabled') |
148 | 153 |
{ |
149 | 154 |
$template->set_var('TEXT_MANAGE_SECTIONS', $HEADING['MANAGE_SECTIONS']); |
155 |
$template->parse('show_section', 'show_section_block', true); |
|
150 | 156 |
}else { |
157 |
$template->set_block('show_section', ''); |
|
151 | 158 |
$template->set_var('DISPLAY_MANAGE_SECTIONS', 'none'); |
152 | 159 |
} |
153 | 160 |
} else { |
Also available in: Unified diff
Fixed update search settings
Fixed bug in /modules/admin.php