format
This commit is contained in:
parent
2b994d5c29
commit
cdaecb3380
4 changed files with 25 additions and 20 deletions
|
@ -15,7 +15,8 @@
|
|||
* and other such things that aren't ready yet
|
||||
*/
|
||||
|
||||
function install() {
|
||||
function install()
|
||||
{
|
||||
date_default_timezone_set('UTC');
|
||||
define("DATABASE_TIMEOUT", 10000);
|
||||
|
||||
|
@ -54,10 +55,10 @@ function install() {
|
|||
} else {
|
||||
ask_questions();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function get_dsn() {
|
||||
function get_dsn()
|
||||
{
|
||||
if (file_exists("data/config/auto_install.conf.php")) {
|
||||
$dsn = null;
|
||||
require_once "data/config/auto_install.conf.php";
|
||||
|
@ -72,7 +73,8 @@ function get_dsn() {
|
|||
return $dsn;
|
||||
}
|
||||
|
||||
function do_install($dsn) {
|
||||
function do_install($dsn)
|
||||
{
|
||||
try {
|
||||
create_dirs();
|
||||
create_tables(new Database($dsn));
|
||||
|
@ -80,7 +82,6 @@ function do_install($dsn) {
|
|||
} catch (InstallerException $e) {
|
||||
exit_with_page($e->title, $e->body, $e->code);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ask_questions()
|
||||
|
@ -194,7 +195,8 @@ function ask_questions()
|
|||
Drivers can generally be downloaded with your OS package manager;
|
||||
for Debian / Ubuntu you want php-pgsql, php-mysql, or php-sqlite.
|
||||
</p>
|
||||
EOD);
|
||||
EOD
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -337,7 +339,8 @@ function write_config($dsn)
|
|||
}
|
||||
}
|
||||
|
||||
function exit_with_page($title, $body, $code=0) {
|
||||
function exit_with_page($title, $body, $code=0)
|
||||
{
|
||||
print("<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
|
@ -46,9 +46,11 @@ class Index extends Extension
|
|||
$fast_page_limit = 500;
|
||||
|
||||
if (
|
||||
SPEED_HAX
|
||||
&& strstr($_SERVER["HTTP_USER_AGENT"], "Googlebot") !== false
|
||||
&& count($search_terms) > 1
|
||||
SPEED_HAX && strstr($_SERVER["HTTP_USER_AGENT"], "Googlebot") !== false
|
||||
&& (
|
||||
$count_search_terms > 1
|
||||
|| ($count_search_terms == 1 && $search_terms[0][0] == "-")
|
||||
)
|
||||
) {
|
||||
// googlebot loves searching for weird combinations of tags...
|
||||
$fast_page_limit = 50;
|
||||
|
|
Reference in a new issue