Test Setup Failed
Pull Request — master (#522)
by Mike's
10:08 queued 03:02
created
base.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
     // Generate the function for the template
34 34
     $template = new doT();
35 35
     $dot = $template->template($page, ['bookdetail' => $bookdetail,
36
-                                              'header' => $header,
37
-                                              'footer' => $footer,
38
-                                              'main' => $main]);
36
+                                                'header' => $header,
37
+                                                'footer' => $footer,
38
+                                                'main' => $main]);
39 39
     // If there is a syntax error in the function created
40 40
     // $dot will be equal to FALSE
41 41
     if (!$dot) {
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
     }
136 136
 
137 137
     $return .= trim($error->message) .
138
-               "\n  Line: " . $error->line .
139
-               "\n  Column: " . $error->column;
138
+                "\n  Line: " . $error->line .
139
+                "\n  Column: " . $error->column;
140 140
 
141 141
     if ($error->file) {
142 142
         $return .= "\n  File: " . $error->file;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 function notFound()
61 61
 {
62
-    header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
62
+    header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
63 63
     header('Status: 404 Not Found');
64 64
 
65 65
     $_SERVER['REDIRECT_STATUS'] = 404;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 function xml2xhtml($xml)
109 109
 {
110
-    return preg_replace_callback('#<(\w+)([^>]*)\s*/>#s', function ($m) {
110
+    return preg_replace_callback('#<(\w+)([^>]*)\s*/>#s', function($m) {
111 111
         $xhtml_tags = ['br', 'hr', 'input', 'frame', 'img', 'area', 'link', 'col', 'base', 'basefont', 'param'];
112 112
         if (in_array($m[1], $xhtml_tags)) {
113 113
             return '<' . $m[1] . $m[2] . ' />';
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     libxml_use_internal_errors(true);
164 164
 
165 165
     $doc->loadHTML('<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>' .
166
-                        $html  . '</body></html>'); // Load the HTML
166
+                        $html . '</body></html>'); // Load the HTML
167 167
     $output = $doc->saveXML($doc->documentElement); // Transform to an Ansi xml stream
168 168
     $output = xml2xhtml($output);
169 169
     if (preg_match('#<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></meta></head><body>(.*)</body></html>#ms', $output, $matches)) {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     //echo var_dump($langs);
271 271
     $lang_file = null;
272 272
     foreach ($langs as $language => $val) {
273
-        $temp_file = dirname(__FILE__). '/lang/Localization_' . $language . '.json';
273
+        $temp_file = dirname(__FILE__) . '/lang/Localization_' . $language . '.json';
274 274
         if (file_exists($temp_file)) {
275 275
             $lang = $language;
276 276
             $lang_file = $temp_file;
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         }
279 279
     }
280 280
     if (empty($lang_file)) {
281
-        $lang_file = dirname(__FILE__). '/lang/Localization_' . $lang . '.json';
281
+        $lang_file = dirname(__FILE__) . '/lang/Localization_' . $lang . '.json';
282 282
     }
283 283
     return [$lang, $lang_file];
284 284
 }
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
  * This method is based on this page
288 288
  * http://www.mind-it.info/2010/02/22/a-simple-approach-to-localization-in-php/
289 289
  */
290
-function localize($phrase, $count=-1, $reset=false)
290
+function localize($phrase, $count = -1, $reset = false)
291 291
 {
292 292
     global $config;
293 293
     if ($count == 0) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         $lang_file_en = null;
311 311
         [$lang, $lang_file] = getLangAndTranslationFile();
312 312
         if ($lang != 'en') {
313
-            $lang_file_en = dirname(__FILE__). '/lang/' . 'Localization_en.json';
313
+            $lang_file_en = dirname(__FILE__) . '/lang/' . 'Localization_en.json';
314 314
         }
315 315
 
316 316
         $lang_file_content = file_get_contents($lang_file);
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
 header('Content-Type:text/html;charset=utf-8');
39 39
 
40 40
 $data = ['title'                 => $config['cops_title_default'],
41
-              'version'               => VERSION,
42
-              'opds_url'              => $config['cops_full_url'] . 'feed.php',
43
-              'customHeader'          => '',
44
-              'template'              => getCurrentTemplate(),
45
-              'server_side_rendering' => useServerSideRendering(),
46
-              'current_css'           => getCurrentCss(),
47
-              'favico'                => $config['cops_icon'],
48
-              'getjson_url'           => 'getJSON.php?' . addURLParameter(getQueryString(), 'complete', 1)];
41
+                'version'               => VERSION,
42
+                'opds_url'              => $config['cops_full_url'] . 'feed.php',
43
+                'customHeader'          => '',
44
+                'template'              => getCurrentTemplate(),
45
+                'server_side_rendering' => useServerSideRendering(),
46
+                'current_css'           => getCurrentCss(),
47
+                'favico'                => $config['cops_icon'],
48
+                'getjson_url'           => 'getJSON.php?' . addURLParameter(getQueryString(), 'complete', 1)];
49 49
 if (preg_match('/Kindle/', $_SERVER['HTTP_USER_AGENT'])) {
50 50
     $data['customHeader'] = '<style media="screen" type="text/css"> html { font-size: 75%; -webkit-text-size-adjust: 75%; -ms-text-size-adjust: 75%; }</style>';
51 51
 }
Please login to merge, or discard this patch.
checkconfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             <h4>
202 202
             <?php
203 203
     try {
204
-        $db = new PDO('sqlite:'. Base::getDbFileName($i));
204
+        $db = new PDO('sqlite:' . Base::getDbFileName($i));
205 205
         echo $name . ' OK';
206 206
     } catch (Exception $e) {
207 207
         echo $name . ' If the file is readable, check your php configuration. Exception detail : ' . $e;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             <h4>
215 215
             <?php
216 216
         try {
217
-            $db = new PDO('sqlite:'. Base::getDbFileName($i));
217
+            $db = new PDO('sqlite:' . Base::getDbFileName($i));
218 218
             $count = $db->query('select count(*) FROM sqlite_master WHERE type="table" AND name in ("books", "authors", "tags", "series")')->fetchColumn();
219 219
             if ($count == 4) {
220 220
                 echo $name . ' OK';
Please login to merge, or discard this patch.