mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00:00
ENHANCEMENT: replaced deprecated Director::urlParams()
BUGFIX: tag working with nested urls
This commit is contained in:
parent
606d526627
commit
5a5cdf1aaf
@ -199,8 +199,8 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
|||||||
|
|
||||||
|
|
||||||
$id = 0;
|
$id = 0;
|
||||||
if(Director::urlParam('ID')) {
|
if($this->request->latestParam('ID')) {
|
||||||
$id = (int) Director::urlParam('ID');
|
$id = (int) $this->request->latestParam('ID');
|
||||||
}
|
}
|
||||||
|
|
||||||
$codeparser = new BBCodeParser();
|
$codeparser = new BBCodeParser();
|
||||||
|
@ -152,6 +152,7 @@ class BlogTree extends Page {
|
|||||||
* @return DataObjectSet
|
* @return DataObjectSet
|
||||||
*/
|
*/
|
||||||
public function Entries($limit = '', $tag = '', $date = '', $retrieveCallback = null, $filter = '') {
|
public function Entries($limit = '', $tag = '', $date = '', $retrieveCallback = null, $filter = '') {
|
||||||
|
|
||||||
$tagCheck = '';
|
$tagCheck = '';
|
||||||
$dateCheck = '';
|
$dateCheck = '';
|
||||||
|
|
||||||
@ -290,7 +291,7 @@ class BlogTree_Controller extends Page_Controller {
|
|||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
function SelectedTag() {
|
function SelectedTag() {
|
||||||
return (Director::urlParam('Action') == 'tag') ? Director::urlParam('ID') : '';
|
return ($this->request->latestParam('Action') == 'tag') ? $this->request->latestParam('ID') : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -299,9 +300,9 @@ class BlogTree_Controller extends Page_Controller {
|
|||||||
* @return Date
|
* @return Date
|
||||||
*/
|
*/
|
||||||
function SelectedDate() {
|
function SelectedDate() {
|
||||||
if(Director::urlParam('Action') == 'date') {
|
if($this->request->latestParam('Action') == 'date') {
|
||||||
$year = Director::urlParam('ID');
|
$year = $this->request->latestParam('ID');
|
||||||
$month = Director::urlParam('OtherID');
|
$month = $this->request->latestParam('OtherID');
|
||||||
|
|
||||||
if(is_numeric($year) && is_numeric($month) && $month < 13) {
|
if(is_numeric($year) && is_numeric($month) && $month < 13) {
|
||||||
$date = new Date();
|
$date = new Date();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user