[wp-cvs] wordpress/wp-admin admin-footer.php, 1.12, 1.13 edit-form-advanced.php, 1.34, 1.35 options-misc.php, 1.13, 1.14 options-permalink.php, 1.41, 1.42 options-writing.php, 1.23, 1.24 post.php, 1.82, 1.83 upgrade-schema.php, 1.5, 1.6

Matthew Mullenweg saxmatt at users.sourceforge.net
Wed Sep 15 15:09:40 UTC 2004


Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22957/wp-admin

Modified Files:
	admin-footer.php edit-form-advanced.php options-misc.php 
	options-permalink.php options-writing.php post.php 
	upgrade-schema.php 
Log Message:
Axing of geo stuff, major cleanups on permalink options, style tweaks.

Index: options-misc.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/options-misc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** options-misc.php	5 Sep 2004 00:24:26 -0000	1.13
--- options-misc.php	15 Sep 2004 15:09:37 -0000	1.14
***************
*** 48,52 ****
  <form name="miscoptions" method="post" action="options.php"> 
  	<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','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'" /> 
  	<fieldset class="options">
  	<legend>
--- 48,52 ----
  <form name="miscoptions" method="post" action="options.php"> 
  	<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','use_linksupdate','weblogs_xml_url','links_updated_date_format','links_recently_updated_prepend','links_recently_updated_append'" /> 
  	<fieldset class="options">
  	<legend>
***************
*** 124,152 ****
  	<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>
  	</fieldset>
! 	<fieldset class="options">
! 	<legend>
! 	<input name="use_geo_positions" type="checkbox" id="use_geo_positions" value="1" <?php checked('1', get_settings('use_geo_positions')); ?> />
! 	<label for="use_geo_positions"><?php _e('Use Geographic Tracking Features') ?></label></legend>
! 	<table width="100%" cellspacing="2" cellpadding="5" class="editform"> 
! 	<tr> 
! 	<th width="33%" valign="top" scope="row"><?php _e('Default latitude:') ?> </th> 
! 	<td>
! 	<input name="default_geourl_lat" type="text" id="default_geourl_lat" value="<?php form_option('default_geourl_lat'); ?>" size="50" />
! 	</td> 
! 	</tr> 
! 	<tr>
! 	<th valign="top" scope="row"><?php _e('Default longitude:') ?> </th>
! 	<td>          
! 	<input name="default_geourl_lon" type="text" id="default_geourl_lon" value="<?php form_option('default_geourl_lon'); ?>" size="50" />
! 	</td>
! 	</tr>
! 	<tr>
! 	<th scope="row">  </th>
! 	<td><label>
! 	<input type="checkbox" name="use_default_geourl" value="1" <?php checked('1', get_settings('use_default_geourl')); ?> /> 
! 	<?php _e('Use default location values if none specified.') ?></label></td>
! 	</tr>
! 	</table> 
! 	</fieldset>
  	<p>
  	<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>
--- 124,128 ----
  	<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>
  	</fieldset>
! 
  	<p>
  	<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>

Index: upgrade-schema.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/upgrade-schema.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** upgrade-schema.php	11 Sep 2004 16:12:40 -0000	1.5
--- upgrade-schema.php	15 Sep 2004 15:09:38 -0000	1.6
***************
*** 106,111 ****
    post_category int(4) NOT NULL default '0',
    post_excerpt text NOT NULL,
-   post_lat float default NULL,
-   post_lon float default NULL,
    post_status enum('publish','draft','private','static') NOT NULL default 'publish',
    comment_status enum('open','closed','registered_only') NOT NULL default 'open',
--- 106,109 ----
***************
*** 190,197 ****
  	add_option('date_format', 'F j, Y');
  	add_option('time_format', 'g:i a');
- 	add_option('use_geo_positions', 0);
- 	add_option('use_default_geourl', 0);
- 	add_option('default_geourl_lat', 0);
- 	add_option('default_geourl_lon', 0);
  	add_option('weblogs_xml_url', 'http://static.wordpress.org/changes.xml');
  	add_option('links_updated_date_format', 'F j, Y g:i a');
--- 188,191 ----
***************
*** 220,224 ****
  
  	// Delete unused options
