a08ccd7dd4930bff5bcf0a32bd35ec22db71215f markd Sat Aug 22 06:14:41 2026 -0700 Fix the browser.theme drop down, which has never applied a theme, and retire browser.background and browser.bgcolor from the example configs. refs #38158 themeDropDown built the menu label from the hg.conf key and posted that label back, while setThemeFromCart looks a theme up by key, so no entry carrying a sort prefix or an underscore could ever resolve. Broken since af6898753ba (2023) introduced that key format and changed the menu side without the lookup side. themeDropDown now passes the key suffix as the option value and the prettified label as the display text, using cgiMakeDropListWithVals. setThemeFromCart compared the generated link against "<>" instead of the config value, so the "no theme file" marker never fired. It also let an empty link from a missing CSS file overwrite browser.style with nothing. Both now test the right string and leave browser.style alone when there is no theme to apply. browser.background has not been read by any CGI since hBackgroundImage() and its callers were removed in 2012 (8e6fcda9f58), and browser.bgcolor has never been read at all, yet ex.hg.conf presented browser.background as a working setting. Commented both out with a note, in ex.hg.conf and the three browserbox configs. ex.hg.conf also documented two conflicting browser.theme formats in two places. The comma form stopped working in 2023. Consolidated to a single block that describes what the code actually does. diff --git src/browserbox/root/hg.conf.offline src/browserbox/root/hg.conf.offline index 84895182de5..3dcdf0c3514 100644 --- src/browserbox/root/hg.conf.offline +++ src/browserbox/root/hg.conf.offline @@ -245,38 +245,40 @@ # set central.domain to: mylab.university.edu # An exception to this is when multiple virtual hosts share the # same central database and central.cookie setting (see below). # In #that case, domain should be inclusive of all virtual hosts # (e.g. only #.university.edu). # central.user=root central.password=browser central.socket=/var/run/mysqld/mysqld.sock central.domain=HTTPHOST # use this cookie setting to keep your installation hguid cookie setting # distinct from UCSC hguid cookie. If you have *multiple* central # databases for multiple hosts, set a distinct cookie name per # central database. # central.cookie=hguid.mylab -# personalize the background of the browser with a specified jpg -# floret.jpg is the standard UCSC default -browser.background=../images/floret.jpg +# browser.background is dead: hBackgroundImage() and its callers were removed in +# 2012 (commit 8e6fcda9f58) and no CGI has read this key since. Set a background +# image in CSS instead, via browser.style. refs #38158 +#browser.background=../images/floret.jpg # Change this default documentRoot if different in your installation, # to allow some of the browser cgi binaries to find help text files browser.documentRoot=/usr/local/apache/htdocs -# personalize the background of CGIs that don't use images +# browser.bgcolor is dead too, no CGI has ever read it. Set colors in the CSS +# file named by browser.style. refs #38158 #browser.bgcolor=FFF9D2 # optional location of grepIndex files #grepIndex.genbank=/data/tmp/grepIndex #grepIndex.default=/gbdb # new option for track reording functions, August 2006 hgTracks.trackReordering=on # in case of failure of the above central.host machine, # the following settings will be used to access a secondary # mirror of the database backupcentral.db=hgcentral backupcentral.host=localhost backupcentral.user=root backupcentral.password=browser