Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Default function call of plugin with loadtab.php
#1
Hi guys,

Trying to get a plugin working as a new tab with the nav-tab hook. When a plugin is displayed with loadtab.php and without $_GET['item'] specified, nothing is displayed. I think the default function should be called in that situation.

The code in loadtab.php (line 40-44):
Code:
if ($plugin_id == @$_GET['item']) {
    call_user_func_array($plugin_info[$plugin_id]['load_data'], array());
} else if (isset($_GET['item'])) {
    call_user_func_array($_GET['item'], array());
}
shouldn't it be like
Code:
if(isset($_GET['item'])) {
    call_user_func_array($_GET['item'], array());
} else {
    call_user_func_array($plugin_info[$plugin_id]['load_data'], array());
}
This way, when a plugin is requested with loadtab.php, without $_GET['item'] specified, the default plugin function is called.

Regards,
Reply


Messages In This Thread
Default function call of plugin with loadtab.php - by leenm - 2011-11-13, 03:02:18



Users browsing this thread: 1 Guest(s)