! 	$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'rss_language', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls');
  	foreach ($unusedoptions as $option) :
  		delete_option($option);
--- 214,218 ----
  
  	// Delete unused options
! 	$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'rss_language', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl');
  	foreach ($unusedoptions as $option) :
  		delete_option($option);

Index: admin-footer.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/admin-footer.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** admin-footer.php	28 Jul 2004 18:44:36 -0000	1.12
--- admin-footer.php	15 Sep 2004 15:09:37 -0000	1.13
***************
*** 4,10 ****
  <?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?>
  </p>
! <p>	<a href="http://getfirefox.com/" title="<?php _e('WordPress recommends the open-source Firefox browser') ?>"><img src="http://www.mozilla.org/products/firefox/buttons/getfirefox_88x31.png" width="88" height="31" alt="Get Firefox" /></a></p>
  </div>
  <?php do_action('admin_footer', ''); ?>
  </body>
  </html>
\ No newline at end of file
--- 4,13 ----
  <?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?>
  </p>
! 
! <p><a href="http://spreadfirefox.com/community/?q=affiliates&amp;id=2490&amp;t=1" title="<?php _e('WordPress recommends the open-source Firefox browser') ?>"><img src="http://static.wordpress.org/get-firefox.png" alt="Get Firefox" /></a></p>
  </div>
+ 
  <?php do_action('admin_footer', ''); ?>
+ 
  </body>
  </html>
\ No newline at end of file

Index: edit-form-advanced.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/edit-form-advanced.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** edit-form-advanced.php	14 Sep 2004 12:41:09 -0000	1.34
--- edit-form-advanced.php	15 Sep 2004 15:09:37 -0000	1.35
***************
*** 115,138 ****
  //-->
  </script>
- <?php
- if ($action != 'editcomment') {
-     if (get_settings('use_geo_positions')) {
-         if (empty($edited_lat)) {
-             if (get_settings('use_default_geourl')) {
-                 $edited_lat = get_settings('default_geourl_lat');
-                 $edited_lon = get_settings('default_geourl_lon');
-             }
-         }
- ?>
- <br />
- <fieldset id="post_lat_lon">
- <label for="post_latf"><?php _e('Latitude:') ?></label><input size="8" type="text" value="<?php echo $edited_lat; ?>" name="post_latf" id="post_latf" />&nbsp;
- <label for="post_lonf"><?php _e('Longitude:') ?></label><input size="8" type="text" value="<?php echo $edited_lon; ?>" name="post_lonf" id="post_lonf" />&nbsp; <a href="http://www.geourl.org/resources.html" rel="external"><?php _e('click for Geo Info') ?></a>
- </fieldset>
- <br />
- <?php
-     }
- }
- ?>
  
  <?php echo $form_pingback ?>
--- 115,118 ----
***************
*** 141,145 ****
  
  
- 
  <p class="submit"><?php echo $saveasdraft; ?> <input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="6" /> 
  <?php 
--- 121,124 ----

Index: options-permalink.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/options-permalink.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** options-permalink.php	5 Sep 2004 00:24:26 -0000	1.41
--- options-permalink.php	15 Sep 2004 15:09:37 -0000	1.42
***************
*** 5,32 ****
  $parent_file = 'options-general.php';
  
! $wpvarstoreset = array('action','standalone', 'option_group_id');
! for ($i=0; $i<count($wpvarstoreset); $i += 1) {
! 	$wpvar = $wpvarstoreset[$i];
! 	if (!isset($$wpvar)) {
! 		if (empty($_POST["$wpvar"])) {
! 			if (empty($_GET["$wpvar"])) {
! 				$$wpvar = '';
! 			} else {
! 				$$wpvar = $_GET["$wpvar"];
! 			}
! 		} else {
! 			$$wpvar = $_POST["$wpvar"];
! 		}
! 	}
! }
  
  $home = get_settings('home');
! if ($home != '' && $home != get_settings('siteurl')) {
!   $home_path = parse_url($home);
!   $home_path = $home_root['path'];
!   $root = str_replace($_SERVER["PHP_SELF"], '', $_SERVER["PATH_TRANSLATED"]);
!   $home_path = $root . $home_path . "/";
  } else {
!   $home_path = ABSPATH;
  }
  
--- 5,22 ----
  $parent_file = 'options-general.php';
  
