Extension : change for security, now based on MENU_REF

Update the script to put the extension into menu_ref + profile_menu
This commit is contained in:
Dany De Bontridder 2011-11-08 23:04:55 +00:00
parent 4cee45d624
commit 58f3e38e84
11 changed files with 193 additions and 310 deletions

View file

@ -41,16 +41,16 @@ $user->check();
$only_plugin=$user->check_dossier(dossier::id());
$ext=new Extension($cn);
$ext->search('code',$_REQUEST['plugin_code']);
if ( $ext->get_parameter('id') != 0 )
if ( $ext->search($_REQUEST['plugin_code']) != -1 )
{
/* security */
if ( !isset ($_SESSION['g_user']) || $ext->can_request($_SESSION['g_user']) == 0 )
{
exit();
exit();
}
/* call the ajax script */
require_once('ext'.DIRECTORY_SEPARATOR.dirname(trim($ext->get_parameter('filepath'))).DIRECTORY_SEPARATOR.'raw.php');
require_once('ext'.DIRECTORY_SEPARATOR.dirname(trim($ext->get_parameter('me_file'))).DIRECTORY_SEPARATOR.'raw.php');
}
else
{