[pLog-svn] r1313 - plog/trunk/class/net
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Fri Mar 4 17:19:00 GMT 2005
Author: oscar
Date: 2005-03-04 17:19:00 +0000 (Fri, 04 Mar 2005)
New Revision: 1313
Modified:
plog/trunk/class/net/customurlhandler.class.php
Log:
fixed issue 299 (http://bugs.plogworld.net/view.php?id=299) -- thanks reto! :)
Modified: plog/trunk/class/net/customurlhandler.class.php
===================================================================
--- plog/trunk/class/net/customurlhandler.class.php 2005-03-04 16:44:57 UTC (rev 1312)
+++ plog/trunk/class/net/customurlhandler.class.php 2005-03-04 17:19:00 UTC (rev 1313)
@@ -17,6 +17,7 @@
var $_vars;
var $_includeFile;
var $_format;
+ var $_indexName;
function CustomUrlHandler()
{
@@ -24,6 +25,7 @@
// intialize the array we're going to use
$config =& Config::getConfig();
+ $this->_indexName = $config->getValue("script_name");
$this->_formats = Array( "permalink_format" => $config->getValue( "permalink_format" ),
"category_link_format" => $config->getValue( "category_link_format" ),
"blog_link_format" => $config->getValue( "blog_link_format" ),
@@ -46,7 +48,7 @@
$this->_params = $m->getParameters();
// ...and then based on this, fill in the parameters in the request
if( $this->_format == "permalink_format" ) {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
$this->_params["date"] = $this->_params["year"].$this->_params["month"].$this->_params["day"].$this->_params["hours"].$this->_params["minutes"];
$this->_params["op"] = "ViewArticle";
$this->_vars = Array( "postid" => "articleId",
@@ -60,13 +62,13 @@
"date" => "Date" );
}
elseif( $this->_format == "blog_link_format" ) {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
$this->_params["op"] = "Default";
$this->_vars = Array( "blogid" => "blogId",
"blogname" => "blogName" );
}
elseif( $this->_format == "category_link_format" ) {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
$this->_params["op"] = "Default";
$this->_vars = Array( "blogid" => "blogId",
"blogname" => "blogName",
@@ -74,7 +76,7 @@
"catname" => "postCategoryName" );
}
elseif( $this->_format == "archive_link_format" ) {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
$this->_params["date"] = $this->_params["year"].$this->_params["month"].$this->_params["day"].$this->_params["hours"].$this->_params["minutes"];
$this->_params["op"] = "Default";
$this->_vars = Array( "blogid" => "blogId",
@@ -82,7 +84,7 @@
"date" => "Date" );
}
elseif( $this->_format == "user_posts_link_format" ) {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
$this->_params["date"] = $this->_params["year"].$this->_params["month"].$this->_params["day"].$this->_params["hours"].$this->_params["minutes"];
$this->_params["op"] = "Default";
$this->_vars = Array( "blogid" => "blogId",
@@ -94,7 +96,7 @@
"username" => "userName" );
}
elseif( $this->_format == "post_trackbacks_link_format" ) {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
$this->_params["op"] = "Trackbacks";
$this->_params["date"] = $this->_params["year"].$this->_params["month"].$this->_params["day"].$this->_params["hours"].$this->_params["minutes"];
$this->_vars = Array( "blogid" => "blogId",
@@ -108,14 +110,14 @@
"date" => "Date" );
}
elseif( $this->_format == "template_link_format" ) {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
$this->_params["op"] = "Template";
$this->_vars = Array( "templatename" => "show",
"blogid" => "blogId",
"blogname" => "blogName" );
}
elseif( $this->_format == "album_link_format" ) {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
$this->_params["op"] = "ViewAlbum";
$this->_vars = Array( "blogid" => "blogId",
"blogname" => "blogName",
@@ -123,7 +125,7 @@
"albumname" => "albumName" );
}
elseif( $this->_format == "resource_link_format" ) {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
$this->_params["op"] = "ViewResource";
$this->_vars = Array( "blogid" => "blogId",
"blogname" => "blogName",
@@ -164,7 +166,7 @@
"mode" => "mode");
}
else {
- $this->_includeFile = "index.php";
+ $this->_includeFile = $this->_indexName;
}
}
More information about the pLog-svn
mailing list