Skip to content

Commit

Permalink
日本語URL対応とインストール画面の日本語化
Browse files Browse the repository at this point in the history
  • Loading branch information
tao-s authored and katzueno committed Sep 1, 2011
1 parent 9f98199 commit 41bd7a1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/concrete/libraries/request.php
Expand Up @@ -284,7 +284,7 @@ public function getRequestCollectionPath() {
// I think the regexps take care of the trimming for us but just to be sure..
$cPath = trim($this->cPath, '/');
if ($cPath != '') {
return '/' . $cPath;
return '/' . rawurldecode($cPath);
}
return '';
}
Expand Down
16 changes: 14 additions & 2 deletions web/concrete/models/page.php
Expand Up @@ -658,7 +658,7 @@ function getAllowedSubCollections() {
* @return string
*/
function getCollectionPath() {
return $this->cPath;
return $this->getEncodePath($this->cPath);
}

/**
Expand All @@ -678,7 +678,19 @@ public static function getCollectionPathFromID($cID) {
$path .= '/';

Cache::set('page_path', $cID, $path);
return $path;
return $this->getEncodePath($path);
}

function getEncodePath($path){
if(mb_strpos($path,"/") !== false){
$path = explode("/",$path);
$path = array_map("rawurlencode",$path);
return implode("/",$path);
}else if(is_null($path)){
return NULL;
}else{
return urlencode($path);
}
}

/**
Expand Down
5 changes: 5 additions & 0 deletions web/concrete/startup/config_check_complete.php
Expand Up @@ -2,6 +2,11 @@
defined('C5_EXECUTE') or die("Access Denied.");
if ($config_check_failed) {
define('ENABLE_LEGACY_CONTROLLER_URLS', true);
define("LOCALE","ja_JP.UTF8");
## Localization ##
require(dirname(__FILE__) . '/../config/localization.php');


// nothing is installed
$v = View::getInstance();
$v->render('/install/');
Expand Down

0 comments on commit 41bd7a1

Please sign in to comment.