#31 v.php doesnt show the article

open
nobody
None
5
2012-09-27
2012-09-27
No

Hello,

when v.php is used in any case no article is shown to the user because the parameter $a is alwasy empty. The problem is here the used function mifi which uses mysql_real_escape_string. mysql_real_escape_string needs a connection to the database or uses the last one, but this is done until line 9. The result is an empty from database because no articleid/FileId is set.
The fix is very easy:
v.php original line 7:
$a=mifi($_REQUEST['a']);
$aid = $_SESSION['user_id'];
include "./classes/mysql.class.php";
$mysqldb = new mysql();
$mysqldb->connect();
$mysqldb->select();
change to:
include "./classes/mysql.class.php";
$mysqldb = new mysql();
$mysqldb->connect();
$mysqldb->select();

$a = mifi($_REQUEST['a']);
$aid = $_SESSION['user_id'];

Please include this fix in the next version.
Thanks in advance,
evoluzzer

Discussion