[wp-cvs] wordpress/wp-includes classes.php, 1.21,
1.22 template-functions-links.php, 1.35, 1.36
Ryan Boren
rboren at users.sourceforge.net
Fri Oct 8 08:06:23 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26426/wp-includes
Modified Files:
classes.php template-functions-links.php
Log Message:
Use page_id=xx instead of p=xx&static=1
Index: template-functions-links.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-links.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** template-functions-links.php 6 Oct 2004 02:18:37 -0000 1.35
--- template-functions-links.php 8 Oct 2004 08:06:21 -0000 1.36
***************
*** 97,101 ****
$link = get_settings('home') . "/$link/";
} else {
! $link = get_settings('home') . "/index.php?p=$id&static=1";
}
--- 97,101 ----
$link = get_settings('home') . "/$link/";
} else {
! $link = get_settings('home') . "/index.php?page_id=$id";
}
Index: classes.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/classes.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** classes.php 2 Oct 2004 19:24:40 -0000 1.21
--- classes.php 8 Oct 2004 08:06:21 -0000 1.22
***************
*** 66,69 ****
--- 66,74 ----
}
+ if ('' != $qv['static'] || '' != $qv['pagename'] || '' != $qv['page_id']) {
+ $this->is_page = true;
+ $this->is_single = false;
+ }
+
if ('' != $qv['second']) {
$this->is_time = true;
***************
*** 144,149 ****
}
! // single, date, and search override category.
! if ($this->is_single || $this->is_date || $this->is_search) {
$this->is_category = false;
}
--- 149,154 ----
}
! // single, page, date, and search override category.
! if ($this->is_single || $this->is_page || $this->is_date || $this->is_search) {
$this->is_category = false;
}
***************
*** 163,171 ****
}
- if ('' != $qv['static'] || '' != $qv['pagename']) {
- $this->is_page = true;
- $this->is_single = false;
- }
-
if ('404' == $qv['error']) {
$this->is_404 = true;
--- 168,171 ----
***************
*** 268,275 ****
$where .= " AND post_name = '" . $q['name'] . "'";
} else if ('' != $q['pagename']) {
- // If pagename is set, set static to true and set name to pagename.
$q['pagename'] = sanitize_title($q['pagename']);
$q['name'] = $q['pagename'];
- $q['static'] = true;
$where .= " AND post_name = '" . $q['pagename'] . "'";
}
--- 268,273 ----
***************
*** 287,290 ****
--- 285,294 ----
}
+ if (($q['page_id'] != '') && ($q['page_id'] != 'all')) {
+ $q['page_id'] = intval($q['page_id']);
+ $q['p'] = $q['page_id'];
+ $where = ' AND ID = '.$q['page_id'];
+ }
+
// If a search pattern is specified, load the posts that match
if (!empty($q['s'])) {
***************
*** 456,460 ****
}
! if ('' != $q['static']) {
$where .= ' AND (post_status = "static"';
} else {
--- 460,464 ----
}
! if (is_page()) {
$where .= ' AND (post_status = "static"';
} else {
More information about the cvs
mailing list