Skip to content

Commit

Permalink
add rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
skywalker512 committed Jun 30, 2018
1 parent 7b7be06 commit b7ffa35
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion addons/languages/Chinese/definitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@
$definitions["Upgrade esoTalk"] = "更新esoTalk";
$definitions["Use a background image"] = "使用背景图像";
$definitions["Use for mobile"] = "使用移动设备";
$definitions["Use friendly URLs"] = "开启 URL 重写";
$definitions["Use friendly URLs"] = "使用友好的 URL";
$definitions["Use rewrite URLs"] = "开启伪静态功能";
$definitions["Used to verify your account and subscribe to conversations"] = "用于验证你的帐户和订阅话题";
$definitions["Username"] = "用户名";
$definitions["Username or Email"] = "用户名 或 Email";
Expand Down
3 changes: 2 additions & 1 deletion core/controllers/ETInstallController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public function action_info()

// Work out if we can handle friendly URLs.
if (!empty($_SERVER["REQUEST_URI"])) $form->setValue("friendlyURLs", true);
$form->setValue("rewriteURLs", false);

// If the form was submitted...
if ($form->isPostBack("submit")) {
Expand Down Expand Up @@ -191,7 +192,7 @@ public function action_install()
"esoTalk.emailFrom" => "do_not_reply@{$_SERVER["HTTP_HOST"]}",
"esoTalk.cookie.name" => preg_replace(array("/\s+/", "/[^\w]/"), array("_", ""), $info["forumTitle"]),
"esoTalk.urls.friendly" => !empty($info["friendlyURLs"]),
"esoTalk.urls.rewrite" => !empty($info["friendlyURLs"]) and function_exists("apache_get_modules") and in_array("mod_rewrite", apache_get_modules())
"esoTalk.urls.rewrite" => !empty($info["rewriteURLs"])
);

// Merge these new config settings into our current conifg variable.
Expand Down
1 change: 1 addition & 0 deletions core/views/install/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<li><?php echo $form->input("forumTitle", "text", array("placeholder" => T("Forum title"))); ?></li>
<li class='advanced'><?php echo $form->input("baseURL", "text", array("placeholder" => T("Base URL"))); ?></li>
<li class='advanced'><label><?php echo $form->checkbox("friendlyURLs"); ?> <?php echo T("Use friendly URLs"); ?></label></li>
<li class='advanced'><label><?php echo $form->checkbox("rewriteURLs"); ?> <?php echo T("Use rewrite URLs"); ?></label></li>
</ul>

<br>
Expand Down

0 comments on commit b7ffa35

Please sign in to comment.