! require_once('./admin-header.php');
! if ($user_level <= 8)
! 	die(__('You have do not have sufficient permissions to edit the options for this blog.'));
! 
! require('./options-head.php');
  
  $home = get_settings('home');
! if ( $home != '' && $home != get_settings('siteurl') ) {
! 	$home_path = parse_url($home);
! 	$home_path = $home_root['path'];
! 	$root = str_replace($_SERVER["PHP_SELF"], '', $_SERVER["PATH_TRANSLATED"]);
! 	$home_path = $root . $home_path . "/";
  } else {
! 	$home_path = ABSPATH;
  }
  
***************
*** 42,133 ****
  }
  
  
  
! 	require_once('admin-header.php');
! 	if ($user_level <= 6) {
! 		die(__("You have do not have sufficient permissions to edit the options for this blog."));
! 	}
! 	require('./options-head.php');
  ?>
  <?php if (isset($_POST['submit'])) : ?>
  <div class="updated"><p><?php _e('Permalink structure updated.'); ?></p></div>
  <?php endif; ?>
  
- <?php if(isset($_POST['rules'])) {
- 		$rules = explode("\n", $_POST['rules']);
- 		if(insert_with_markers($home_path.'.htaccess', 'WordPress', $rules)) {
- ?>
- <div class="updated" id="htupdate"><p><?php _e('mod_rewrite rules written to .htaccess.'); ?></p></div>
- <?php
- 		} else {
- ?>
- <div class="updated" id="htupdate"><p><?php _e('Failed to write mod_rewrite rules to .htaccess.'); ?></p></div>
- <?php
-         }
- 	}
- ?>
- 
  <div class="wrap"> 
    <h2><?php _e('Edit Permalink Structure') ?></h2> 
!   <?php _e('<p>WordPress offers you the ability to create a custom URI structure for your permalinks and archives. The following &#8220;tags&#8221; are available:</p>')?> 
  
  <dl>
! 	<dt><code>%year%</code></dt>
! 	<dd>
! 		<?php _e('The year of the post, 4 digits, for example <code>2004</code>') ?>
! 	</dd>
! 	<dt><code>%monthnum%</code></dt>
! 	<dd>
! 		<?php _e('Month of the year, for example <code>05</code>') ?>
! 	</dd>
! 	<dt><code>%day%</code></dt>
! 	<dd>
! 		<?php _e('Day of the month, for example <code>28</code>') ?>
! 	</dd>
! 	<dt><code>%hour%</code></dt>
! 	<dd>
! 		<?php _e('Hour of the day, for example <code>15</code>') ?>
! 	</dd>
! 	<dt><code>%minute%</code></dt>
! 	<dd>
! 		<?php _e('Minute of the hour, for example <code>43</code>') ?>
! 	</dd>
! 	<dt><code>%second%</code></dt>
! 	<dd>
! 		<?php _e('Second of the minute, for example <code>33</code>') ?>
! 	</dd>
! 	<dt><code>%postname%</code></dt>
! 	<dd>
! 		<?php _e('A sanitized version of the title of the post. So &#8220;This Is A Great Post!&#8221; becomes &#8220;<code>this-is-a-great-post</code>&#8221; in the URI') ?>
! 	</dd>
! 	<dt><code>%post_id%</code></dt>
! 	<dd>
! 		<?php _e('The unique ID # of the post, for example <code>423</code>') ?>
! 	</dd>
! 	<dt><code>%category%</code></dt>
! 	<dd>
! 		<?php _e('A sanitized version of the category name.') ?>
! 	</dd>
! 	<dt><code>%author%</code></dt>
! 	<dd>
! 		<?php _e('A sanitized version of the author name.') ?>
! 	</dd>
  </dl>
  
