Completed
Push — master ( c2d7ad...3f78da )
by Thomas
07:29
created
htdocs/lib2/logic/logtypes.inc.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
          FROM `log_types`
29 29
          LEFT JOIN `sys_trans_text`
30 30
              ON `sys_trans_text`.`trans_id` = `log_types`.`trans_id`
31
-             AND `sys_trans_text`.`lang`='" . sql_escape($locale) . "'"
31
+             AND `sys_trans_text`.`lang`='" . sql_escape($locale)."'"
32 32
     );
33 33
     while ($r = sql_fetch_array($rs)) {
34 34
         $log_types[$r['id']] = $r['type_name'];
@@ -91,28 +91,28 @@  discard block
 block discarded – undo
91 91
 
92 92
     $allowed_logtypes = array();
93 93
     if ($owner || $admin_report || $admin_locked) {
94
-        $allowed_logtypes[] = 3;   // note
94
+        $allowed_logtypes[] = 3; // note
95 95
     }
96 96
     if (($owner && $statuslogs) || $admin_report) {
97 97
         if ($cache_status != 5 && (($cache_status != 4 && $cache_status != 7) || $admin_report)) {
98
-            $allowed_logtypes[] = 10;  // ready for search
99
-            $allowed_logtypes[] = 11;  // temporarily not available
100
-            $allowed_logtypes[] = 9;   // archived
101
-            $allowed_logtypes[] = 13;  // locked
98
+            $allowed_logtypes[] = 10; // ready for search
99
+            $allowed_logtypes[] = 11; // temporarily not available
100
+            $allowed_logtypes[] = 9; // archived
101
+            $allowed_logtypes[] = 13; // locked
102 102
         }
103 103
         if ($admin_report || $old_logtype == 14) {
104 104
             $allowed_logtypes[] = 14;
105 105
         }  // locked, invisible
106 106
     }
107 107
     if ($cache_type == 6) { // event
108
-        $allowed_logtypes[] = 8;   // will attend
109
-        $allowed_logtypes[] = 7;   // attended
108
+        $allowed_logtypes[] = 8; // will attend
109
+        $allowed_logtypes[] = 7; // attended
110 110
     } else {
111
-        $allowed_logtypes[] = 1;   // found
112
-        $allowed_logtypes[] = 2;   // not found
111
+        $allowed_logtypes[] = 1; // found
112
+        $allowed_logtypes[] = 2; // not found
113 113
     }
114 114
     if (!($owner || $admin_report || $admin_locked)) {
115
-        $allowed_logtypes[] = 3;   // note
115
+        $allowed_logtypes[] = 3; // note
116 116
     }
117 117
 
118 118
     // always allow to keep the existing logtype when the log is edited by an admin
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             } elseif (!$opt['logic']['admin']['team_comments_only_for_reports'] || admin_has_open_report($cache_id)) {
152 152
                 // allowed for report processing by admins
153 153
                 $allowed = true;
154
-            } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6,7])) {
154
+            } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6, 7])) {
155 155
                 // allowed for admins && locked caches, see http://forum.opencaching.de/index.php?topic=3102.msg39517#msg39517
156 156
                 $allowed = true;
157 157
             } else {
Please login to merge, or discard this patch.
htdocs/lib2/logic/sitemapxml.class.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 {
13 13
     public $sDefaultChangeFreq = 'monthly';
14 14
     public $nMaxFileSize = 9961472; // max file size, 10MB by specification
15
-    public $nMaxUrlCount = 50000;   // max number of URLs per file, 50000 by specification
15
+    public $nMaxUrlCount = 50000; // max number of URLs per file, 50000 by specification
16 16
 
17 17
     public $sPath = '';
18 18
     public $sDomain = '';
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
         $this->sPath = $sPath;
35 35
         $this->sDomain = $sDomain;
36 36
 
37
-        $this->oIndexFile = fopen($sPath . 'sitemap.xml', 'w');
37
+        $this->oIndexFile = fopen($sPath.'sitemap.xml', 'w');
38 38
         if ($this->oIndexFile === false) {
39 39
             return false;
40 40
         }
41 41
 
42
-        fwrite($this->oIndexFile, '<?xml version="1.0" encoding="UTF-8"?>' . "\n");
42
+        fwrite($this->oIndexFile, '<?xml version="1.0" encoding="UTF-8"?>'."\n");
43 43
         fwrite($this->oIndexFile, '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">');
44 44
     }
45 45
 
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
         }
