diff --git a/fp-plugins/prettyurls/lang/lang.en-us.php b/fp-plugins/prettyurls/lang/lang.en-us.php
index de017af..4fab0d0 100644
--- a/fp-plugins/prettyurls/lang/lang.en-us.php
+++ b/fp-plugins/prettyurls/lang/lang.en-us.php
@@ -13,8 +13,8 @@
'submit' => 'Save'
);
$lang['admin']['plugin']['prettyurls']['msgs'] = array(
- 1 => 'API key saved',
- -1 => 'API key is not valid'
+ 1 => '.htaccess saved successfully',
+ -1 => '.htaccess could not be saved (do you have writing permissions on '. BLOG_ROOT .'
)?'
);
?>
\ No newline at end of file
diff --git a/fp-plugins/prettyurls/plugin.prettyurls.php b/fp-plugins/prettyurls/plugin.prettyurls.php
index f87e256..0ec22a7 100644
--- a/fp-plugins/prettyurls/plugin.prettyurls.php
+++ b/fp-plugins/prettyurls/plugin.prettyurls.php
@@ -226,7 +226,11 @@ class Plugin_PrettyURLs {
if (strpos($_SERVER['REQUEST_URI'], BLOG_ROOT)!==false) {
- $url = substr($_SERVER['REQUEST_URI'], strlen(BLOG_ROOT)-1);
+ $url = $_SERVER['REQUEST_URI'];
+ $del = BLOG_ROOT;
+ if (strpos($url, 'index.php')!==false)
+ $del = $del . 'index.php/';
+ $url = substr($url, strlen($del)-1);
}
if ($url=='/')
@@ -268,7 +272,6 @@ class Plugin_PrettyURLs {
if ($this->status == 2)
return;
-
if ($this->date_handled){
$url = preg_replace_callback('|^/([^/]+)|', array(&$this, 'handle_entry'), $url);
// if status = 2
@@ -502,9 +505,7 @@ STR;
function onsubmit() {
global $fp_config;
- if ($_POST['wp-apikey']){
-
-
+ if (!empty($_POST['htaccess']) && io_write_file(ABS_PATH.'.htaccess', $_POST['htaccess'])){
$this->smarty->assign('success', 1);
} else {
$this->smarty->assign('success', -1);
diff --git a/fp-plugins/prettyurls/tpls/admin.plugin.prettyurls.tpl b/fp-plugins/prettyurls/tpls/admin.plugin.prettyurls.tpl
index fa71788..dd75992 100644
--- a/fp-plugins/prettyurls/tpls/admin.plugin.prettyurls.tpl
+++ b/fp-plugins/prettyurls/tpls/admin.plugin.prettyurls.tpl
@@ -4,9 +4,7 @@
{include file=shared:errorlist.tpl}
-