!   <?php _e('<p>So for example a value like:</p>
!   <p><code>/archives/%year%/%monthnum%/%day%/%postname%/</code> </p>
!   <p>would give you a permalink like:</p>
!   <p><code>/archives/2003/05/23/my-cheese-sandwich/</code></p>
!   <p> In general for this you must use mod_rewrite, however if you put a filename at the beginning WordPress will attempt to use that to pass the arguments, for example:</p>
!   <p><code>/index.php/archives/%year%/%monthnum%/%day%/%postname%/</code> </p>
!   <p>If you use this option you can ignore the mod_rewrite rules.</p>') ?>
    <form name="form" action="options-permalink.php" method="post"> 
      <p><?php _e('Use the template tags above to create a virtual site structure:') ?></p>
      <p> 
!       <input name="permalink_structure" type="text" style="width: 98%;" value="<?php echo $permalink_structure; ?>" /> 
      </p> 
  	<p><?php _e('If you like, you may enter a custom prefix for your category URIs here. For example, <code>/taxonomy/categorias</code> would make your category links like <code>http://example.org/taxonomy/categorias/general/</code>. If you leave this blank the default will be used.') ?></p>
  	<p> 
!   <input name="category_base" type="text" style="width: 98%;" value="<?php echo $category_base; ?>" /> 
       </p> 
      <p class="submit"> 
--- 32,96 ----
  }
  
+ if ( (!file_exists($home_path.'.htaccess') && is_writable($home_path)) || is_writable($home_path.'.htaccess') )
+ 	$writable = true;
+ else
+ 	$writable = false;
  
+ if ( strstr($permalink_structure, 'index.php') ) // If they're using 
+ 	$usingpi = true;
+ else
+ 	$usingpi = false;
  
! if ( $writable && !$usingpi && $is_apache ) {
! 	$rules = explode("\n", mod_rewrite_rules($permalink_structure));
! 	insert_with_markers($home_path.'.htaccess', 'WordPress', $rules);
! }
  ?>
+ 
  <?php if (isset($_POST['submit'])) : ?>
  <div class="updated"><p><?php _e('Permalink structure updated.'); ?></p></div>
  <?php endif; ?>
  
  <div class="wrap"> 
    <h2><?php _e('Edit Permalink Structure') ?></h2> 
!   <p><?php _e('By default WordPress uses web URIs which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URI structure for your permalinks and archives. This can improve the aesthetics, usability, and longevity of your links. A <a href="http://codex.wordpress.org/Permalink_Structure">number of tags are available</a>, and here are some examples to get you started.'); ?></p>
  
+ <?php if ($is_apache) : ?>
  <dl>
! <dt><?php _e('Structure'); ?>: <code>/%year%/%monthnum%/%day%/%postname%/</code></dt>
! 	<strong>
! 	<dd><?php _e('Result'); ?>: <code><?php echo get_settings('home') . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></dd>
! 	</strong>
! 	<dt><?php _e('Structure'); ?>: <code>/archives/%post_id%</code></dt>
! 	<strong>
! 	<dd><?php _e('Result'); ?>: <code><?php echo get_settings('home'); ?>/archives/123</code></dd>
! 	</strong>
! 	<dt></dt>
  </dl>
  
! <p><?php _e('For the above to work you must have something called <code>mod_rewrite</code> installed on your server. (Ask your host.) If that isn&#8217;t available, you can prefix the structure with <code>/index.php/</code> . This is the recommend method if you are on any web server but Apache.'); ?></p>
! 
! <?php else : ?>
! <dl>
! <dt><?php _e('Structure'); ?>: <code>/index.php/%year%/%monthnum%/%day%/%postname%/</code></dt>
! 	<strong>
! 	<dd><?php _e('Result'); ?>: <code><?php echo get_settings('home') . '/index.php/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></dd>
! 	</strong>
! 	<dt><?php _e('Structure'); ?>: <code>/index.php/archives/%post_id%</code></dt>
! 	<strong>
! 	<dd><?php _e('Result'); ?>: <code><?php echo get_settings('home'); ?>/index.php/archives/123</code></dd>
! 	</strong>
! 	<dt></dt>
! </dl>
! <?php endif; ?>
! 
    <form name="form" action="options-permalink.php" method="post"> 
      <p><?php _e('Use the template tags above to create a virtual site structure:') ?></p>
      <p> 
!       <?php _e('Structure'); ?>: <input name="permalink_structure" type="text" class="code" style="width: 60%;" value="<?php echo $permalink_structure; ?>" size="50" /> 
      </p> 
  	<p><?php _e('If you like, you may enter a custom prefix for your category URIs here. For example, <code>/taxonomy/categorias</code> would make your category links like <code>http://example.org/taxonomy/categorias/general/</code>. If you leave this blank the default will be used.') ?></p>
  	<p> 
