gnu-social/_darcs/tentative_pristine
Evan Prodromou b8c0091390 first step of phpcs-cleanup of index.php
darcs-hash:20081221002332-84dde-5834e12499fff0a23a8a6a76018f8beaa5ea8a96.gz
2008-12-20 19:23:32 -05:00

53 lines
1.5 KiB
Plaintext

hunk ./index.php 2
-/*
+/**
hunk ./index.php 23
-require_once(INSTALLDIR . "/lib/common.php");
+require_once INSTALLDIR . '/lib/common.php';
hunk ./index.php 25
-# get and cache current user
+// get and cache current user
hunk ./index.php 29
-# initialize language env
+// initialize language env
hunk ./index.php 44
- 'recoverpassword', 'api', 'doc', 'register')))
-{
+ 'recoverpassword', 'api', 'doc', 'register'))) {
hunk ./index.php 51
- require_once($actionfile);
- $action_class = ucfirst($action)."Action";
+
+ include_once $actionfile;
+
+ $action_class = ucfirst($action).'Action';
+
hunk ./index.php 57
- if ($config['db']['mirror'] && $action_obj->is_readonly()) {
- if (is_array($config['db']['mirror'])) {
- # "load balancing", ha ha
- $k = array_rand($config['db']['mirror']);
- $mirror = $config['db']['mirror'][$k];
- } else {
- $mirror = $config['db']['mirror'];
- }
- $config['db']['database'] = $mirror;
- }
+
+ if ($config['db']['mirror'] && $action_obj->is_readonly()) {
+ if (is_array($config['db']['mirror'])) {
+ // "load balancing", ha ha
+ $k = array_rand($config['db']['mirror']);
+
+ $mirror = $config['db']['mirror'][$k];
+ } else {
+ $mirror = $config['db']['mirror'];
+ }
+ $config['db']['database'] = $mirror;
+ }
hunk ./index.php 70
- call_user_func(array($action_obj, 'handle'), $_REQUEST);
- }
+ call_user_func(array($action_obj, 'handle'), $_REQUEST);
+ }