Gossamer Forum
Home : Products : Others : MySQLMan :

No more demo mode?

Quote Reply
No more demo mode?
It appears that v1.05 did away with the demo mode, which I sort of liked for a way to trick the program into only seeing a specified set of databases (on a shared server). I tried adding it back in (config settings, including specifying multiple "demo" databases, and the display db routine; plus changing $config to $CONFIG for the new format), but I ended up seeing no databases...

How extensively intertwined was the demo mode with the rest of the program? I'm guessing I've missed some configuration necessities. Is there a reason it was done away with?

Dan

Quote Reply
Re: No more demo mode? In reply to
Hi Dan,

We removed it as we thought we were the only one using it. Our source system now easily adds in code where we need it to auto-create the demo modes without affecting what people download.

It was pretty extensive unfortunately.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: No more demo mode? In reply to
In Reply To:
It was pretty extensive unfortunately.
Ah, that would explain why my quick hack to put it back in for the db select routine didn't work... :)

Dan

Quote Reply
Re: No more demo mode? In reply to
This is a patch for sub show_dbs to display only one database: (bold code is mine)
Code:
if ($CONFIG{'direct_connect'}) {
$query = "SHOW DATABASES LIKE '" . $CONFIG{'direct_db'} . "'";
}
else {
$query = "SHOW DATABASES";
}

You can also disable "Drop database" in the same sub:
Code:
$drop_cmd = ' ';

while (($db) = $sth->fetchrow_array) {
$database_list = qq~<a href="$CONFIG{'script_url'}?do=tables&data_source=DBI:mysql:$db">$db</a>\n~;
$drop_cmd = qq~<a href="$CONFIG{'script_url'}?do=database&data_source=DBI:mysql:$db&action=drop_db&db=$db">Drop</a>\n~ unless ($CONFIG{'direct_connect'});
$db_table_rows .= qq~<TR><TD>$database_list</TD><TD>$drop_cmd</TD></TR>~;
}
-- Gregory