54 54
 
55 55
         $sXML = '<url>';
56
-        $sXML .= '<loc>' . xmlentities($this->sDomain . $sFile) . '</loc>';
57
-        $sXML .= '<lastmod>' . xmlentities(date('c', $dLastMod)) . '</lastmod>';
58
-        $sXML .= '<changefreq>' . xmlentities($sChangeFreq) . '</changefreq>';
59
-        $sXML .= '<priority>' . xmlentities($nPriority) . '</priority>';
56
+        $sXML .= '<loc>'.xmlentities($this->sDomain.$sFile).'</loc>';
57
+        $sXML .= '<lastmod>'.xmlentities(date('c', $dLastMod)).'</lastmod>';
58
+        $sXML .= '<changefreq>'.xmlentities($sChangeFreq).'</changefreq>';
59
+        $sXML .= '<priority>'.xmlentities($nPriority).'</priority>';
60 60
         $sXML .= '</url>';
61 61
 
62 62
         $this->writeInternal($sXML);
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
 
76 76
         // open new XML file?
77 77
         if ($this->oSitemapFile === false) {
78
-            $this->nSitemapIndex ++;
79
-            $sFilename = 'sitemap-' . $this->nSitemapIndex . '.xml.gz';
80
-            $this->oSitemapFile = gzopen($this->sPath . $sFilename, 'wb');
78
+            $this->nSitemapIndex++;
79
+            $sFilename = 'sitemap-'.$this->nSitemapIndex.'.xml.gz';
80
+            $this->oSitemapFile = gzopen($this->sPath.$sFilename, 'wb');
81 81
 
82
-            fwrite($this->oIndexFile, '<sitemap><loc>' . xmlentities($this->sDomain . $sFilename) . '</loc><lastmod>' . xmlentities(date('c')) . '</lastmod></sitemap>');
82
+            fwrite($this->oIndexFile, '<sitemap><loc>'.xmlentities($this->sDomain.$sFilename).'</loc><lastmod>'.xmlentities(date('c')).'</lastmod></sitemap>');
83 83
 
84
-            gzwrite($this->oSitemapFile, '<?xml version="1.0" encoding="UTF-8"?>' . "\n");
84
+            gzwrite($this->oSitemapFile, '<?xml version="1.0" encoding="UTF-8"?>'."\n");
85 85
             gzwrite($this->oSitemapFile, '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">');
86 86
             // includes end of xml-tag
87 87
             $this->nWrittenSize = 108;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         // write string to XML
92 92
         gzwrite($this->oSitemapFile, $str);
93 93
         $this->nWrittenSize += strlen($str);
94
-        $this->nWrittenCount ++;
94
+        $this->nWrittenCount++;
95 95
     }
96 96
 
97 97
     public function close()
Please login to merge, or discard this patch.
htdocs/lib2/cli.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
 }
20 20
 
21 21
 // chicken-egg problem ...
22
-require_once $opt['rootpath'] . 'lib2/const.inc.php';
22
+require_once $opt['rootpath'].'lib2/const.inc.php';
23 23
 
24 24
 // do all output in text format
25 25
 $opt['gui'] = GUI_TEXT;
26 26
 
27 27
 // include the main library
28
-require_once $opt['rootpath'] . 'lib2/common.inc.php';
29
-require_once $opt['rootpath'] . 'lib2/cli.class.php';
28
+require_once $opt['rootpath'].'lib2/common.inc.php';
29
+require_once $opt['rootpath'].'lib2/cli.class.php';
30 30
 
