Changeset 1599
- Timestamp:
- 09/05/04 00:24:28 (4 years ago)
- Files:
-
- trunk/wp-admin/admin-header.php (modified) (1 diff)
- trunk/wp-admin/edit-form-advanced.php (modified) (3 diffs)
- trunk/wp-admin/edit-form-comment.php (modified) (1 diff)
- trunk/wp-admin/edit-form.php (modified) (1 diff)
- trunk/wp-admin/edit-page-form.php (modified) (1 diff)
- trunk/wp-admin/link-categories.php (modified) (4 diffs)
- trunk/wp-admin/link-import.php (modified) (2 diffs)
- trunk/wp-admin/link-manager.php (modified) (10 diffs)
- trunk/wp-admin/menu.php (modified) (1 diff)
- trunk/wp-admin/optionhandler.php (deleted)
- trunk/wp-admin/options-discussion.php (modified) (2 diffs)
- trunk/wp-admin/options-general.php (modified) (4 diffs)
- trunk/wp-admin/options-misc.php (modified) (2 diffs)
- trunk/wp-admin/options-permalink.php (modified) (1 diff)
- trunk/wp-admin/options-reading.php (modified) (1 diff)
- trunk/wp-admin/options-writing.php (modified) (3 diffs)
- trunk/wp-admin/options.php (modified) (9 diffs)
- trunk/wp-admin/post.php (modified) (3 diffs)
- trunk/wp-admin/profile.php (modified) (2 diffs)
- trunk/wp-admin/upgrade-functions.php (modified) (10 diffs)
- trunk/wp-atom.php (modified) (1 diff)
- trunk/wp-blog-header.php (modified) (1 diff)
- trunk/wp-commentsrss2.php (modified) (1 diff)
- trunk/wp-includes/functions-post.php (modified) (1 diff)
- trunk/wp-includes/functions.php (modified) (3 diffs)
- trunk/wp-includes/links-update-xml.php (modified) (1 diff)
- trunk/wp-includes/template-functions-general.php (modified) (1 diff)
- trunk/wp-locations.php (modified) (1 diff)
- trunk/wp-mail.php (modified) (1 diff)
- trunk/wp-rdf.php (modified) (1 diff)
- trunk/wp-rss.php (modified) (1 diff)
- trunk/wp-trackback.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-header.php
r1547 r1599 14 14 $posts_per_page = get_settings('posts_per_page'); 15 15 $what_to_show = get_settings('what_to_show'); 16 $archive_mode = get_settings('archive_mode');17 16 $date_format = get_settings('date_format'); 18 17 $time_format = get_settings('time_format'); trunk/wp-admin/edit-form-advanced.php
r1505 r1599 10 10 <?php 11 11 12 $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));13 14 12 if (0 == $post_ID) { 15 13 $form_action = 'post'; … … 19 17 } 20 18 21 if (get_settings('use_pingback')) { 22 $form_pingback = '<input type="hidden" name="post_pingback" value="1" id="post_pingback" />'; 23 } else { 24 $form_pingback = ''; 25 } 19 $form_pingback = '<input type="hidden" name="post_pingback" value="1" id="post_pingback" />'; 26 20 27 21 $form_prevstatus = '<input type="hidden" name="prev_status" value="'.$post_status.'" />'; 28 22 29 if (get_settings('use_trackback')) {30 23 $form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="' . __('Help on trackbacks') . '">' . __('<strong>TrackBack</strong> a <abbr title="Universal Resource Identifier">URI</abbr></a>') . '</label> ' . __('(Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)') . '<br /> 31 24 <input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" value="'. str_replace("\n", ' ', $to_ping) .'" /></p>'; … … 38 31 $pings .= '</ul>'; 39 32 } 40 } else { 41 $form_trackback = ''; 42 } 33 43 34 $saveasdraft = '<input name="save" type="submit" id="save" tabindex="6" value="' . __('Save and Continue Editing') . '" />'; 44 35 trunk/wp-admin/edit-form-comment.php
r1503 r1599 1 1 <?php 2 3 $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));4 2 5 3 $submitbutton_text = __('Edit Comment »'); trunk/wp-admin/edit-form.php
r1505 r1599 2 2 <div class="wrap"> 3 3 <?php 4 5 $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));6 7 4 $form_action = 'post'; 8 5 $form_extra = ''; 9 6 10 if (get_settings('use_pingback')) { 11 $form_pingback = '<input type="hidden" name="post_pingback" value="1" id="post_pingback" />'; 12 } else { 13 $form_pingback = ''; 14 } 7 $form_pingback = '<input type="hidden" name="post_pingback" value="1" id="post_pingback" />'; 15 8 16 if (get_settings('use_trackback')) { 17 $form_trackback = '<p><label for="trackback">' . sprintf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Identifier">URI</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') . 9 $form_trackback = '<p><label for="trackback">' . sprintf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Identifier">URI</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Identifier">URI</abbr>s with spaces.)<br />'), 'http://wordpress.org/docs/reference/post/#trackback') . 18 10 '<input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>'; 19 } else { 20 $form_trackback = ''; 21 } 11 22 12 23 13 $saveasdraft = ''; trunk/wp-admin/edit-page-form.php
r1528 r1599 2 2 <div class="wrap"> 3 3 <?php 4 5 $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));6 7 4 $form_action = 'post'; 8 5 $form_extra = ''; trunk/wp-admin/link-categories.php
r1551 r1599 29 29 include_once('admin-header.php'); 30 30 31 if ($user_level < get_settings('links_minadminlevel'))31 if ($user_level < 5) 32 32 die (__("Cheatin' uh ?")); 33 33 … … 92 92 die(sprintf(__("Can't delete the <strong>%s</strong> link category: this is the default one"), $cat_name)); 93 93 94 if ($user_level < get_settings('links_minadminlevel'))94 if ($user_level < 5) 95 95 die (__("Cheatin' uh ?")); 96 96 … … 208 208 include_once("./admin-header.php"); 209 209 210 if ($user_level < get_settings('links_minadminlevel'))210 if ($user_level < 5) 211 211 die (__("Cheatin' uh ?")); 212 212 … … 281 281 $standalone=0; 282 282 include_once ("./admin-header.php"); 283 if ($user_level < get_settings('links_minadminlevel')) {283 if ($user_level < 5) { 284 284 die(__("You have do not have sufficient permissions to edit the link categories for this blog. :)")); 285 285 } trunk/wp-admin/link-import.php
r1551 r1599 18 18 $standalone = 0; 19 19 include_once('admin-header.php'); 20 if ($user_level < get_settings('links_minadminlevel'))20 if ($user_level < 5) 21 21 die (__("Cheatin’ uh?")); 22 22 … … 75 75 $standalone = 0; 76 76 include_once('admin-header.php'); 77 if ($user_level < get_settings('links_minadminlevel'))77 if ($user_level < 5) 78 78 die (__("Cheatin' uh ?")); 79 79 ?> trunk/wp-admin/link-manager.php
r1551 r1599 90 90 91 91 // check the current user's level first. 92 if ($user_level < get_settings('links_minadminlevel'))92 if ($user_level < 5) 93 93 die (__("Cheatin' uh ?")); 94 94 … … 103 103 $results = $wpdb->get_results("SELECT link_id, link_owner, user_level FROM $wpdb->links LEFT JOIN $wpdb->users ON link_owner = ID WHERE link_id in ($all_links)"); 104 104 foreach ($results as $row) { 105 if ( !get_settings('links_use_adminlevels') ||($user_level >= $row->user_level)) { // ok to proceed105 if (($user_level >= $row->user_level)) { // ok to proceed 106 106 $ids_to_change[] = $row->link_id; 107 107 } … … 123 123 124 124 // check the current user's level first. 125 if ($user_level < get_settings('links_minadminlevel'))125 if ($user_level < 5) 126 126 die (__("Cheatin' uh ?")); 127 127 … … 163 163 164 164 // check the current user's level first. 165 if ($user_level < get_settings('links_minadminlevel'))165 if ($user_level < 5) 166 166 die (__("Cheatin' uh ?")); 167 167 … … 200 200 $auto_toggle = get_autotoggle($link_category); 201 201 202 if ($user_level < get_settings('links_minadminlevel'))202 if ($user_level < 5) 203 203 die (__("Cheatin' uh ?")); 204 204 … … 251 251 $auto_toggle = get_autotoggle($link_category); 252 252 253 if ($user_level < get_settings('links_minadminlevel'))253 if ($user_level < 5) 254 254 die (__("Cheatin' uh ?")); 255 255 … … 284 284 $link_id = (int) $_GET['link_id']; 285 285 286 if ($user_level < get_settings('links_minadminlevel'))286 if ($user_level < 5) 287 287 die (__("Cheatin' uh ?")); 288 288 … … 307 307 $xfn = true; 308 308 include_once ('admin-header.php'); 309 if ($user_level < get_settings('links_minadminlevel')) {309 if ($user_level < 5) { 310 310 die(__('You do not have sufficient permissions to edit the links for this blog.')); 311 311 } … … 572 572 $standalone=0; 573 573 include_once ("./admin-header.php"); 574 if ($user_level < get_settings('links_minadminlevel')) {574 if ($user_level < 5) { 575 575 die(__("You do not have sufficient permissions to edit the links for this blog.")); 576 576 } … … 722 722 $show_buttons = 1; // default 723 723 724 if ( get_settings('links_use_adminlevels') && ($link->user_level > $user_level)) {724 if ($link->user_level > $user_level) { 725 725 $show_buttons = 0; 726 726 } trunk/wp-admin/menu.php
r1573 r1599 37 37 $submenu['options-general.php'][15] = array(__('Reading'), 5, 'options-reading.php'); 38 38 $submenu['options-general.php'][20] = array(__('Discussion'), 5, 'options-discussion.php'); 39 $submenu['options-general.php'][25] = array(__('Miscellaneous'), 5, 'options-misc.php'); 40 $submenu['options-general.php'][30] = array(__('Permalinks'), 5, 'options-permalink.php'); 41 $submenu['options-general.php'][35] = array(__('Link Manager'), 5, 'options.php?option_group_id=8'); 39 $submenu['options-general.php'][25] = array(__('Permalinks'), 5, 'options-permalink.php'); 40 $submenu['options-general.php'][30] = array(__('Miscellaneous'), 5, 'options-misc.php'); 42 41 43 42 $self = preg_replace('|.*/wp-admin/|i', '', $_SERVER['PHP_SELF']); trunk/wp-admin/options-discussion.php
r1463 r1599 104 104 <p><?php _e('When a comment contains any of these words in its content, name, URI, e-mail, or IP, hold it in the moderation queue: (Separate multiple words with new lines.) <a href="http://wiki.wordpress.org/index.php/SpamWords">Common spam words</a>.') ?></p> 105 105 <p> 106 <textarea name="moderation_keys" cols="60" rows="4" id="moderation_keys" style="width: 98%; font-size: 12px;" class="code"><?php echo get_settings('moderation_keys'); ?></textarea>106 <textarea name="moderation_keys" cols="60" rows="4" id="moderation_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('moderation_keys'); ?></textarea> 107 107 </p> 108 108 </fieldset> … … 111 111 </p> 112 112 </form> 113 </div> 114 <?php include( "admin-footer.php")?>113 </div> 114 <?php include('./admin-footer.php'); ?> trunk/wp-admin/options-general.php
r1551 r1599 52 52 <tr valign="top"> 53 53 <th width="33%" scope="row"><?php _e('Weblog title:') ?></th> 54 <td><input name="blogname" type="text" id="blogname" value="<?php echo htmlspecialchars(get_settings('blogname')); ?>" size="40" /></td>54 <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td> 55 55 </tr> 56 56 <tr valign="top"> 57 57 <th scope="row"><?php _e('Tagline:') ?></th> 58 <td><input name="blogdescription" type="text" id="blogdescription" style="width: 95%" value="<?php echo htmlspecialchars(get_settings('blogdescription')); ?>" size="45" />58 <td><input name="blogdescription" type="text" id="blogdescription" style="width: 95%" value="<?php form_option('blogdescription'); ?>" size="45" /> 59 59 <br /> 60 60 <?php _e('In a few words, explain what this weblog is about.') ?></td> … … 62 62 <tr valign="top"> 63 63 <th scope="row"><?php _e('WordPress address (URI):') ?></th> 64 <td><input name="siteurl" type="text" id="siteurl" value="<?php echo get_settings('siteurl'); ?>" size="40" class="code" /></td>64 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code" /></td> 65 65 </tr> 66 66 <tr valign="top"> 67 67 <th scope="row"><?php _e('Blog address (URI):') ?></th> 68 <td><input name="home" type="text" id="home" value="<?php echo get_settings('home'); ?>" size="40" class="code" /><br /><?php _e('If you want your blog homepage to be different than the directory you installed WordPress in, enter that address here. '); ?></td>68 <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code" /><br /><?php _e('If you want your blog homepage to be different than the directory you installed WordPress in, enter that address here. '); ?></td> 69 69 </tr> 70 70 <tr valign="top"> 71 71 <th scope="row"><?php _e('E-mail address:') ?> </th> 72 <td><input name="admin_email" type="text" id="admin_email" value="<?php echo get_settings('admin_email'); ?>" size="40" class="code" />72 <td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" size="40" class="code" /> 73 73 <br /> 74 74 <?php _e('This address is used only for admin purposes.') ?></td> … … 94 94 <tr> 95 95 <th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th> 96 <td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php echo get_settings('gmt_offset'); ?>" />96 <td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" /> 97 97 <?php _e('hours') ?> </td> 98 98 </tr> … … 103 103 <tr> 104 104 <th scope="row"><?php _e('Default date format:') ?></th> 105 <td><input name="date_format" type="text" id="date_format" size="30" value="<?php echo get_settings('date_format'); ?>" /><br />105 <td><input name="date_format" type="text" id="date_format" size="30" value="<?php form_option('date_format'); ?>" /><br /> 106 106 <?php _e('Output:') ?> <strong><?php echo gmdate(get_settings('date_format'), current_time('timestamp')); ?></strong></td> 107 107 </tr> 108 108 <tr> 109 109 <th scope="row"><?php _e('Default time format:') ?></th> 110 <td><input name="time_format" type="text" id="time_format" size="30" value="<?php echo get_settings('time_format'); ?>" /><br />110 <td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br /> 111 111 <?php _e('Output:') ?> <strong><?php echo gmdate(get_settings('time_format'), current_time('timestamp')); ?></strong></td> 112 112 </tr> trunk/wp-admin/options-misc.php
r1429 r1599 22 22 } 23 23 24 $wpvarstoreset = array('action','standalone' , 'option_group_id');24 $wpvarstoreset = array('action','standalone'); 25 25 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 26 26 $wpvar = $wpvarstoreset[$i]; … … 45 45 46 46 <div class="wrap"> 47 <h2><?php _e('Miscellaneous Options') ?></h2>48 <form name="form1" method="post" action="options.php">49 <input type="hidden" name="action" value="update" /> 50 <input type="hidden" name=" action" value="update" /> <input type="hidden" name="page_options" value="'hack_file','use_fileupload','fileupload_realpath','fileupload_url','fileupload_allowedtypes','fileupload_maxk','fileupload_maxk','fileupload_minlevel','use_geo_positions','default_geourl_lat','default_geourl_lon','use_default_geourl'" />51 <fieldset class="options">52 <legend>53 <input name="use_fileupload" type="checkbox" id="use_fileupload" value="1" <?php checked('1', get_settings('use_fileupload')); ?> />54 <label for="use_fileupload"><?php _e('Allow File Uploads') ?></label></legend>55 <table width="100%" cellspacing="2" cellpadding="5" class="editform">56 <tr>57 <th width="33%" valign="top" scope="row"><?php _e('Destination directory:') ?> </th>58 <td>59 <input name="fileupload_realpath" type="text" id="fileupload_realpath" value="<?php echo get_settings('fileupload_realpath'); ?>" size="50" /><br />60 <?php printf(__('Recommended: <code>%s</code>'), ABSPATH . 'wp-content') ?>61 62 </td>63 </tr>64 <tr>65 <th valign="top" scope="row"><?php _e('URI of this directory:') ?> </th>66 <td>67 <input name="fileupload_url" type="text" id="fileupload_url" value="<?php echo get_settings('fileupload_url'); ?>" size="50" /><br />68 <?php printf(__('Recommended: <code>%s</code>'), get_settings('siteurl') . '/wp-content') ?>69 </td>70 </tr>71 <tr>72 <th scope="row"><?php _e('Maximum size:') ?> </th>73 <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_settings('fileupload_maxk'); ?>" size="4" />74 <?php _e('Kilobytes (KB)') ?></td>75 </tr>76 <tr>77 <th valign="top" scope="row"><?php _e('Allowed file extensions:') ?></th>78 <td><input name="fileupload_allowedtypes" type="text" id="fileupload_allowedtypes" value="<?php echo get_settings('fileupload_allowedtypes'); ?>" size="40" />79 <br />80 <?php _e('Recommended: <code>jpg jpeg png gif</code>') ?></td>81 </tr>82 <tr>83 <th scope="row"><?php _e('Minimum level to upload:') ?></th>84 <td><select name="fileupload_minlevel" id="fileupload_minlevel">85 <?php86 for ($i = 1; $i < 11; $i++) {87 if ($i == get_settings('fileupload_minlevel')) $selected = " selected='selected'";88 else $selected = '';47 <h2><?php _e('Miscellaneous Options') ?></h2> 48 <form name="miscoptions" method="post" action="options.php"> 49 <input type="hidden" name="action" value="update" /> 50 <input type="hidden" name="page_options" value="'hack_file','use_fileupload','fileupload_realpath','fileupload_url','fileupload_allowedtypes','fileupload_maxk','fileupload_maxk','fileupload_minlevel','use_geo_positions','use_linksupdate','weblogs_xml_url','links_updated_date_format','links_recently_updated_prepend','links_recently_updated_append','default_geourl_lat','default_geourl_lon','use_default_geourl'" /> 51 <fieldset class="options"> 52 <legend> 53 <input name="use_fileupload" type="checkbox" id="use_fileupload" value="1" <?php checked('1', get_settings('use_fileupload')); ?> /> 54 <label for="use_fileupload"><?php _e('Allow File Uploads') ?></label></legend> 55 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 56 <tr> 57 <th width="33%" valign="top" scope="row"><?php _e('Destination directory:') ?> </th> 58 <td> 59 <input name="fileupload_realpath" type="text" id="fileupload_realpath" value="<?php form_option('fileupload_realpath'); ?>" size="50" /><br /> 60 <?php printf(__('Recommended: <code>%s</code>'), ABSPATH . 'wp-content') ?> 61 62 </td> 63 </tr> 64 <tr> 65 <th valign="top" scope="row"><?php _e('URI of this directory:') ?> </th> 66 <td> 67 <input name="fileupload_url" type="text" id="fileupload_url" value="<?php form_option('fileupload_url'); ?>" size="50" /><br /> 68 <?php printf(__('Recommended: <code>%s</code>'), get_settings('siteurl') . '/wp-content') ?> 69 </td> 70 </tr> 71 <tr> 72 <th scope="row"><?php _e('Maximum size:') ?> </th> 73 <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php form_option('fileupload_maxk'); ?>" size="4" /> 74 <?php _e('Kilobytes (KB)') ?></td> 75 </tr> 76 <tr> 77 <th valign="top" scope="row"><?php _e('Allowed file extensions:') ?></th> 78 <td><input name="fileupload_allowedtypes" type="text" id="fileupload_allowedtypes" value="<?php form_option('fileupload_allowedtypes'); ?>" size="40" /> 79 <br /> 80 <?php _e('Recommended: <code>jpg jpeg png gif</code>') ?></td> 81 </tr> 82 <tr> 83 <th scope="row"><?php _e('Minimum level to upload:') ?></th> 84 <td><select name="fileupload_minlevel" id="fileupload_minlevel"> 85 <?php 86 for ($i = 1; $i < 11; $i++) { 87 if ($i == get_settings('fileupload_minlevel')) $selected = " selected='selected'"; 88 else $selected = ''; 89 89 echo "\n\t<option value='$i' $selected>$i</option>"; 90 } 91 ?> 92 </select></td> 93 </tr> 94 </table> 95 </fieldset> 96 <fieldset class="options"> 97 <legend> 98 <input name="use_geo_positions" type="checkbox" id="use_geo_positions" value="1" <?php checked('1', get_settings('use_geo_positions')); ?> /> 99 <label for="use_geo_positions"><?php _e('Use Geographic Tracking Features') ?></label></legend> 100 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 101 <tr> 102 <th width="33%" valign="top" scope="row"><?php _e('Default latitude:') ?> </th> 103 <td> 104 <input name="default_geourl_lat" type="text" id="default_geourl_lat" value="<?php echo get_settings('default_geourl_lat'); ?>" size="50" /> 105 </td> 106 </tr> 107 <tr> 108 <th valign="top" scope="row"><?php _e('Default longitude:') ?> </th> 109 <td> 110 <input name="default_geourl_lon" type="text" id="default_geourl_lon" value="<?php echo get_settings('default_geourl_lon'); ?>" size="50" /> 111 </td> 112 </tr> 113 <tr> 114 <th scope="row"> </th> 115 <td><label> 116 <input type="checkbox" name="use_default_geourl" value="1" <?php checked('1', get_settings('use_default_geourl')); ?> /> 117 <?php _e('Use default location values if none specified.') ?></label></td> 118 </tr> 90 } 91 ?> 92 </select></td> 93 </tr> 94 </table> 95 </fieldset> 96 <fieldset class="options"> 97 <legend> 98 <input name="use_linksupdate" type="checkbox" id="use_linksupdate" value="1" <?php checked('1', get_settings('use_linksupdate')); ?> /> 99 <label for="use_linksupdate"><?php _e('Track Link’s Update Times') ?></label></legend> 100 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 101 <tr> 102 <th width="33%" valign="top" scope="row"><?php _e('Update file:') ?> </th> 103 <td> 104 <input name="weblogs_xml_url" type="text" id="weblogs_xml_url" value="<?php form_option('weblogs_xml_url'); ?>" size="50" /><br /> 105 <?php __('Recommended: <code>http://static.wordpress.org/changes.xml</code>') ?> 106 107 </td> 108 </tr> 109 <tr> 110 <th valign="top" scope="row"><?php _e('Updated link time format:') ?> </th> 111 <td> 112 <input name="links_updated_date_format" type="text" id="links_updated_date_format" value="<?php form_option('links_updated_date_format'); ?>" size="50" /> 113 </td> 114 </tr> 115 <tr> 116 <th scope="row"><?php _e('Prepend updated with:') ?> </th> 117 <td><input name="links_recently_updated_prepend" type="text" id="links_recently_updated_prepend" value="<?php form_option('links_recently_updated_prepend'); ?>" size="50" /></td> 118 </tr> 119 <tr> 120 <th valign="top" scope="row"><?php _e('Append updated with:') ?></th> 121 <td><input name="links_recently_updated_append" type="text" id="links_recently_updated_append" value="<?php form_option('links_recently_updated_append'); ?>" size="50" /></td> 122 </tr> 123 </table> 124 <p><?php printf(__('A link is "recent" if it has been updated in the past %s minutes.'), '<input name="links_recently_updated_time" type="text" id="links_recently_updated_time" size="3" value="' . get_settings('links_recently_updated_time'). '" />' ) ?></p> 125 </fieldset> 126 <fieldset class="options"> 127 <legend> 128 <input name="use_geo_positions" type="checkbox" id="use_geo_positions" value="1" <?php checked('1', get_settings('use_geo_positions')); ?> /> 129 <label for="use_geo_positions"><?php _e('Use Geographic Tracking Features') ?></label></legend> 130 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 131 <tr> 132 <th width="33%" valign="top" scope="row"><?php _e('Default latitude:') ?> </th> 133 <td> 134 <input name="default_geourl_lat" type="text" id="default_geourl_lat" value="<?php form_option('default_geourl_lat'); ?>" size="50" /> 135 </td> 136 </tr> 137 <tr> 138 <th valign="top" scope="row"><?php _e('Default longitude:') ?> </th> 139 <td> 140 <input name="default_geourl_lon" type="text" id="default_geourl_lon" value="<?php form_option('default_geourl_lon'); ?>" size="50" /> 141 </td> 142 </tr> 143 <tr> 144 <th scope="row"> </th> 145 <td><label> 146 <input type="checkbox" name="use_default_geourl" value="1" <?php checked('1', get_settings('use_default_geourl')); ?> /> 147 <?php _e('Use default location values if none specified.') ?></label></td> 148 </tr> 149 </table> 150 </fieldset> 151 <p> 152 <label><input type="checkbox" name="hack_file" value="1" <?php checked('1', get_settings('hack_file')); ?> /> <?php _e('Use legacy <code>my-hacks.php</code> file support') ?></label> 153 </p> 154 <p class="submit"> 155 <input type="submit" name="Submit" value="<?php _e('Update Options') ?> »" /> 156 </p> 157 </form> 158 </div> 119 159 120 </table> 121 </fieldset> 122 <p> 123 <label> 124 <input type="checkbox" name="hack_file" value="1" <?php checked('1', get_settings('hack_file')); ?> /> 125 <?php _e('Use legacy <code>my-hacks.php</code> file support') ?></label> 126 </p> 127 <p class="submit"> 128 <input type="submit" name="Submit" value="<?php _e('Update Options') ?> »" /> 129 </p> 130 </form> 131 </div> 132 <?php include("admin-footer.php") ?> 160 <?php include('./admin-footer.php'); ?> trunk/wp-admin/options-permalink.php
r1567 r1599 30 30 $home_path = ABSPATH; 31 31 } 32 33 require_once('./optionhandler.php');34 32 35 33 if (isset($_POST['submit'])) { trunk/wp-admin/options-reading.php
r1500 r1599 44 44 45 45 <div class="wrap"> 46 <h2><?php _e('Reading Options') ?></h2> 47 <form name="form1" method="post" action="options.php"> 48 <input type="hidden" name="action" value="update" /> 49 <input type="hidden" name="page_options" value="'posts_per_page','what_to_show','posts_per_rss','rss_use_excerpt','blog_charset','gzipcompression' " /> 50 <fieldset class="options"> 51 <legend><?php _e('Front Page') ?></legend> 52 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 53 <tr valign="top"> 54 <th width="33%" scope="row"><?php _e('Show the most recent:') ?></th> 55 <td><input name="posts_per_page" type="text" id="posts_per_page" value="<?php echo get_settings('posts_per_page'); ?>" size="3" /> 56 <select name="what_to_show" id="what_to_show" > 57 <option value="days" <?php selected('days', get_settings('what_to_show')); ?>><?php _e('days') ?></option> 58 <option value="posts" <?php selected('posts', get_settings('what_to_show')); ?>><?php _e('posts') ?></option> 59 </select> </td> 60 </tr> 61 </table> 62 </fieldset> 46 <h2><?php _e('Reading Options') ?></h2> 47 <form name="form1" method="post" action="options.php"> 48 <input type="hidden" name="action" value="update" /> 49 <input type="hidden" name="page_options" value="'posts_per_page','what_to_show','posts_per_rss','rss_use_excerpt','blog_charset','gzipcompression' " /> 50 <fieldset class="options"> 51 <legend><?php _e('Front Page') ?></legend> 52 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 53 <tr valign="top"> 54 <th width="33%" scope="row"><?php _e('Show the most recent:') ?></th> 55 <td> 56 <input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" size="3" /> 57 <select name="what_to_show" id="what_to_show" > 58 <option value="days" <?php selected('days', get_settings('what_to_show')); ?>><?php _e('days') ?></option> 59 <option value="posts" <?php selected('posts', get_settings('what_to_show')); ?>><?php _e('posts') ?></option> 60 </select> 61 </td> 62 </tr> 63 </table> 64 </fieldset> 63 65 64 <fieldset class="options"> 65 <legend><?php _e('Syndication Feeds') ?></legend> 66 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 67 <tr valign="top"> 68 <th width="33%" scope="row"><?php _e('Show the most recent:') ?></th> 69 <td><input name="posts_per_rss" type="text" id="posts_per_rss" value="<?php echo get_settings('posts_per_rss'); ?>" size="3" /> 70 <?php _e('posts') ?></td> 71 </tr> 72 <tr valign="top"> 73 <th scope="row"><?php _e('For each article, show:') ?> </th> 74 <td><label> 75 <input name="rss_use_excerpt" type="radio" value="0" <?php checked(0, get_settings('rss_use_excerpt')); ?> /> 76 <?php _e('full text') ?></label> <br /> 77 <label> 78 <input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_settings('rss_use_excerpt')); ?> /> 79 <?php _e('summary') ?></label> </td> 80 </tr> 81 </table> 82 </fieldset> 83 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 84 <tr valign="top"> 85 <th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th> 86 <td><input name="blog_charset" type="text" id="blog_charset" value="<?php echo get_settings('blog_charset'); ?>" size="20" class="code" /> 87 <br /> 88 <?php _e('The character encoding you write your blog in (UTF-8 <a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html">recommended</a>)') ?></td> 89 </tr> 90 </table> 91 <p> 92 <label> 93 <input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_settings('gzipcompression')); ?> /> 94 <?php _e('WordPress should compress articles (gzip) if browsers ask for them') ?></label> 95 </p> 96 <p class="submit"> 97 <input type="submit" name="Submit" value="<?php _e('Update Options') ?> »" /> 98 </p> 99 </form> 66 <fieldset class="options"> 67 <legend><?php _e('Syndication Feeds') ?></legend> 68 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 69 <tr valign="top"> 70 <th width="33%" scope="row"><?php _e('Show the most recent:') ?></th> 71 <td><input name="posts_per_rss" type="text" id="posts_per_rss" value="<?php form_option('posts_per_rss'); ?>" size="3" /> <?php _e('posts') ?></td> 72 </tr> 73 <tr valign="top"> 74 <th scope="row"><?php _e('For each article, show:') ?> </th> 75 <td> 76 <label><input name="rss_use_excerpt" type="radio" value="0" <?php checked(0, get_settings('rss_use_excerpt')); ?> /><?php _e('full text') ?></label><br /> 77 <label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_settings('rss_use_excerpt')); ?> /><?php _e('summary') ?></label> 78 </td> 79 </tr> 80 </table> 81 </fieldset> 82 <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 83 <tr valign="top"> 84 <th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th> 85 <td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option('blog_charset'); ?>" size="20" class="code" /><br /> 86 <?php _e('The character encoding you write your blog in (UTF-8 <a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html">recommended</a>)') ?></td> 87 </tr> 88 </table> 89 <p> 90 <label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_settings('gzipcompression')); ?> /> 91 <?php _e('WordPress should compress articles (gzip) if browsers ask for them') ?></label> 92 </p> 93 <p class="submit"> 94 <input type="submit" name="Submit" value="<?php _e('Update Options') ?> »" /> 95 </p> 96 </form> 100 97 </div> 101 <?php include( "admin-footer.php")?>98 <?php include('./admin-footer.php'); ?> trunk/wp-admin/options-writing.php
r1429 r1599 64 64 <tr valign="top"> 65 65 <th width="33%" scope="row"> <?php _e('Size of the writing box:') ?></th> 66 <td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php echo get_settings('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " />66 <td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php form_option('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " /> 67 67 <?php _e('lines') ?></td> 68 68 </tr> … … 93 93 <p><?php printf(__('Enter the sites that you would like to notify when you publish a new post. For a list of some recommended sites to ping please see <a href="%s">Update Services</a> on the wiki. Separate multiple URIs by line breaks.'), 'http://wiki.wordpress.org/index.php/UpdateServices') ?></p> 94 94 95 <textarea name="ping_sites" id="ping_sites" style="width: 98%;"><?php echo get_settings('ping_sites'); ?></textarea>95 <textarea name="ping_sites" id="ping_sites" style="width: 98%;"><?php form_option('ping_sites'); ?></textarea> 96 96 </fieldset> 97 97 <fieldset class="options"> … … 102 102 <tr valign="top"> 103 103 <th scope="row"><?php _e('Mail server:') ?></th> 104 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php echo get_settings('mailserver_url'); ?>" size="40" />104 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" size="40" /> 105 105 <label for="port"><?php _e('Port:') ?></label> 106 <input name="mailserver_port" type="text" id="mailserver_port" value="<?php echo get_settings('mailserver_port'); ?>" size="6" />106 <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" size="6" /> 107 107 </td> 108 108 </tr> 109 109 <tr valign="top"> 110 110 <th width="33%" scope="row"><?php _e('Login name:') ?></th> 111 <td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php echo get_settings('mailserver_login'); ?>" size="40" /></td>111 <td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option('mailserver_login'); ?>" size="40" /></td> 112 112 </tr> 113 113 <tr valign="top"> 114 114 <th scope="row"><?php _e('Password:') ?></th> 115 115 <td> 116 <input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php echo get_settings('mailserver_pass'); ?>" size="40" />116 <input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" size="40" /> 117 117 </td> 118 118 </tr> trunk/wp-admin/options.php
r1597 r1599 23 23 } 24 24 25 $wpvarstoreset = array('action','standalone' , 'option_group_id');25 $wpvarstoreset = array('action','standalone'); 26 26 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 27 27 $wpvar = $wpvarstoreset[$i]; … … 38 38 } 39 39 } 40 if (isset($_GET['option_group_id'])) $option_group_id = (int) $_GET['option_group_id'];41 require_once('./optionhandler.php');42 $non_was_selected = 0;43 if (!isset($_GET['option_group_id'])) {44 $option_group_id = 1;45 $non_was_selected = 1;46 }47 40 48 41 switch($action) { … … 53 46 $any_changed = 0; 54 47 55 // iterate through the list of options in this group56 // pull the vars from the post57 // validate ranges etc.58 // update the values59 48 if (!$_POST['page_options']) { 60 49 foreach ($_POST as $key => $value) { … … 67 56 68 57 $options = $wpdb->get_results("SELECT $wpdb->options.option_id, option_name, option_type, option_value, option_admin_level FROM $wpdb->options WHERE option_name IN ($option_names)"); 69 // die(var_dump($options));70 58 71 59 // HACK … … 85 73 } 86 74 if( in_array($option->option_name, $nonbools) && $new_val == 0 ) $new_val = 'closed'; 87 if ($new_val !== $old_val) { 88 $query = "UPDATE $wpdb->options SET option_value = '$new_val' WHERE option_name = '$option->option_name'"; 89 $result = $wpdb->query($query); 90 //if( in_array($option->option_name, $nonbools)) die('boo'.$query); 91 if (!$result) { 92 $dB_errors .= sprintf(__(" SQL error while saving %s. "), $this_name); 93 } else { 94 ++$any_changed; 95 } 75 if ($new_val !== $old_val) 76 $result = $wpdb->query("UPDATE $wpdb->options SET option_value = '$new_val' WHERE option_name = '$option->option_name'"); 96 77 } 97 78 } 98 } // end foreach99 79 unset($cache_settings); // so they will be re-read 100 80 get_settings('siteurl'); // make it happen now … … 105 85 } 106 86 107 if ( isset($dB_errors) || isset($validation_message) ) { 108 if ($message != '') { 109 $message .= '<br />'; 110 } 111 $message .= $dB_errors . '<br />' . $validation_message; 112 } 113 114 $referred = str_replace(array('&updated=true', '?updated=true') , '', $_SERVER['HTTP_REFERER']); 115 if (strstr($referred, '?')) $goback = $referred . '&updated=true'; 116 else $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true'; 87 $referred = str_replace('?updated=true' , '', $_SERVER['HTTP_REFERER']); 88 $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true'; 117 89 header('Location: ' . $goback); 118 90 break; … … 120 92 default: 121 93 $standalone = 0; 122 include_once( "./admin-header.php");94 include_once('./admin-header.php'); 123 95 if ($user_level <= 6) { 124 96 die(__("You have do not have sufficient permissions to edit the options for this blog.")); … … 129 101 130 102 <div class="wrap"> 131 <h2> <?php echo $current_desc; ?></h2>132 <form name="form" action=" <?php echo $this_file; ?>" method="post">103 <h2>All options</h2> 104 <form name="form" action="options.php" method="post"> 133 105 <input type="hidden" name="action" value="update" /> 134 <input type="hidden" name="option_group_id" value="<?php echo $option_group_id; ?>" /> 135 <table width="90%" cellpadding="2" cellspacing="2" border="0"> 106 <table width="98%"> 136 107 <?php 137 //Now display all the options for the selected group.138 if ('all' == $_GET['option_group_id']) :139 108 $options = $wpdb->get_results("SELECT * FROM $wpdb->options ORDER BY option_name"); 140 endif;141 109 142 110 foreach ($options as $option) : 143 if ('all' == $_GET['option_group_id']) $option->option_type = 3; 144 echo "\t<tr><td width='10%' valign='top'>" . get_option_widget($option, ($user_level >= $option->option_admin_level), '</td><td width="15%" valign="top" style="border: 1px solid #ccc">'); 145 echo "\t</td><td valign='top' class='helptext'>$option->option_description</td></tr>\n"; 111 $value = htmlspecialchars($option->option_value); 112 echo " 113 <tr> 114 <th scope='row'><label for='$option->option_name'>$option->option_name</label></th> 115 <td><input type='text' name='$option->option_name' id='$option->option_name' size='30' value='$value' /></td> 116 <td>$option->option_description</td> 117 </tr>"; 146 118 endforeach; 147 119 ?> … … 151 123 </div> 152 124 153 <div class="wrap"> 125 154 126 <?php 155 if ($current_long_desc != '') {156
