I'm customizing adminer/editor with the aim of having an editor locked on a single mysql table. I succeded in customizing adminer and loading plugin, and now i'm able to autologon to the dbms.
Am I the first that tries to do this?
My overrides are very simple:
class AdminerCustomization extends AdminerPlugin { function credentials() { $credentials=array('<ip_address>', 'user', 'password'); return $credentials; } function database() { return 'mydb'; } }
$_GET["username"]=""; //hack to trigger autologin
They work and bring me directly to the list of the tables.
Is there a method I can override to force the selection of the table? I didn't find it.
Thank you
PS
function database() { return 'mydb'; }
works well in Editor but not in Adminer
:(
You can use a similar hack as for autologin.
Thank you! I tried simply $_GET["select"]="myTable"; and didn't work well with other calls other than the first page load
But this works quite fine: if (empty($_GET)) { //just the first time $_GET["username"]=""; //hack but it works $_GET["select"]="myTable"; //works }
Log in to post a comment.
I'm customizing adminer/editor with the aim of having an editor locked on a single mysql table.
I succeded in customizing adminer and loading plugin, and now i'm able to autologon to the dbms.
Am I the first that tries to do this?
My overrides are very simple:
$_GET["username"]=""; //hack to trigger autologin
They work and bring me directly to the list of the tables.
Is there a method I can override to force the selection of the table? I didn't find it.
Thank you
PS
function database() { return 'mydb'; }
works well in Editor but not in Adminer
:(
You can use a similar hack as for autologin.
Thank you!
I tried simply
$_GET["select"]="myTable";
and didn't work well with other calls other than the first page load
But this works quite fine:
if (empty($_GET)) { //just the first time
$_GET["username"]=""; //hack but it works
$_GET["select"]="myTable"; //works
}