31 31
 if (($opt['debug'] & DEBUG_OUTOFSERVICE) == DEBUG_OUTOFSERVICE) {
32 32
     $cli->debug('exit because DEBUG_OUTOFSERVICE is set');
Please login to merge, or discard this patch.
htdocs/lib2/mail.class.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require_once __DIR__. '/../vendor/autoload.php';
8
+require_once __DIR__.'/../vendor/autoload.php';
9 9
 
10 10
 class mail extends Smarty
11 11
 {
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
 
30 30
         global $opt;
31 31
 
32
-        $this->template_dir = $opt['rootpath'] . 'templates2/mail/';
33
-        $this->compile_dir = $opt['rootpath'] . 'cache2/smarty/compiled/';
32
+        $this->template_dir = $opt['rootpath'].'templates2/mail/';
33
+        $this->compile_dir = $opt['rootpath'].'cache2/smarty/compiled/';
34 34
         $this->plugins_dir = [
35 35
             'plugins',
36
-            __DIR__ . '/../src/Oc/SmartyPlugins'
36
+            __DIR__.'/../src/Oc/SmartyPlugins'
37 37
         ];
38 38
 
39 39
         // disable caching ...
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         global $opt;
56 56
 
57
-        return 'mail|' . $opt['template']['locale'] . '|' . $this->compile_id;
57
+        return 'mail|'.$opt['template']['locale'].'|'.$this->compile_id;
58 58
     }
59 59
 
60 60
     public function assign_rs($name, $rs)
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         global $tpl, $opt;
72 72
 
73
-        if (!$this->template_exists($this->name . '.tpl')) {
73
+        if (!$this->template_exists($this->name.'.tpl')) {
74 74
             $tpl->error(ERROR_MAIL_TEMPLATE_NOT_FOUND);
75 75
         }
76 76
         $this->assign('template', $this->name);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             set_php_locale();
101 101
         }
102 102
 
103
-        $body = $this->fetch($this->main_template . '.tpl', '', $this->get_compile_id());
103
+        $body = $this->fetch($this->main_template.'.tpl', '', $this->get_compile_id());
104 104
 
105 105
         if ($this->recipient_locale != $sender_locale) {
106 106
             $opt['template']['locale'] = $sender_locale;
@@ -115,19 +115,19 @@  discard block
 block discarded – undo
115 115
         }
116 116
 
117 117
         $aAddHeaders = array();
118
-        $aAddHeaders[] = 'From: "' . $this->from . '" <' . $this->from . '>';
118
+        $aAddHeaders[] = 'From: "'.$this->from.'" <'.$this->from.'>';
119 119
 
120 120
         if ($this->replyTo !== null) {
121
-            $aAddHeaders[] = 'Reply-To: ' . $this->replyTo;
121
+            $aAddHeaders[] = 'Reply-To: '.$this->replyTo;
122 122
         }
123 123
 
124 124
         if ($this->returnPath !== null) {
125
-            $aAddHeaders[] = 'Return-Path: ' . $this->returnPath;
125
+            $aAddHeaders[] = 'Return-Path: '.$this->returnPath;
126 126
         }
127 127
 
128 128
         $mailheaders = implode("\n", array_merge($aAddHeaders, $this->headers));
129 129
 
130
-        return mb_send_mail($this->to, $opt['mail']['subject'] . $this->subject, $body, $mailheaders);
130
+        return mb_send_mail($this->to, $opt['mail']['subject'].$this->subject, $body, $mailheaders);
131 131
     }
132 132
 
133 133
     public static function is_existent_maildomain($domain)
