Committer: gariev
if FB memcache is not configured, use LJ memcache serversU trunk/lib/startup.pl
Modified: trunk/lib/startup.pl =================================================================== --- trunk/lib/startup.pl 2011-05-26 06:51:05 UTC (rev 1445) +++ trunk/lib/startup.pl 2011-05-26 06:53:45 UTC (rev 1446) @@ -15,6 +15,17 @@ require "$ENV{'FBHOME'}/lib/lang.pl"; require "$ENV{'LJHOME'}/cgi-bin/ljlib.pl"; +## set up memcached servers if they are not set already +if (!@FB::MEMCACHE_SERVERS) { + ## try to use servers from LJ config + @FB::MEMCACHE_SERVERS = @LJ::MEMCACHE_SERVERS; + if (@FB::MEMCACHE_SERVERS) { + FB::MemCache->reload_conf; + } else { + warn "Memcache is not configured in your Fotobilder installation"; + } +} + # setup httpd.conf things for the user: LJ::Request->add_httpd_conf("DocumentRoot $FB::HOME/htdocs"); LJ::Request->add_httpd_conf("ServerAdmin $FB::ADMIN_EMAIL")