Use cap checks instead of multisite and super admin checks. Add some new caps. Merge cleanup. see #11644.

git-svn-id: http://svn.automattic.com/wordpress/trunk@12753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2010-01-18 22:21:36 +00:00
parent 8760e7da1b
commit f7d7bc2dd0
15 changed files with 137 additions and 112 deletions

View File

@@ -292,14 +292,17 @@ endfor;
</tr>
<?php do_settings_fields('general', 'default'); ?>
<?php
if ( is_multisite() && is_dir( ABSPATH . LANGDIR ) && $dh = opendir( ABSPATH . LANGDIR ) )
while( ( $lang_file = readdir( $dh ) ) !== false )
$lang_files = array();
if ( is_multisite() && is_dir( ABSPATH . LANGDIR ) && $dh = opendir( ABSPATH . LANGDIR ) ) {
while ( ( $lang_file = readdir( $dh ) ) !== false ) {
if ( substr( $lang_file, -3 ) == '.mo' )
$lang_files[] = $lang_file;
$lang = get_option('WPLANG');
}
}
if ( is_array($lang_files) && !empty($lang_files) ) {
?>
if ( !empty($lang_files) ) {
?>
<tr valign="top">
<th width="33%" scope="row"><?php _e('Blog language:') ?></th>
<td>
@@ -308,7 +311,7 @@ if ( is_array($lang_files) && !empty($lang_files) ) {
</select>
</td>
</tr>
<?php
<?php
} // languages
?>
</table>