Please login to merge, or discard this patch.
htdocs/lib2/rss.class.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function getPubDate()
43 43
     {
44 44
         if (empty($this->pubDate)) {
45
-            return date("d.m.y H:i:s") . "GMT";
45
+            return date("d.m.y H:i:s")."GMT";
46 46
         } else {
47 47
             return $this->pubDate;
48 48
         }
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $out = $this->header();
59 59
         $out .= "<channel>\n";
60
-        $out .= "<title>" . $this->title . "</title>\n";
61
-        $out .= "<link>" . $this->link . "</link>\n";
62
-        $out .= "<description>" . $this->description . "</description>\n";
63
-        $out .= "<language>" . $this->language . "</language>\n";
64
-        $out .= "<pubDate>" . $this->getPubDate() . "</pubDate>\n";
60
+        $out .= "<title>".$this->title."</title>\n";
61
+        $out .= "<link>".$this->link."</link>\n";
62
+        $out .= "<description>".$this->description."</description>\n";
63
+        $out .= "<language>".$this->language."</language>\n";
64
+        $out .= "<pubDate>".$this->getPubDate()."</pubDate>\n";
65 65
 
66 66
         foreach ($this->tags as $key => $val) {
67 67
             $out .= "<$key>$val</$key>\n";
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
 
89 89
     public function header()
90 90
     {
91
-        $out = '<?xml version="1.0" encoding="utf-8"?>' . "\n";
92
-        $out .= '<rss version="2.0">' . "\n";
91
+        $out = '<?xml version="1.0" encoding="utf-8"?>'."\n";
92
+        $out .= '<rss version="2.0">'."\n";
93 93
 
94 94
         return $out;
95 95
     }
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
     public function out()
142 142
     {
143 143
         $out = "<item>\n";
144
-        $out .= "<title>" . $this->title . "</title>\n";
145
-        $out .= "<link>" . $this->link . "</link>\n";
146
-        $out .= "<description>" . $this->description . "</description>\n";
147
-        $out .= "<pubDate>" . $this->getPubDate() . "</pubDate>\n";
144
+        $out .= "<title>".$this->title."</title>\n";
145
+        $out .= "<link>".$this->link."</link>\n";
146
+        $out .= "<description>".$this->description."</description>\n";
147
+        $out .= "<pubDate>".$this->getPubDate()."</pubDate>\n";
148 148
 
149 149
         if ($this->attachment != "") {
150 150
             $out .= "<enclosure url='{$this->attachment}' length='{$this->length}' type='{$this->mimetype}' />";
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         if (empty($this->guid)) {
154 154
             $this->guid = $this->link;
155 155
         }
156
-        $out .= "<guid>" . $this->guid . "</guid>\n";
156
+        $out .= "<guid>".$this->guid."</guid>\n";
157 157
 
158 158
         foreach ($this->tags as $key => $val) {
159 159
             $out .= "<$key>$val</$key\n>";
Please login to merge, or discard this patch.
htdocs/lib2/OcHTMLPurifier.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require_once __DIR__ . '/../vendor/autoload.php';
9
-require_once __DIR__ . '/Net/IDNA2.php';
8
+require_once __DIR__.'/../vendor/autoload.php';
9
+require_once __DIR__.'/Net/IDNA2.php';
10 10
 
11 11
 // !! THIS CODE IS ALSO USED IN OKAPI !!
12 12
 // Any changes must be tested with OKAPI services/logs/submit method.
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
         $config->set('Attr.IDPrefix', 'custom_');
51 51
 
52 52
         // enable 'display' and 'visibility' styles for mystery descriptions
53
-        $config->set('CSS.AllowTricky', true);                // + display, visibility, overflow
54
-        $config->set('CSS.ForbiddenProperties', 'overflow');  // - overflow
53
+        $config->set('CSS.AllowTricky', true); // + display, visibility, overflow
54
+        $config->set('CSS.ForbiddenProperties', 'overflow'); // - overflow
55 55
 
56 56
         // prepare additional definitions
57 57
         $def = $config->getHTMLDefinition(true);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         ); //  HTML5 attribs currently not supported by TinyMCE
66 66
         $def->addElement('legend', 'Inline', 'Flow', 'Common');
67 67
         $def->addElement('q', 'Inline', 'Inline', 'Common', ['cite' => 'URI']);
68
-        $def->addElement('strike', 'Inline', 'Inline', 'Common');   // -> wird in CSS umgewandelt
68
+        $def->addElement('strike', 'Inline', 'Inline', 'Common'); // -> wird in CSS umgewandelt
69 69
         $def->addElement(
70 70
             'area',
71 71
             'Inline',
Please login to merge, or discard this patch.
htdocs/lib2/errorhandler.inc.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             $errmsg = "";
40 40
         }
41 41
 
42
-        require __DIR__ . '/../html/error.php';
42
+        require __DIR__.'/../html/error.php';
43 43
         exit;
44 44
     }
45 45
 }
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
     ) {
68 68
         $error_handled = true;
69 69
 
70
-        $error = "(" . $error['type'] . ") " . $error['message'] .
71
-            " at line " . $error['line'] . " of " . $error['file'];
70
+        $error = "(".$error['type'].") ".$error['message'].
71
+            " at line ".$error['line']." of ".$error['file'];
72 72
         php_errormail($error);
73 73
 
74 74
         $errtitle = "PHP-Fehler";
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             $errmsg = $error;
78 78
         }
79 79
 
80
-        require __DIR__ . '/../html/error.php';
80
+        require __DIR__.'/../html/error.php';
81 81
     }
