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

Commit

Permalink
更人性化的路由名称
Browse files Browse the repository at this point in the history
  • Loading branch information
chekun committed May 10, 2014
1 parent 7888022 commit 6d77eaf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @package AppStore
* @author chekun
* @version 1.0.0
* @version 1.0.2
* @link http://typecho.dilicms.com
*/
class AppStore_Plugin implements Typecho_Plugin_Interface
Expand Down Expand Up @@ -88,4 +88,4 @@ public static function config(Typecho_Widget_Helper_Form $form)
*/
public static function personalConfig(Typecho_Widget_Helper_Form $form){}

}
}
4 changes: 3 additions & 1 deletion market.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php !defined('__TYPECHO_ROOT_DIR__') and exit();

$options = Helper::options();
$siteUrl = $options->siteUrl;
$isRewrite = $options->rewrite;
$absUrl = ($isRewrite ? rtrim($siteUrl, '/') : $siteUrl."index.php");
Typecho_Response::getInstance()->redirect($absUrl.__TYPECHO_ADMIN_DIR__.'app-store/market');

Typecho_Response::getInstance()->redirect($absUrl.__TYPECHO_ADMIN_DIR__.'app-store/market');
4 changes: 2 additions & 2 deletions views/js.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function init()
}

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

init();
})();
</script>
</script>

0 comments on commit 6d77eaf

Please sign in to comment.