!   <?php _e('Category base'); ?>: <input name="category_base" type="text" class="code"  value="<?php echo $category_base; ?>" size="30" /> 
       </p> 
      <p class="submit"> 
***************
*** 135,142 ****
      </p> 
    </form> 
! <?php
!  if ($permalink_structure) {
! ?>
!   <p><?php printf(__('Using the permalink structure value you currently have, <code>%s</code>, these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.'), $permalink_structure) ?></p>
  <form action="options-permalink.php" method="post">
     <p>
--- 98,103 ----
      </p> 
    </form> 
! <?php if ( $permalink_structure && !$usingpi && !$writable ) : ?>
!   <p><?php _e('If your <code>.htaccess</code> was <a href="http://codex.wordpress.org/Make_a_Directory_Writable">writable</a> we could do this automatically, but it isn&#8217;t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p>
  <form action="options-permalink.php" method="post">
     <p>
***************
*** 144,167 ****
  </textarea>
      </p>
! <?php
! 
! if ((! file_exists($home_path.'.htaccess') && is_writable($home_path)) || is_writable($home_path.'.htaccess')) {
! ?>
!     <p class="submit"> 
!         <input type="submit" name="writerules" value="<?php _e('Write mod_rewrite rules to .htaccess &raquo;') ?>"> 
! 	</p>
! <?php } ?>
  </form>
!  
! <?php
! } else {
! ?>
! <p>
! <?php _e('You are not currently using customized permalinks. No special mod_rewrite rules are needed.') ?>
! </p>
! <?php } ?>
  </div>
  
! <?php
! require('./admin-footer.php');
! ?>
\ No newline at end of file
--- 105,112 ----
  </textarea>
      </p>
! <?php endif; ?>
  </form>
! 
  </div>
  
! <?php require('./admin-footer.php'); ?>
\ No newline at end of file

Index: post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/post.php,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** post.php	14 Sep 2004 12:41:09 -0000	1.82
--- post.php	15 Sep 2004 15:09:37 -0000	1.83
***************
*** 55,66 ****
  		$post_title = $_POST['post_title'];
  		$post_categories = $_POST['post_category'];
- 		if(get_settings('use_geo_positions')) {
- 			$latstr = $_POST['post_latf'];
- 			$lonstr = $_POST['post_lonf'];
- 			if((strlen($latstr) > 2) && (strlen($lonstr) > 2 ) ) {
- 				$post_latf = floatval($_POST['post_latf']);
- 				$post_lonf = floatval($_POST['post_lonf']);
- 			}
- 		}
  		$post_status = $_POST['post_status'];
  		$post_name = $_POST['post_name'];
--- 55,58 ----
***************
*** 113,123 ****
  	if ('' != $_POST['savepage']) $post_status = 'static';
  
- 	if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) {
- 	$postquery ="INSERT INTO $wpdb->posts
- 			(ID, post_author, post_date, post_date_gmt, post_content, post_title, post_lat, post_lon, post_excerpt,  post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt)
- 			VALUES
- 			('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', $post_latf, $post_lonf,'$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt')
- 			";
- 	} else {
  	$postquery ="INSERT INTO $wpdb->posts
  			(ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt,  post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt)
--- 105,108 ----
***************
*** 125,129 ****
  			('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt')
  			";
- 	}
  
  	$result = $wpdb->query($postquery);
