All Items » NewStatPress » Bug #258
Bug Report
New Spy pages lead to wrong links
ID: 258Status: ResolvedVersion: 0.4.6Report Date: 25 October 2012Product: NewStatPress Resolution Date: 11 February 2012Resolution Version: 0.4.7
ReporterKondou
Assignee
Description

The page links the New Spy page to other pages New Spy pages don’t lead to the proper target.

They are of the structure:
“www.example.com/full/path/from/root-dir/wp-admin/admin.php?page=newstatpress/newstatpress.php&newstatpress_action=newspy&pp=2”
This obviously doesn’t work, except your wordpress installation is at root directory.
Obviously it should be:
“www.example.com/wp-admin/admin.php?page=newstatpress/newstatpress.php&newstatpress_action=newspy&pp=2″.

Quickly looked over it. Changing line 861 of newstatpress.php (version 0.4.6) from
echo ‘<a href=”‘ . $_SERVER[‘SCRIPT_NAME’] . ‘?page=newstatpress/newstatpress.php&newstatpress_action=’.$action.’&pp=’ . $i .'”>’ . $i . ‘</a> ‘;
to
echo ‘<a href=”?page=newstatpress/newstatpress.php&newstatpress_action=’.$action.’&pp=’ . $i .'”>’ . $i . ‘</a> ‘;
fixes it for _me_. Not sure if it breaks something else. Should be fine though, because we only need a relative path, not the full.

Don’t know what’s with the other $_SERVER[‘SCRIPT_NAME’] occurences. Looks like they will lead to the same behaviour. But with my bare PHP knowledge I’m not really sure.

One Response to New Spy pages lead to wrong links

  1. newstatpress ha detto:

    Thanks for the report and solution.

    I will add in in next version (maybe released in this weekend)

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.