'11-add.png', # Added
'D' => '11-delete.png', # Deleted
'M' => '11-pencil.png', # Modified
'R' => '11-page_copy.png', # Copied
'page_previous' => 'resultset_previous.png',
'page_next' => 'resultset_next.png',
);
// ##### CONFIGURATION ENDS HERE #####
// Nothing below here needs changed.
// Setup the database connection.
$db = mysql_connect($db_hostname, $db_username, $db_password)
or die("
Could not connect to the MySQL Server!\n");
mysql_select_db($db_database, $db)
or die("
Could not select the MySQL database \"$qp_mysql_database\"!\n");
// Lets us correctly read UTF-8 columns
mysql_query("SET NAMES 'utf8'");
$changelogs = array();
/// Pull the changelog configurations.
function slb_read_settings()
{
global $changelogs;
$changelogs = array();
if(!($result = mysql_query("SELECT * FROM changelogs")))
{
// Maybe SLB was just barely installed.
mysql_query(file_get_contents('sql/changelogs.sql'));
$result = mysql_query("SELECT * FROM changelogs");
}
while($row = mysql_fetch_assoc($result))
{
$link_files = false;
if(strtolower(substr($row['svn_root'], 0, 4)) == 'http')
$link_files = true;
$changelogs[$row['id']] = array(
'title' => $row['name'],
'table_prefix' => $row['table_prefix'],
'authors_table' => $row['table_prefix'] . '_authors',
'changes_table' => $row['table_prefix'] . '_changes',
'commits_table' => $row['table_prefix'] . '_commits',
'latest' => $row['latest_revision'],
'svn' => $row['svn_url'],
'svn_root' => $row['svn_root'],
'link_files' => $link_files,
'summary_limit' => $row['summary_limit'],
'pathsep' => '/', // Keeping this for now in case it is needed later.
'trunk' => $row['trunk'],
'tags' => $row['tags'],
'branches' => $row['branches'],
'diff_url' => $row['diff_url']
);
}
}
slb_read_settings();
?>