82 82
 }
83 83
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     global $opt, $sql_errormail, $absolute_server_URI;
95 95
 
96 96
     $sendMail = true;
97
-    $subject = '[' . $opt['page']['domain'] . '] PHP error';
97
+    $subject = '['.$opt['page']['domain'].'] PHP error';
98 98
 
99 99
     if (isset($opt['db']['error']['mail']) && $opt['db']['error']['mail'] != '') {
100 100
         $sendMail = mb_send_mail($opt['db']['error']['mail'], $subject, $errmsg);
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
 function admin_errormail($to, $errortype, $message, $headers)
115 115
 {
116 116
     global $opt;
117
-    $errorlog_dir = $opt['rootpath'] . 'var/errorlog';
118
-    $errorlog_path = $errorlog_dir . "/errorlog-" . date("Y-m-d");
117
+    $errorlog_dir = $opt['rootpath'].'var/errorlog';
118
+    $errorlog_path = $errorlog_dir."/errorlog-".date("Y-m-d");
119 119
 
120
-    $error_mail_limit = 32768;    // send max 32 KB = ca. 5-20 errors per day/logfile
120
+    $error_mail_limit = 32768; // send max 32 KB = ca. 5-20 errors per day/logfile
121 121
 
122 122
     // All errors which may happen here are ignored, to avoid error recursions.
123 123
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         @mkdir($errorlog_dir);
126 126
     }
127 127
     $old_logsize = @filesize($errorlog_path) + 0;
128
-    $msg = date("Y-m-d H:i:s.u") . " " . $errortype . "\n" . $message . "\n" .
128
+    $msg = date("Y-m-d H:i:s.u")." ".$errortype."\n".$message."\n".
129 129
         "-------------------------------------------------------------------------\n\n";
130 130
     try {
131 131
         error_log(
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
     if ($old_logsize < $error_mail_limit && $new_logsize >= $error_mail_limit) {
144 144
         mb_send_mail(
145 145
             $to,
146
-            "too many " . $errortype,
147
-            "Errors/Warnings are recorded in " . $errorlog_path . ".\n" .
148
-            "Email Reporting is DISABLED for today now. Please check the logfile\n" .
146
+            "too many ".$errortype,
147
+            "Errors/Warnings are recorded in ".$errorlog_path.".\n".
148
+            "Email Reporting is DISABLED for today now. Please check the logfile\n".
149 149
             "and RENAME or delete it when done, so that logging is re-enabled.",
150 150
             $headers
151 151
         );
Please login to merge, or discard this patch.
htdocs/lib2/util.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 
230 230
     while ($nCurPos < mb_strlen($str)) {
231 231
         $nNextSep = mb_strlen($str);
232
-        for ($nSepPos = 0; $nSepPos < mb_strlen($sep); $nSepPos ++) {
232
+        for ($nSepPos = 0; $nSepPos < mb_strlen($sep); $nSepPos++) {
233 233
             $nThisPos = mb_strpos($str, mb_substr($sep, $nSepPos, 1), $nCurPos);
234 234
             if ($nThisPos !== false) {
235 235
                 if ($nNextSep > $nThisPos) {
@@ -308,9 +308,9 @@  discard block
 block discarded – undo
308 308
         $retval = 'E ';
309 309
     }
310 310
 
311
-    $retval = $retval . sprintf("%03d", floor($lon)) . '° ';
311
+    $retval = $retval.sprintf("%03d", floor($lon)).'° ';
312 312
     $lon = $lon - floor($lon);
313
-    $retval = $retval . sprintf("%06.3f", round($lon * 60, 3)) . '\'';
313
+    $retval = $retval.sprintf("%06.3f", round($lon * 60, 3)).'\'';
314 314
 
315 315
     return $retval;
316 316
 }
@@ -325,9 +325,9 @@  discard block
 block discarded – undo
325 325
         $retval = 'N ';
326 326
     }
327 327
 
328
-    $retval = $retval . sprintf("%02d", floor($lat)) . '° ';
328
+    $retval = $retval.sprintf("%02d", floor($lat)).'° ';
329 329
     $lat = $lat - floor($lat);
330
-    $retval = $retval . sprintf("%06.3f", round($lat * 60, 3)) . '\'';
330
+    $retval = $retval.sprintf("%06.3f", round($lat * 60, 3)).'\'';
331 331
 
332 332
     return $retval;
333 333
 }
Please login to merge, or discard this patch.
htdocs/lib2/ss_zip.class.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
 
144 144
         }
145 145
         $fnl = strlen($filename);
146
-        $fh = "\x14\x00";    // ver needed to extract
147
-        $fh .= "\x00\x00";    // gen purpose bit flag
148
-        $fh .= "\x08\x00";    // compression method
146
+        $fh = "\x14\x00"; // ver needed to extract
147
+        $fh .= "\x00\x00"; // gen purpose bit flag
148
+        $fh .= "\x08\x00"; // compression method
149 149
         $fh .= "\x00\x00\x00\x00"; // last mod time and date
150 150
         $fh .= pack(
151 151
             "V3v2",
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
         //local file header
161 161
         $lfh = "PK\x03\x04";
162
-        $lfh .= $fh . $filename;
162
+        $lfh .= $fh.$filename;
163 163
         $zipdata = $lfh;
164 164
         $zipdata .= $gzdata;
165 165
         $zipdata .= pack("V3", $crc, $gzsize, $datasize);
@@ -170,16 +170,16 @@  discard block
 block discarded – undo
170 170
                 "va*v3V2",
171 171
                 0,
172 172
                 $fh,
173
-                0,        // file comment length
174
-                0,        // disk number start
175
-                0,        // internal file attributes
176
-                $attr,    // external file attributes - 'archive/directory' bit set
173
+                0, // file comment length
174
+                0, // disk number start
175
+                0, // internal file attributes
176
+                $attr, // external file attributes - 'archive/directory' bit set
177 177
                 $this->offset
178
-            ) . $filename;
178
+            ).$filename;
179 179
 
180 180
         $this->offset += 42 + $fnl + $gzsize;
181 181
         $this->cdir[] = $cdir;
182
-        $this->cnt ++;
182
+        $this->cnt++;
183 183
         $this->idx = $this->cnt - 1;
184 184
     }
185 185
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                 $cdsl, // size of central dir
229 229
                 $zdsl, // offset to start of central dir
230 230
                 0
231
-            );              // .zip file comment length
231
+            ); // .zip file comment length
232 232
         return $this->zipfile;
233 233
     }
234 234
 
Please login to merge, or discard this patch.