E_ALL fixes and cleanups.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cc421db53d
commit
ba407ff5b3
|
@ -2,7 +2,6 @@
|
|||
require_once('../wp-includes/wp-l10n.php');
|
||||
|
||||
$title = __('Categories');
|
||||
/* <Categories> */
|
||||
|
||||
function add_magic_quotes($array) {
|
||||
foreach ($array as $k => $v) {
|
||||
|
@ -144,7 +143,7 @@ $messages[1] = __('Category added.');
|
|||
$messages[2] = __('Category deleted.');
|
||||
$messages[3] = __('Category updated.');
|
||||
?>
|
||||
<?php if ($_GET['message']) : ?>
|
||||
<?php if (isset($_GET['message'])) : ?>
|
||||
<div class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
@ -193,6 +192,5 @@ set them back to the default category <strong>%s</strong>.'), get_catname(1)) ?>
|
|||
break;
|
||||
}
|
||||
|
||||
/* </Categories> */
|
||||
include('admin-footer.php');
|
||||
?>
|
|
@ -31,7 +31,7 @@ function checkAll(form)
|
|||
<form name="searchform" action="" method="get">
|
||||
<fieldset>
|
||||
<legend><?php _e('Show Comments That Contain...') ?></legend>
|
||||
<input type="text" name="s" value="<?php echo $s; ?>" size="17" />
|
||||
<input type="text" name="s" value="<?php if (isset($s)) echo $s; ?>" size="17" />
|
||||
<input type="submit" name="submit" value="<?php _e('Search') ?>" />
|
||||
<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
|
||||
<?php _e('(Searches within comment text, email, URI, and IP address.)') ?>
|
||||
|
|
|
@ -18,14 +18,6 @@ if (get_settings('use_pingback')) {
|
|||
if (get_settings('use_trackback')) {
|
||||
$form_trackback = '<p><label for="trackback">' . sprintf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a>:</label> (Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') .
|
||||
'<input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>';
|
||||
if ('' != $pinged) {
|
||||
$form_trackback .= '<p>' . __('Already pinged:') . '</p><ul>';
|
||||
$already_pinged = explode("\n", trim($pinged));
|
||||
foreach ($already_pinged as $pinged_url) {
|
||||
$form_trackback .= "\n\t<li>$pinged_url</li>";
|
||||
}
|
||||
$form_trackback .= '</ul>';
|
||||
}
|
||||
} else {
|
||||
$form_trackback = '';
|
||||
}
|
||||
|
@ -38,7 +30,7 @@ $saveasdraft = '';
|
|||
<form name="post" action="post.php" method="post" id="post">
|
||||
|
||||
<?php
|
||||
if ('bookmarklet' == $mode) {
|
||||
if (isset($mode) && 'bookmarklet' == $mode) {
|
||||
echo '<input type="hidden" name="mode" value="bookmarklet" />';
|
||||
}
|
||||
?>
|
||||
|
@ -98,7 +90,6 @@ edCanvas = document.getElementById('content');
|
|||
</script>
|
||||
|
||||
<?php echo $form_pingback ?>
|
||||
<?php echo $form_prevstatus ?>
|
||||
<?php echo $form_trackback; ?>
|
||||
<p><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
|
||||
<input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
|
||||
|
|
|
@ -70,7 +70,7 @@ if( isset( $_GET['m'] ) )
|
|||
<form name="searchform" action="" method="get" style="float: left; width: 20em; margin-left: 3em;">
|
||||
<fieldset>
|
||||
<legend><?php _e('Show Posts That Contain...') ?></legend>
|
||||
<input type="text" name="s" value="<?php echo $s; ?>" size="17" />
|
||||
<input type="text" name="s" value="<?php if (isset($s)) echo $s; ?>" size="17" />
|
||||
<input type="submit" name="submit" value="<?php _e('Search') ?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
@ -103,11 +103,8 @@ default:
|
|||
<li class="last"><a href="moderation.php" class="current"><?php _e('Awaiting Moderation') ?></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
$ignored = $_GET['ignored'];
|
||||
$deleted = $_GET['deleted'];
|
||||
$approved = $_GET['approved'];
|
||||
|
||||
if (($deleted) || ($approved) || ($ignored)) {
|
||||
if (isset($deleted) || isset($approved) || isset($ignored)) {
|
||||
echo "<div class='updated'>\n<p>";
|
||||
if ($approved) {
|
||||
if ('1' == $approved) {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
|
||||
if ($user_level <= 6) {
|
||||
die(__("You have do not have sufficient permissions to edit the options for this blog."));
|
||||
die( __('You have do not have sufficient permissions to edit the options for this blog.') );
|
||||
}
|
||||
|
||||
//we need to iterate through the available option groups.
|
||||
$groups = '';
|
||||
$option_groups = $wpdb->get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $tableoptiongroups ORDER BY group_id");
|
||||
foreach ($option_groups as $option_group) {
|
||||
if ($option_group->group_id == $option_group_id) {
|
||||
|
@ -28,13 +29,14 @@ $submenu = '
|
|||
$sublines = split("\n", $submenu);
|
||||
$_SERVER['REQUEST_URI'] = str_replace('?updated=true', '', $_SERVER['REQUEST_URI']);
|
||||
foreach ($sublines as $subline) {
|
||||
preg_match('/href="([^"]+)"/', $subline, $url);
|
||||
if (preg_match('/href="([^"]+)"/', $subline, $url)) {
|
||||
if (substr($_SERVER['REQUEST_URI'], -8) == substr($url[1], -8)) {
|
||||
$subline = str_replace('a hr', 'a class="current" hr', $subline);
|
||||
if (str_replace('/wp-admin/', '', $_SERVER["REQUEST_URI"]) == $url[1]) {
|
||||
$subline = preg_replace('|href=".*?"|', '', $subline);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo $subline."\n";
|
||||
}
|
||||
echo $groups .
|
||||
|
@ -44,6 +46,6 @@ echo $groups .
|
|||
|
||||
<br clear="all" />
|
||||
|
||||
<?php if ($updated) : ?>
|
||||
<?php if (isset($updated)) : ?>
|
||||
<div class="updated"><p><strong><?php _e('Options saved.') ?></strong></p></div>
|
||||
<?php endif; ?>
|
|
@ -46,11 +46,11 @@ foreach ($check_plugins as $check_plugin) {
|
|||
|
||||
?>
|
||||
|
||||
<?php if ($_GET['activate']) : ?>
|
||||
<?php if (isset($_GET['activate'])) : ?>
|
||||
<div class="updated"><p><?php _e('Plugin <strong>activated</strong>.') ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($_GET['deactivate']) : ?>
|
||||
<?php if (isset($_GET['deactivate'])) : ?>
|
||||
<div class="updated"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
@ -86,6 +86,7 @@ if (!$plugins_dir || !$plugin_files) {
|
|||
</tr>
|
||||
<?php
|
||||
sort($plugin_files); // Alphabetize by filename. Better way?
|
||||
$style = '';
|
||||
foreach($plugin_files as $plugin_file) {
|
||||
$plugin_data = implode('', file(ABSPATH . '/wp-content/plugins/' . $plugin_file));
|
||||
preg_match("|Plugin Name:(.*)|i", $plugin_data, $plugin_name);
|
||||
|
@ -93,19 +94,23 @@ if (!$plugins_dir || !$plugin_files) {
|
|||
preg_match("|Description:(.*)|i", $plugin_data, $description);
|
||||
preg_match("|Author:(.*)|i", $plugin_data, $author_name);
|
||||
preg_match("|Author URI:(.*)|i", $plugin_data, $author_uri);
|
||||
preg_match("|Version:(.*)|i", $plugin_data, $version);
|
||||
$description = wptexturize(wp_filter_kses($description[1]));
|
||||
if ( preg_match("|Version:(.*)|i", $plugin_data, $version) )
|
||||
$version = $version[1];
|
||||
else
|
||||
$version ='';
|
||||
|
||||
$description = wptexturize($description[1]);
|
||||
|
||||
if ('' == $plugin_uri) {
|
||||
$plugin = $plugin_name[1];
|
||||
} else {
|
||||
$plugin = wp_filter_kses( __("<a href='{$plugin_uri[1]}' title='Visit plugin homepage'>{$plugin_name[1]}</a>") );
|
||||
$plugin = __("<a href='{$plugin_uri[1]}' title='Visit plugin homepage'>{$plugin_name[1]}</a>");
|
||||
}
|
||||
|
||||
if ('' == $author_uri) {
|
||||
$author = $author_name[1];
|
||||
} else {
|
||||
$author = wp_filter_kses( __("<a href='{$author_uri[1]}' title='Visit author homepage'>{$author_name[1]}</a>") );
|
||||
$author = __("<a href='{$author_uri[1]}' title='Visit author homepage'>{$author_name[1]}</a>");
|
||||
}
|
||||
|
||||
|
||||
|
@ -121,7 +126,7 @@ if (!$plugins_dir || !$plugin_files) {
|
|||
echo "
|
||||
<tr $style>
|
||||
<td>$plugin</td>
|
||||
<td>{$version[1]}</td>
|
||||
<td>$version</td>
|
||||
<td>$author</td>
|
||||
<td>$description</td>
|
||||
<td>$action</td>
|
||||
|
@ -136,6 +141,5 @@ if (!$plugins_dir || !$plugin_files) {
|
|||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
include('admin-footer.php');
|
||||
?>
|
|
@ -695,8 +695,6 @@ default:
|
|||
require_once ('./admin-header.php');
|
||||
|
||||
if ($user_level > 0) {
|
||||
if ((!$withcomments) && (!$single)) {
|
||||
|
||||
$action = 'post';
|
||||
get_currentuserinfo();
|
||||
$drafts = $wpdb->get_results("SELECT ID, post_title FROM $tableposts WHERE post_status = 'draft' AND post_author = $user_ID");
|
||||
|
@ -731,7 +729,6 @@ default:
|
|||
} else {
|
||||
include('edit-form.php');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="wrap">
|
||||
<?php _e('<h3>WordPress bookmarklet</h3>
|
||||
|
|
|
@ -224,7 +224,7 @@ default:
|
|||
$bookmarklet_height= (get_settings('use_trackback')) ? 480 : 440;
|
||||
|
||||
?>
|
||||
<?php if ($updated) { ?>
|
||||
<?php if (isset($updated)) { ?>
|
||||
<div class="updated">
|
||||
<p><strong><?php _e('Profile updated.') ?></strong></p>
|
||||
</div>
|
||||
|
|
|
@ -113,7 +113,7 @@ default:
|
|||
}
|
||||
|
||||
?>
|
||||
<?php if ('te' == $_GET['a']) : ?>
|
||||
<?php if (isset($_GET['a'])) : ?>
|
||||
<div class="updated"><p><?php _e('File edited successfully.') ?></p></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrap">
|
||||
|
|
|
@ -164,7 +164,7 @@ default:
|
|||
$standalone = 0;
|
||||
include ('admin-header.php');
|
||||
?>
|
||||
<?php if ($_GET['deleted']) : ?>
|
||||
<?php if (isset($_GET['deleted'])) : ?>
|
||||
<div class="updated"><p><?php _e('User deleted.') ?></p></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrap">
|
||||
|
@ -181,6 +181,7 @@ default:
|
|||
</tr>
|
||||
<?php
|
||||
$users = $wpdb->get_results("SELECT ID FROM $tableusers WHERE user_level > 0 ORDER BY ID");
|
||||
$style = '';
|
||||
foreach ($users as $user) {
|
||||
$user_data = get_userdata($user->ID);
|
||||
$email = $user_data->user_email;
|
||||
|
|
|
@ -223,9 +223,7 @@ function format_to_edit($content) {
|
|||
|
||||
function format_to_post($content) {
|
||||
global $wpdb;
|
||||
$content = stripslashes(stripslashes($content));
|
||||
$content = apply_filters('format_to_post', $content);
|
||||
$content = $wpdb->escape($content);
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<?php
|
||||
|
||||
$curpath = dirname(__FILE__).'/';
|
||||
|
||||
require($curpath . 'functions-formatting.php');
|
||||
|
||||
if (!function_exists('_')) {
|
||||
function _($string) {
|
||||
return $string;
|
||||
|
@ -845,13 +841,9 @@ include_once (ABSPATH . WPINC . '/class-xmlrpcs.php');
|
|||
function doGeoUrlHeader($post_list = '') {
|
||||
global $posts;
|
||||
|
||||
if (empty($post_list)) {
|
||||
$post_list = $posts;
|
||||
}
|
||||
|
||||
if (count($post_list) == 1) {
|
||||
if ($posts && 1 === count($posts)) {
|
||||
// there's only one result see if it has a geo code
|
||||
$row = $post_list[0];
|
||||
$row = $posts[0];
|
||||
$lat = $row->post_lat;
|
||||
$lon = $row->post_lon;
|
||||
$title = $row->post_title;
|
||||
|
@ -864,9 +856,9 @@ function doGeoUrlHeader($post_list = '') {
|
|||
} else {
|
||||
if(get_settings('use_default_geourl')) {
|
||||
// send the default here
|
||||
echo "<meta name=\"ICBM\" content=\"". get_settings('default_geourl_lat') .", ". get_settings('default_geourl_lon') ."\" />\n";
|
||||
echo "<meta name=\"DC.title\" content=\"".convert_chars(strip_tags(get_bloginfo("name")))."\" />\n";
|
||||
echo "<meta name=\"geo.position\" content=\"". get_settings('default_geourl_lat') .";". get_settings('default_geourl_lon') ."\" />\n";
|
||||
echo "<meta name='ICBM' content=\"". get_settings('default_geourl_lat') .", ". get_settings('default_geourl_lon') ."\" />\n";
|
||||
echo "<meta name='DC.title' content=\"".convert_chars(strip_tags(get_bloginfo("name")))."\" />\n";
|
||||
echo "<meta name='geo.position' content=\"". get_settings('default_geourl_lat') .";". get_settings('default_geourl_lon') ."\" />\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -484,6 +484,7 @@ function get_calendar($daylength = 1) {
|
|||
|
||||
function allowed_tags() {
|
||||
global $allowedtags;
|
||||
$allowed = '';
|
||||
foreach($allowedtags as $tag => $attributes) {
|
||||
$allowed .= '<'.$tag;
|
||||
if (0 < count($attributes)) {
|
||||
|
|
|
@ -120,11 +120,9 @@ case 'login':
|
|||
} else {
|
||||
$user_login = $log;
|
||||
$user_pass = $pwd;
|
||||
setcookie('wordpressuser_'.$cookiehash, $user_login, time()+31536000);
|
||||
setcookie('wordpresspass_'.$cookiehash, md5($user_pass), time()+31536000);
|
||||
if (empty($_COOKIE['wordpressblogid_'.$cookiehash])) {
|
||||
setcookie('wordpressblogid_'.$cookiehash, 1,time()+31536000);
|
||||
}
|
||||
setcookie('wordpressuser_'.$cookiehash, $user_login, time() + 31536000, COOKIEPATH);
|
||||
setcookie('wordpresspass_'.$cookiehash, md5($user_pass), time() + 31536000, COOKIEPATH);
|
||||
|
||||
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Cache-Control: no-cache, must-revalidate');
|
||||
|
|
|
@ -37,6 +37,7 @@ if (!$users && !strstr($_SERVER['PHP_SELF'], 'install.php')) {
|
|||
$wpdb->show_errors();
|
||||
|
||||
require (ABSPATH . WPINC . '/functions.php');
|
||||
require (ABSPATH . WPINC . '/functions-formatting.php');
|
||||
require (ABSPATH . 'wp-config-extra.php');
|
||||
require (ABSPATH . WPINC . '/template-functions.php');
|
||||
require (ABSPATH . WPINC . '/links.php');
|
||||
|
|
Loading…
Reference in New Issue