[wp-cvs] wordpress/wp-includes template-functions-links.php, 1.31,
1.32
Matthew Mullenweg
saxmatt at users.sourceforge.net
Sun Sep 5 02:41:04 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12042/wp-includes
Modified Files:
template-functions-links.php
Log Message:
Set GUID on upgrade. CURRENTLY NOT WORKING. For some reason the get_settings calls aren't working.
Index: template-functions-links.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-links.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** template-functions-links.php 24 Aug 2004 01:35:57 -0000 1.31
--- template-functions-links.php 5 Sep 2004 02:41:01 -0000 1.32
***************
*** 27,89 ****
}
! function get_permalink($id=false) {
! global $post, $wpdb;
! global $querystring_start, $querystring_equal;
!
! $rewritecode = array(
! '%year%',
! '%monthnum%',
! '%day%',
! '%hour%',
! '%minute%',
! '%second%',
! '%postname%',
! '%post_id%',
! '%category%',
! '%author%',
! '%pagename%'
! );
! if ($id) {
! $idpost = $wpdb->get_row("SELECT ID, post_date, post_name, post_status, post_author FROM $wpdb->posts WHERE ID = $id");
! } else {
! $idpost = $post;
! }
! $permalink = get_settings('permalink_structure');
! if ('' != $permalink) {
! if ($idpost->post_status == 'static') {
! $permalink = page_permastruct();
! }
! $unixtime = strtotime($idpost->post_date);
! $cats = get_the_category($idpost->ID);
! $category = $cats[0]->category_nicename;
! $authordata = get_userdata($idpost->post_author);
! $author = $authordata->user_nicename;
! $rewritereplace = array(
! date('Y', $unixtime),
! date('m', $unixtime),
! date('d', $unixtime),
! date('H', $unixtime),
! date('i', $unixtime),
! date('s', $unixtime),
! $idpost->post_name,
! $idpost->ID,
! $category,
! $author,
! $idpost->post_name,
! );
! return get_settings('home') . str_replace($rewritecode, $rewritereplace, $permalink);
! } else { // if they're not using the fancy permalink option
! $permalink = get_settings('home') . '/' . get_settings('blogfilename').$querystring_start.'p'.$querystring_equal.$idpost->ID;
! if ($idpost->post_status == 'static') {
! $permalink .= $querystring_separator . "static=1";
! }
! return $permalink;
! }
}
--- 27,86 ----
}
! function get_permalink($id = false) {
! global $post, $wpdb;
! $rewritecode = array(
! '%year%',
! '%monthnum%',
! '%day%',
! '%hour%',
! '%minute%',
! '%second%',
! '%postname%',
! '%post_id%',
! '%category%',
! '%author%',
! '%pagename%'
! );
! if ($id) {
! $idpost = $wpdb->get_row("SELECT ID, post_date, post_name, post_status, post_author FROM $wpdb->posts WHERE ID = $id");
! } else {
! $idpost = $post;
! }
! $permalink = get_settings('permalink_structure');
! if ('' != $permalink) {
! if ($idpost->post_status == 'static')
! $permalink = page_permastruct();
! $unixtime = strtotime($idpost->post_date);
! $cats = get_the_category($idpost->ID);
! $category = $cats[0]->category_nicename;
! $authordata = get_userdata($idpost->post_author);
! $author = $authordata->user_nicename;
! $rewritereplace =
! array(
! date('Y', $unixtime),
! date('m', $unixtime),
! date('d', $unixtime),
! date('H', $unixtime),
! date('i', $unixtime),
! date('s', $unixtime),
! $idpost->post_name,
! $idpost->ID,
! $category,
! $author,
! $idpost->post_name,
! );
! return get_settings('home') . str_replace($rewritecode, $rewritereplace, $permalink);
! } else { // if they're not using the fancy permalink option
! $permalink = get_settings('home') . '/' . get_settings('blogfilename') . '?p=' . $idpost->ID;
! if ($idpost->post_status == 'static')
! $permalink .= '&static=1';
! return $permalink;
! }
}
More information about the cvs
mailing list