[wp-cvs] wordpress/wp-includes functions-post.php, 1.5,
1.6 functions.php, 1.152, 1.153 links-update-xml.php, 1.6,
1.7 template-functions-general.php, 1.43, 1.44
Matthew Mullenweg
saxmatt at users.sourceforge.net
Sun Sep 5 00:24:30 UTC 2004
- Previous message: [wp-cvs]
wordpress wp-atom.php, 1.12, 1.13 wp-blog-header.php, 1.83,
1.84 wp-commentsrss2.php, 1.18, 1.19 wp-locations.php, 1.5,
1.6 wp-mail.php, 1.18, 1.19 wp-rdf.php, 1.19, 1.20 wp-rss.php,
1.19, 1.20 wp-trackback.php, 1.16, 1.17 xmlrpc.php, 1.73, 1.74
- Next message: [wp-cvs] wordpress/wp-admin admin-header.php, 1.29,
1.30 edit-form-advanced.php, 1.31, 1.32 edit-form-comment.php,
1.13, 1.14 edit-form.php, 1.28, 1.29 edit-page-form.php, 1.1,
1.2 link-categories.php, 1.15, 1.16 link-import.php, 1.15,
1.16 link-manager.php, 1.37, 1.38 menu.php, 1.24,
1.25 options-discussion.php, 1.19, 1.20 options-general.php,
1.26, 1.27 options-misc.php, 1.12, 1.13 options-permalink.php,
1.40, 1.41 options-reading.php, 1.16, 1.17 options-writing.php,
1.21, 1.22 options.php, 1.30, 1.31 post.php, 1.77,
1.78 profile.php, 1.29, 1.30 upgrade-functions.php, 1.73,
1.74 optionhandler.php, 1.11, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22472/wp-includes
Modified Files:
functions-post.php functions.php links-update-xml.php
template-functions-general.php
Log Message:
Massive options cleanup and another step of cleaning up the upgrade/install.
Index: functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.152
retrieving revision 1.153
diff -C2 -d -r1.152 -r1.153
*** functions.php 4 Sep 2004 22:15:46 -0000 1.152
--- functions.php 5 Sep 2004 00:24:28 -0000 1.153
***************
*** 314,317 ****
--- 314,325 ----
}
+ function get_option($option) {
+ return get_settings($option);
+ }
+
+ function form_option($option) {
+ echo htmlspecialchars( get_option($option) );
+ }
+
function get_alloptions() {
global $wpdb;
***************
*** 352,357 ****
// thx Alex Stapleton, http://alex.vort-x.net/blog/
! function add_option($name, $value = '') {
! // Adds an option if it doesn't already exist
global $wpdb;
if ( is_array($value) || is_object($value) )
--- 360,364 ----
// thx Alex Stapleton, http://alex.vort-x.net/blog/
! function add_option($name, $value = '', $description = '') {
global $wpdb;
if ( is_array($value) || is_object($value) )
***************
*** 361,365 ****
$name = $wpdb->escape($name);
$value = $wpdb->escape($value);
! $wpdb->query("INSERT INTO $wpdb->options (option_name, option_value) VALUES ('$name', '$value')");
if($wpdb->insert_id) {
--- 368,373 ----
$name = $wpdb->escape($name);
$value = $wpdb->escape($value);
! $description = $wpdb->escape($description);
! $wpdb->query("INSERT INTO $wpdb->options (option_name, option_value, option_description) VALUES ('$name', '$value', '$description')");
if($wpdb->insert_id) {
Index: links-update-xml.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/links-update-xml.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** links-update-xml.php 24 May 2004 08:22:18 -0000 1.6
--- links-update-xml.php 5 Sep 2004 00:24:28 -0000 1.7
***************
*** 59,63 ****
// is it old?
$modtime = filemtime($file);
! if ((time() - $modtime) > (get_settings('weblogs_cacheminutes') * 60)) {
$update = true;
}
--- 59,63 ----
// is it old?
$modtime = filemtime($file);
! if ((time() - $modtime) > (1.5 * 60)) {
$update = true;
}
Index: functions-post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions-post.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** functions-post.php 4 Sep 2004 06:44:58 -0000 1.5
--- functions-post.php 5 Sep 2004 00:24:28 -0000 1.6
***************
*** 218,268 ****
// get permalink from post ID
! function post_permalink($post_ID=0, $mode = 'id') {
! global $wpdb;
! global $querystring_start, $querystring_equal, $querystring_separator;
!
! $blog_URL = get_settings('home') .'/'. get_settings('blogfilename');
!
! $postdata = get_postdata($post_ID);
!
! // this will probably change to $blog_ID = $postdata['Blog_ID'] one day.
! $blog_ID = 1;
!
! if (!($postdata===false)) {
!
! switch(strtolower($mode)) {
! case 'title':
! $title = preg_replace('/[^a-zA-Z0-9_\.-]/', '_', $postdata['Title']);
! break;
! case 'id':
! default:
! $title = "post-$post_ID";
! break;
! }
!
! // this code is blatantly derived from permalink_link()
! $archive_mode = get_settings('archive_mode');
! switch($archive_mode) {
! case 'daily':
! $post_URL = $blog_URL.$querystring_start.'m'.$querystring_equal.substr($postdata['Date'],0,4).substr($postdata['Date'],5,2).substr($postdata['Date'],8,2).'#'.$title;
! break;
! case 'monthly':
! $post_URL = $blog_URL.$querystring_start.'m'.$querystring_equal.substr($postdata['Date'],0,4).substr($postdata['Date'],5,2).'#'.$title;
! break;
! case 'weekly':
! if((!isset($cacheweekly)) || (empty($cacheweekly[$postdata['Date']]))) {
! $sql = "SELECT WEEK('".$postdata['Date']."') as wk";
! $row = $wpdb->get_row($sql);
! $cacheweekly[$postdata['Date']] = $row->wk;
! }
! $post_URL = $blog_URL.$querystring_start.'m'.$querystring_equal.substr($postdata['Date'],0,4).$querystring_separator.'w'.$querystring_equal.$cacheweekly[$postdata['Date']].'#'.$title;
! break;
! case 'postbypost':
! $post_URL = $blog_URL.$querystring_start.'p'.$querystring_equal.$post_ID;
! break;
! }
! }
!
! return $post_URL;
}
--- 218,223 ----
// get permalink from post ID
! function post_permalink($post_id = 0, $mode = '') { // $mode legacy
! return get_permalink($post_id);
}
Index: template-functions-general.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-general.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** template-functions-general.php 3 Aug 2004 21:59:29 -0000 1.43
--- template-functions-general.php 5 Sep 2004 00:24:28 -0000 1.44
***************
*** 223,227 ****
if ('' == $type) {
! $type = get_settings('archive_mode');
}
--- 223,227 ----
if ('' == $type) {
! $type = 'monthly';
}
- Previous message: [wp-cvs]
wordpress wp-atom.php, 1.12, 1.13 wp-blog-header.php, 1.83,
1.84 wp-commentsrss2.php, 1.18, 1.19 wp-locations.php, 1.5,
1.6 wp-mail.php, 1.18, 1.19 wp-rdf.php, 1.19, 1.20 wp-rss.php,
1.19, 1.20 wp-trackback.php, 1.16, 1.17 xmlrpc.php, 1.73, 1.74
- Next message: [wp-cvs] wordpress/wp-admin admin-header.php, 1.29,
1.30 edit-form-advanced.php, 1.31, 1.32 edit-form-comment.php,
1.13, 1.14 edit-form.php, 1.28, 1.29 edit-page-form.php, 1.1,
1.2 link-categories.php, 1.15, 1.16 link-import.php, 1.15,
1.16 link-manager.php, 1.37, 1.38 menu.php, 1.24,
1.25 options-discussion.php, 1.19, 1.20 options-general.php,
1.26, 1.27 options-misc.php, 1.12, 1.13 options-permalink.php,
1.40, 1.41 options-reading.php, 1.16, 1.17 options-writing.php,
1.21, 1.22 options.php, 1.30, 1.31 post.php, 1.77,
1.78 profile.php, 1.29, 1.30 upgrade-functions.php, 1.73,
1.74 optionhandler.php, 1.11, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list