--- 110,113 ----
***************
*** 179,185 ****
  
  	if ($post_status == 'publish') {
- 		if((get_settings('use_geo_positions')) && ($post_latf != null) && ($post_lonf != null)) {
- 			pingGeoUrl($post_ID);
- 		}
  
  		if ($post_pingback) {
--- 163,166 ----
***************
*** 229,234 ****
  		$content = $postdata->post_content;
  		$content = format_to_edit($content);
- 		$edited_lat = $postdata->post_lat;
- 		$edited_lon = $postdata->post_lon;
  		$excerpt = $postdata->post_excerpt;
  		$excerpt = format_to_edit($excerpt);
--- 210,213 ----
***************
*** 292,308 ****
  		$excerpt = format_to_post($excerpt);
  		$post_title = $_POST['post_title'];
- 		if(get_settings('use_geo_positions')) {
- 			$latf = floatval($_POST["post_latf"]);
- 				$lonf = floatval($_POST["post_lonf"]);
- 				$latlonaddition = "";
- 				if( ($latf != null) && ($latf <= 90 ) && ($latf >= -90) && ($lonf != null) && ($lonf <= 360) && ($lonf >= -360) ) {
- 						pingGeoUrl($post_ID);
- 				$latlonaddition = " post_lat=".$latf.", post_lon =".$lonf.", ";
- 				} else {
- 				$latlonaddition = " post_lat=null, post_lon=null, ";
- 			}
- 		} else {
- 			$latlonaddition = '';
- 		}
  		$prev_status = $_POST['prev_status'];
  		$post_status = $_POST['post_status'];
--- 271,274 ----
***************
*** 370,376 ****
  			post_title = '$post_title'"
  			.$datemodif_gmt
! 			.$datemodif.","
! 			.$latlonaddition."
! 			
  			post_status = '$post_status',
  			comment_status = '$comment_status',
--- 336,340 ----
  			post_title = '$post_title'"
  			.$datemodif_gmt
! 			.$datemodif.",			
  			post_status = '$post_status',
  			comment_status = '$comment_status',
***************
*** 469,481 ****
  		die (sprintf(__('You don&#8217;t have the right to delete <strong>%s</strong>&#8217;s posts.'), $authordata[1]));
  
- 	// send geoURL ping to "erase" from their DB
- 	$query = "SELECT post_lat from $wpdb->posts WHERE ID=$post_id";
- 	$rows = $wpdb->query($query); 
- 	$myrow = $rows[0];
- 	$latf = $myrow->post_lat;
- 	if($latf != null ) {
- 		pingGeoUrl($post);
- 	}
- 
  	$result = $wpdb->query("DELETE FROM $wpdb->posts WHERE ID=$post_id");
  	if (!$result)
--- 433,436 ----

Index: options-writing.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/options-writing.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** options-writing.php	14 Sep 2004 12:41:09 -0000	1.23
--- options-writing.php	15 Sep 2004 15:09:37 -0000	1.24
***************
*** 5,46 ****
  $parent_file = 'options-general.php';
  
- function add_magic_quotes($array) {
- 	foreach ($array as $k => $v) {
- 		if (is_array($v)) {
- 			$array[$k] = add_magic_quotes($v);
- 		} else {
- 			$array[$k] = addslashes($v);
- 		}
- 	}
- 	return $array;
- }
- 
- if (!get_magic_quotes_gpc()) {
- 	$_GET    = add_magic_quotes($_GET);
- 	$_POST   = add_magic_quotes($_POST);
- 	$_COOKIE = add_magic_quotes($_COOKIE);
- }
- 
- $wpvarstoreset = array('action','standalone', 'option_group_id');
- for ($i=0; $i<count($wpvarstoreset); $i += 1) {
- 	$wpvar = $wpvarstoreset[$i];
- 	if (!isset($$wpvar)) {
- 		if (empty($_POST["$wpvar"])) {
- 			if (empty($_GET["$wpvar"])) {
- 				$$wpvar = '';
- 			} else {
- 				$$wpvar = $_GET["$wpvar"];
- 			}
- 		} else {
- 			$$wpvar = $_POST["$wpvar"];
- 		}
- 	}
- }
- 
- 
- 
  $standalone = 0;
! include_once('admin-header.php');
! include('options-head.php');
  ?>
  
--- 5,11 ----
  $parent_file = 'options-general.php';
  
  $standalone = 0;
! include_once('./admin-header.php');
! include('./options-head.php');
  ?>
  
***************
*** 93,128 ****
  <label for="new_users_can_blog2"><input name="new_users_can_blog" id="new_users_can_blog2" type="radio" value="2" <?php checked('2', get_settings('new_users_can_blog')); ?> /> <?php _e('May publish articles') ?></label><br /></td> 
        </tr> 
!     </table> 
!     <fieldset class="options">
  	<legend><?php _e('Update Services') ?></legend>
!           <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>
  	
  	<textarea name="ping_sites" id="ping_sites" style="width: 98%;"><?php form_option('ping_sites'); ?></textarea>
! 	</fieldset>
!     <fieldset class="options">
  	<legend><?php _e('Writing by e-mail') ?></legend>
  	<p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: <code>%s</code>, <code>%s</code>, <code>%s</code>.'), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5)) ?></p>
  	
! 		<table width="100%" cellspacing="2" cellpadding="5" class="editform">
!         	<tr valign="top">
!                 <th scope="row"><?php _e('Mail server:') ?></th>
!         		<td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" size="40" />
!                 <label for="port"><?php _e('Port:') ?></label> 
! 				<input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" size="6" />
!        			</td>
!        		</tr>
!         	<tr valign="top">
!                 <th width="33%" scope="row"><?php _e('Login name:') ?></th>
!         		<td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option('mailserver_login'); ?>" size="40" /></td>
!        		</tr>
!         	<tr valign="top">
!                 <th scope="row"><?php _e('Password:') ?></th>
!         		<td>
!         			<input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" size="40" />
!         		</td>
!        		</tr>
!         	<tr valign="top">
!                 <th scope="row"><?php _e('Default post by mail category:') ?></th>
!         		<td><select name="default_email_category" id="default_email_category">
  <?php
  //Alreay have $categories from default_category
--- 58,95 ----
  <label for="new_users_can_blog2"><input name="new_users_can_blog" id="new_users_can_blog2" type="radio" value="2" <?php checked('2', get_settings('new_users_can_blog')); ?> /> <?php _e('May publish articles') ?></label><br /></td> 
        </tr> 
!     </table>
! 
! <fieldset class="options">
  	<legend><?php _e('Update Services') ?></legend>
!           <p><?php printf(__('When you publish a new post WordPress can notify site update services. For more about this see <a href="%s">Update Services</a> on the Codex. Separate multiple service URIs with line breaks.'), 'http://codex.wordpress.org/Update_Services') ?></p>
  	
  	<textarea name="ping_sites" id="ping_sites" style="width: 98%;"><?php form_option('ping_sites'); ?></textarea>
! </fieldset>
! 
! <fieldset class="options">
  	<legend><?php _e('Writing by e-mail') ?></legend>
  	<p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: <code>%s</code>, <code>%s</code>, <code>%s</code>.'), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5)) ?></p>
  	
! 	<table width="100%" cellspacing="2" cellpadding="5" class="editform">
! 		<tr valign="top">
! 			<th scope="row"><?php _e('Mail server:') ?></th>
! 			<td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" size="40" />
! 			<label for="port"><?php _e('Port:') ?></label> 
! 			<input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" size="6" />
! 			</td>
! 		</tr>
! 		<tr valign="top">
! 			<th width="33%" scope="row"><?php _e('Login name:') ?></th>
! 			<td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option('mailserver_login'); ?>" size="40" /></td>
! 		</tr>
! 		<tr valign="top">
! 			<th scope="row"><?php _e('Password:') ?></th>
! 			<td>
! 				<input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" size="40" />
! 			</td>
! 		</tr>
! 		<tr valign="top">
! 			<th scope="row"><?php _e('Default post by mail category:') ?></th>
! 			<td><select name="default_email_category" id="default_email_category">
  <?php
  //Alreay have $categories from default_category
***************
*** 130,144 ****
  if ($category->cat_ID == get_settings('default_email_category')) $selected = " selected='selected'";
  else $selected = '';
! 	echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
  endforeach;
  ?>
!        			</select></td>
!        		</tr>
!        	</table>
! 		</fieldset>
!     <p class="submit"> 
!       <input type="submit" name="Submit" value="<?php _e('Update Options') ?> &raquo;" /> 
!     </p> 
!   </form> 
  </div> 
! <?php include("admin-footer.php") ?>
--- 97,112 ----
  if ($category->cat_ID == get_settings('default_email_category')) $selected = " selected='selected'";
  else $selected = '';
! echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
  endforeach;
  ?>
! 			</select></td>
! 		</tr>
! 	</table>
! </fieldset>
! <p class="submit"> 
! 	<input type="submit" name="Submit" value="<?php _e('Update Options') ?> &raquo;" /> 
! </p>
! </form> 
  </div> 
! 
! <?php include('./admin-footer.php') ?>
\ No newline at end of file




More information about the cvs mailing list