Placing xf in modules folder, adding a xoopsversion.php, changing relative paths and installing it made it work!
Now, for solving the globals issue I added some lines in pre.php (this is included everywere)
le="color: #000000"><?php //POSTS and GETS $strings = array( 'update','feedback','_summary','_details', 'search','substr','status','action','list_of_groups','response_text','response_title', 'add_to_can','submit','resend','form_public','form_status','form_license', 'group_type','form_domain','action2','sure','string', 'submit', ); $ints = array( 'is_public','_is_public','_diary_id','response_id','group_id','user_id','diary_id' ); foreach ($strings as $k){ $$k = ''; } foreach ($ints as $k){ $$k = ''; } if ( isset($_POST) ) { foreach ( $_POST as $k => $v ) { if (in_array($k,$strings)){ $$k = addslashes($v); } } } if ( isset($_GET) ) { foreach ( $_GET as $k => $v ) { if (in_array($k,$strings)){ $$k = addslashes($v); } } } if ( isset($_POST) ) { foreach ( $_POST as $k => $v ) { if (in_array($k,$ints)){ $$k = intval($v); } } } if ( isset($_GET) ) { foreach ( $_GET as $k => $v ) { if (in_array($k,$ints)){ $$k = intval($v); } } }
Now everytime I get an undefined variable I just add it to the corresponding array(strings or ints)!!
Can anybody check if this code is safe to use?
How should I sanitize it better?