Skip to content
This repository was archived by the owner on May 9, 2019. It is now read-only.

Commit 6d77eaf

Browse files
committed
更人性化的路由名称
1 parent 7888022 commit 6d77eaf

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

Plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @package AppStore
66
* @author chekun
7-
* @version 1.0.0
7+
* @version 1.0.2
88
* @link http://typecho.dilicms.com
99
*/
1010
class AppStore_Plugin implements Typecho_Plugin_Interface
@@ -88,4 +88,4 @@ public static function config(Typecho_Widget_Helper_Form $form)
8888
*/
8989
public static function personalConfig(Typecho_Widget_Helper_Form $form){}
9090

91-
}
91+
}

market.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php !defined('__TYPECHO_ROOT_DIR__') and exit();
2+
23
$options = Helper::options();
34
$siteUrl = $options->siteUrl;
45
$isRewrite = $options->rewrite;
56
$absUrl = ($isRewrite ? rtrim($siteUrl, '/') : $siteUrl."index.php");
6-
Typecho_Response::getInstance()->redirect($absUrl.__TYPECHO_ADMIN_DIR__.'app-store/market');
7+
8+
Typecho_Response::getInstance()->redirect($absUrl.__TYPECHO_ADMIN_DIR__.'app-store/market');

views/js.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function init()
3434
}
3535

3636
$.ajax({
37-
url: '<?php echo $options->adminUrl('app-store/install'); ?>',
37+
url: '<?php echo str_replace('/market', '/install', Typecho_Request::getInstance()->getRequestUrl()); ?>',
3838
dataType: 'json',
3939
data: {
4040
version: $version.val(),
@@ -64,4 +64,4 @@ function init()
6464

6565
init();
6666
})();
67-
</script>
67+
</script>

0 commit comments

Comments
 (0)