Update of /cvsroot/plog/plog/class/net
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8206/class/net
Modified Files:
Tag: PLOG_0_3_2_DEVEL
modrewriterequestgenerator.class.php
prettyrequestgenerator.class.php rawrequestgenerator.class.php
Log Message:
lss's patches to make the resource center and resources in general to work better with resources with chinese, japanese or whatever other "strange" characters in the file name.
Index: rawrequestgenerator.class.php
===================================================================
RCS file: /cvsroot/plog/plog/class/net/rawrequestgenerator.class.php,v
retrieving revision 1.9.4.2
retrieving revision 1.9.4.3
diff -C2 -d -r1.9.4.2 -r1.9.4.3
*** rawrequestgenerator.class.php 7 May 2004 19:07:32 -0000 1.9.4.2
--- rawrequestgenerator.class.php 18 Jun 2004 16:57:09 -0000 1.9.4.3
***************
*** 428,432 ****
$this->addParameter( "op", "ViewResource" );
$this->addParameter( "blogId", $this->_blogInfo->getId());
! $this->addParameter( "resource", $resource->getFileName());
$resourceLink = $this->getIndexUrl().$this->getRequest();
--- 428,432 ----
$this->addParameter( "op", "ViewResource" );
$this->addParameter( "blogId", $this->_blogInfo->getId());
! $this->addParameter( "resource", rawurlencode($resource->getFileName()));
$resourceLink = $this->getIndexUrl().$this->getRequest();
***************
*** 443,447 ****
{
$this->addParameter( "blogId", $this->_blogInfo->getId());
! $this->addParameter( "resource", $resource->getFileName());
$this->addParameter( "mode", "preview" );
--- 443,447 ----
{
$this->addParameter( "blogId", $this->_blogInfo->getId());
! $this->addParameter( "resource", rawurlencode($resource->getFileName()));
$this->addParameter( "mode", "preview" );
***************
*** 459,463 ****
{
$this->addParameter( "blogId", $this->_blogInfo->getId());
! $this->addParameter( "resource", $resource->getFileName());
$resourceLink = $this->getResourceServerUrl().$this->getRequest();
--- 459,463 ----
{
$this->addParameter( "blogId", $this->_blogInfo->getId());
! $this->addParameter( "resource", rawurlencode($resource->getFileName()));
$resourceLink = $this->getResourceServerUrl().$this->getRequest();
Index: prettyrequestgenerator.class.php
===================================================================
RCS file: /cvsroot/plog/plog/class/net/prettyrequestgenerator.class.php,v
retrieving revision 1.10.4.2
retrieving revision 1.10.4.3
diff -C2 -d -r1.10.4.2 -r1.10.4.3
*** prettyrequestgenerator.class.php 18 May 2004 19:27:15 -0000 1.10.4.2
--- prettyrequestgenerator.class.php 18 Jun 2004 16:57:09 -0000 1.10.4.3
***************
*** 351,355 ****
function resourcePreviewLink( $resource )
{
! return $resourceLink = $this->getBaseUrl()."/resserver.php?blogId=".$this->_blogInfo->getId()."&resource=".$resource->getFileName()."&mode=preview";
}
--- 351,355 ----
function resourcePreviewLink( $resource )
{
! return $resourceLink = $this->getBaseUrl()."/resserver.php?blogId=".$this->_blogInfo->getId()."&resource=".rawurlencode($resource->getFileName())."&mode=preview";
}
***************
*** 361,365 ****
function resourceDownloadLink( $resource )
{
! return $resourceLink = $this->getBaseUrl()."/get/".$this->_blogInfo->getId()."/".$resource->getFileName();
}
--- 361,365 ----
function resourceDownloadLink( $resource )
{
! return $resourceLink = $this->getBaseUrl()."/get/".$this->_blogInfo->getId()."/".rawurlencode($resource->getFileName());
}
Index: modrewriterequestgenerator.class.php
===================================================================
RCS file: /cvsroot/plog/plog/class/net/Attic/modrewriterequestgenerator.class.php,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** modrewriterequestgenerator.class.php 3 Jun 2004 19:03:40 -0000 1.1.2.3
--- modrewriterequestgenerator.class.php 18 Jun 2004 16:57:08 -0000 1.1.2.4
***************
*** 385,389 ****
function resourceLink( $resource )
{
! $resourceLink = $this->getBaseUrl().'/'.$this->_blogInfo->getId().'_'.StringUtils::text2url( $this->_blogInfo->getBlog() ).'/resources/'.$resource->getFileName().'.html';
return $resourceLink;
--- 385,389 ----
function resourceLink( $resource )
{
! $resourceLink = $this->getBaseUrl().'/'.$this->_blogInfo->getId().'_'.StringUtils::text2url( $this->_blogInfo->getBlog() ).'/resources/'.rawurlencode($resource->getFileName()).'.html';
return $resourceLink;
***************
*** 398,402 ****
{
$this->addParameter( "blogId", $this->_blogInfo->getId());
! $this->addParameter( "resource", $resource->getFileName());
$this->addParameter( "mode", "preview" );
--- 398,402 ----
{
$this->addParameter( "blogId", $this->_blogInfo->getId());
! $this->addParameter( "resource", rawurlencode($resource->getFileName()));
$this->addParameter( "mode", "preview" );
***************
*** 413,417 ****
function resourceDownloadLink( $resource )
{
! $resourceLink = $this->getBaseUrl().'/'.$this->_blogInfo->getId().'_'.StringUtils::text2url( $this->_blogInfo->getBlog() ).'/get/'.$resource->getFileName();
return $resourceLink;
--- 413,417 ----
function resourceDownloadLink( $resource )
{
! $resourceLink = $this->getBaseUrl().'/'.$this->_blogInfo->getId().'_'.StringUtils::text2url( $this->_blogInfo->getBlog() ).'/get/'.rawurlencode($resource->getFileName());
return $resourceLink;
|