@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | 89 | * Summary of getUserObject |
| 90 | - * @return User|null |
|
| 90 | + * @return DataObject|null |
|
| 91 | 91 | */ |
| 92 | 92 | public function getUserObject() |
| 93 | 93 | { |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | 128 | * Summary of getRequestObject |
| 129 | - * @return Request|null |
|
| 129 | + * @return DataObject|null |
|
| 130 | 130 | */ |
| 131 | 131 | public function getRequestObject() |
| 132 | 132 | { |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Summary of getUserObject |
| 88 | - * @return User|null |
|
| 88 | + * @return DataObject|null |
|
| 89 | 89 | */ |
| 90 | 90 | public function getUserObject() |
| 91 | 91 | { |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | $object = $type::getById($this->objectid, $this->dbObject); |
| 156 | 156 | |
| 157 | 157 | if ($object === false) { |
| 158 | - return '[' . $this->objecttype . " " . $this->objectid . ']'; |
|
| 158 | + return '['.$this->objecttype." ".$this->objectid.']'; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | return $object->getObjectDescription(); |
@@ -52,18 +52,18 @@ discard block |
||
| 52 | 52 | $out .= '<table class="table table-striped table-hover table-condensed"><tr>'; |
| 53 | 53 | |
| 54 | 54 | if ($this->numberedList == true) { |
| 55 | - $out .= "<th>" . $this->numberedListTitle . "</th>"; |
|
| 55 | + $out .= "<th>".$this->numberedListTitle."</th>"; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | if ($this->overrideTableTitles != false) { |
| 59 | 59 | foreach ($this->overrideTableTitles as $value) { |
| 60 | - $out .= "<th>" . $value . "</th>"; |
|
| 60 | + $out .= "<th>".$value."</th>"; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | else { |
| 64 | 64 | if (count($results) > 0) { |
| 65 | 65 | foreach ($results[0] as $k => $v) { |
| 66 | - $out .= "<th>" . $k . "</th>"; |
|
| 66 | + $out .= "<th>".$k."</th>"; |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | } |
@@ -80,13 +80,13 @@ discard block |
||
| 80 | 80 | $out .= '<tr>'; |
| 81 | 81 | |
| 82 | 82 | if ($this->numberedList == true) { |
| 83 | - $out .= "<th>" . $currentreq . "</th>"; |
|
| 83 | + $out .= "<th>".$currentreq."</th>"; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | |
| 87 | 87 | foreach ($row as $cell) { |
| 88 | 88 | |
| 89 | - $out .= "<td>" . $cell . "</td>"; |
|
| 89 | + $out .= "<td>".$cell."</td>"; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | $BUbasefile = "backup"; // The basefile's name. |
| 140 | 140 | $BUdir = "/home/project/a/c/c/acc/backups"; // The directory where backups should be stored. |
| 141 | -$BUmonthdir = $BUdir . "/monthly"; // The directory where monthly backups should be stored. |
|
| 141 | +$BUmonthdir = $BUdir."/monthly"; // The directory where monthly backups should be stored. |
|
| 142 | 142 | $BUdumper = "/opt/ts/mysql/5.1/bin/mysqldump --defaults-file=~/.my.cnf p_acc_live"; // Add parameters here if they are needed. |
| 143 | 143 | $BUgzip = "/usr/bin/gzip"; // Add the gzip parameters here if needed. |
| 144 | 144 | $BUtar = "/bin/tar -cvf"; // Add the tar parameters here if needed. |
@@ -276,17 +276,17 @@ discard block |
||
| 276 | 276 | |
| 277 | 277 | $cDatabaseConfig = array( |
| 278 | 278 | "acc" => array( |
| 279 | - "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database, |
|
| 279 | + "dsrcname" => "mysql:host=".$toolserver_host.";dbname=".$toolserver_database, |
|
| 280 | 280 | "username" => $toolserver_username, |
| 281 | 281 | "password" => $toolserver_password |
| 282 | 282 | ), |
| 283 | 283 | "wikipedia" => array( |
| 284 | - "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db, |
|
| 284 | + "dsrcname" => "mysql:host=".$antispoof_host.";dbname=".$antispoof_db, |
|
| 285 | 285 | "username" => $toolserver_username, |
| 286 | 286 | "password" => $toolserver_password |
| 287 | 287 | ), |
| 288 | 288 | "notifications" => array( |
| 289 | - "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database, |
|
| 289 | + "dsrcname" => "mysql:host=".$toolserver_notification_dbhost.";dbname=".$toolserver_notification_database, |
|
| 290 | 290 | "username" => $notifications_username, |
| 291 | 291 | "password" => $notifications_password |
| 292 | 292 | ), |
@@ -308,11 +308,11 @@ discard block |
||
| 308 | 308 | "mcrypt", "openssl", // password encryption etc |
| 309 | 309 | ) as $x) {if (!extension_loaded($x)) {die("extension $x is required."); }} |
| 310 | 310 | |
| 311 | -require_once($filepath . "includes/AutoLoader.php"); |
|
| 311 | +require_once($filepath."includes/AutoLoader.php"); |
|
| 312 | 312 | |
| 313 | 313 | spl_autoload_register("AutoLoader::load"); |
| 314 | 314 | |
| 315 | 315 | // Extra includes which are just plain awkward wherever they are. |
| 316 | -require_once($filepath . 'oauth/OAuthUtility.php'); |
|
| 317 | -require_once($filepath . 'lib/mediawiki-extensions-OAuth/lib/OAuth.php'); |
|
| 318 | -require_once($filepath . 'lib/mediawiki-extensions-OAuth/lib/JWT.php'); |
|
| 316 | +require_once($filepath.'oauth/OAuthUtility.php'); |
|
| 317 | +require_once($filepath.'lib/mediawiki-extensions-OAuth/lib/OAuth.php'); |
|
| 318 | +require_once($filepath.'lib/mediawiki-extensions-OAuth/lib/JWT.php'); |
|
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | global $CORSallowed; |
| 17 | 17 | |
| 18 | 18 | if (in_array($httpOrigin, $CORSallowed)) { |
| 19 | - header("Access-Control-Allow-Origin: " . $httpOrigin); |
|
| 19 | + header("Access-Control-Allow-Origin: ".$httpOrigin); |
|
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | } |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | |
| 96 | 96 | $statement = $this->database->prepare($query); |
| 97 | 97 | $statement->bindValue(":username", $this->user->getUsername()); |
| 98 | - $statement->bindValue(":date", date('Y-m-d') . "%"); |
|
| 98 | + $statement->bindValue(":date", date('Y-m-d')."%"); |
|
| 99 | 99 | $statement->execute(); |
| 100 | 100 | $today = $statement->fetchColumn(); |
| 101 | 101 | $statement->closeCursor(); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $substr = mb_substr($string, 0, 1); |
| 13 | 13 | $substr2 = mb_substr($string, 1, $strlen - 1); |
| 14 | 14 | $upstring = mb_strtoupper($substr); |
| 15 | - $ustring = $upstring . $substr2; |
|
| 15 | + $ustring = $upstring.$substr2; |
|
| 16 | 16 | return $ustring; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | catch (PDOException $ex) { |
| 53 | 53 | // wrap around any potential stack traces which may include passwords |
| 54 | - throw new Exception("Error connecting to database '$connectionName': " . $ex->getMessage()); |
|
| 54 | + throw new Exception("Error connecting to database '$connectionName': ".$ex->getMessage()); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $databaseObject->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | ); |
| 186 | 186 | } |
| 187 | 187 | catch (Exception $ex) { |
| 188 | - trigger_error("Error logging query. Disabling for this request. " . $ex->getMessage(), E_USER_NOTICE); |
|
| 188 | + trigger_error("Error logging query. Disabling for this request. ".$ex->getMessage(), E_USER_NOTICE); |
|
| 189 | 189 | $enableQueryLog = false; |
| 190 | 190 | } |
| 191 | 191 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | global $smarty, $filepath; |
| 20 | 20 | |
| 21 | - $files = scandir($filepath . "/includes/statistics/"); |
|
| 21 | + $files = scandir($filepath."/includes/statistics/"); |
|
| 22 | 22 | |
| 23 | 23 | $statsPageDefinitions = preg_grep("/php$/", $files); |
| 24 | 24 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | foreach ($statsPageDefinitions as $i) { |
| 28 | 28 | // TODO: is this require still needed? AutoLoader ftw. |
| 29 | - require_once($filepath . "/includes/statistics/" . $i); |
|
| 29 | + require_once($filepath."/includes/statistics/".$i); |
|
| 30 | 30 | $expld = explode('.', $i); |
| 31 | 31 | $className = $expld[0]; |
| 32 | 32 | |