Menu

single table editor

Developers
Vittorio
2014-08-23
2014-09-15
  • Vittorio

    Vittorio - 2014-08-23

    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

     
  • Vittorio

    Vittorio - 2014-08-23

    PS

    function database() { return 'mydb'; }

    works well in Editor but not in Adminer

    :(

     
  • Jakub Vrána

    Jakub Vrána - 2014-09-13

    You can use a similar hack as for autologin.

     
  • Vittorio

    Vittorio - 2014-09-15

    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.