Index: trunk/extensions/Configure/Configure.page.php |
— | — | @@ -1150,7 +1150,7 @@ |
1151 | 1151 | } |
1152 | 1152 | $read = $this->userCanRead( $setting ); |
1153 | 1153 | $edit = $this->userCanEdit( $setting ); |
1154 | | - if ( $edit ) |
| 1154 | + if ( $this->mCanEdit ? $edit : $read ) |
1155 | 1155 | $res = false; |
1156 | 1156 | $perms[$setting] = array( 'read' => $read, 'edit' => $edit ); |
1157 | 1157 | } |
— | — | @@ -1159,8 +1159,8 @@ |
1160 | 1160 | } |
1161 | 1161 | |
1162 | 1162 | $thisSection = ''; |
| 1163 | + #echo "$title => "; var_dump( $res ); echo "<br/>\n"; |
1163 | 1164 | if ( !$res ) { |
1164 | | - $first = true; |
1165 | 1165 | if ( !isset( $param['showlink'] ) ) { |
1166 | 1166 | $showlink = true; |
1167 | 1167 | } elseif ( is_array( $param['showlink'] ) ) { |
— | — | @@ -1181,8 +1181,10 @@ |
1182 | 1182 | 'value' => $this->getSettingValue( $setting ), |
1183 | 1183 | 'link' => $showlink, |
1184 | 1184 | ); |
1185 | | - $canEdit = isset( $params['edit'] ) ? $params['edit'] : $this->userCanEdit( $setting ); |
1186 | | - if ($canEdit) { |
| 1185 | + $show = $this->mCanEdit ? |
| 1186 | + ( isset( $params['edit'] ) ? $params['edit'] : $this->userCanEdit( $setting ) ) : |
| 1187 | + ( isset( $params['read'] ) ? $params['read'] : $this->userCanRead( $setting ) ); |
| 1188 | + if ( $show ) { |
1187 | 1189 | $thisGroup .= $this->buildTableRow( $setting, $params ); |
1188 | 1190 | } else { |
1189 | 1191 | ## Don't even show it. |
— | — | @@ -1191,7 +1193,6 @@ |
1192 | 1194 | |
1193 | 1195 | if ( $thisGroup ) { |
1194 | 1196 | $thisSection .= $this->buildTableHeading( $group ) . $thisGroup . Xml::closeElement( 'table' ); |
1195 | | - $first = false; |
1196 | 1197 | } |
1197 | 1198 | } |
1198 | 1199 | |
— | — | @@ -1202,6 +1203,7 @@ |
1203 | 1204 | } |
1204 | 1205 | |
1205 | 1206 | } |
| 1207 | + #die; |
1206 | 1208 | return $ret; |
1207 | 1209 | } |
1208 | 1210 | } |