@@ -51,8 +51,9 @@ |
||
| 51 | 51 | function minifyOutput($_buffer) { |
| 52 | 52 | $search = array ( '/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s' ); |
| 53 | 53 | $replace = array ( '>', '<', '\\1' ); |
| 54 | - if (preg_match("/\<html/i",$_buffer) == 1 && preg_match("/\<\/html\>/i",$_buffer) == 1) |
|
| 55 | - $_buffer = preg_replace($search, $replace, utf8_decode($_buffer)); |
|
| 54 | + if (preg_match("/\<html/i",$_buffer) == 1 && preg_match("/\<\/html\>/i",$_buffer) == 1) { |
|
| 55 | + $_buffer = preg_replace($search, $replace, utf8_decode($_buffer)); |
|
| 56 | + } |
|
| 56 | 57 | return utf8_encode($_buffer); |
| 57 | 58 | } |
| 58 | 59 | ?> |
@@ -36,10 +36,12 @@ |
||
| 36 | 36 | function arrayDump( $_array, $_name = "Array", $_tab = " " ) { |
| 37 | 37 | $position = preg_replace('/ /', '', $_tab, 1); |
| 38 | 38 | echo "$position<span style=\"color:rgb(230,0,0)\">$_name:</span><br>"; |
| 39 | - foreach ($_array as $k => $i) |
|
| 40 | - if(is_array($i)) |
|
| 39 | + foreach ($_array as $k => $i) { |
|
| 40 | + if(is_array($i)) |
|
| 41 | 41 | arrayDump( $i, $k, " $_tab" ); |
| 42 | - else |
|
| 43 | - echo "$_tab<b>$k:</b> $i<br>"; |
|
| 42 | + } |
|
| 43 | + else { |
|
| 44 | + echo "$_tab<b>$k:</b> $i<br>"; |
|
| 45 | + } |
|
| 44 | 46 | } |
| 45 | 47 | ?> |
@@ -21,10 +21,11 @@ discard block |
||
| 21 | 21 | $temp = []; |
| 22 | 22 | if (is_dir($_dir)) { |
| 23 | 23 | if ($dirOpened = opendir($_dir)) { |
| 24 | - while (($file = readdir($dirOpened)) !== false) |
|
| 25 | - if( ($file !='.')&&($file !='..') ) |
|
| 24 | + while (($file = readdir($dirOpened)) !== false) { |
|
| 25 | + if( ($file !='.')&&($file !='..') ) |
|
| 26 | 26 | if($_function($file)) |
| 27 | 27 | array_push($temp,$file); |
| 28 | + } |
|
| 28 | 29 | closedir($dirOpened); |
| 29 | 30 | } |
| 30 | 31 | } |
@@ -32,14 +33,16 @@ discard block |
||
| 32 | 33 | } |
| 33 | 34 | function requireSubfolder( $_dir = "./" ) { |
| 34 | 35 | $temp = subFolderFile($_dir); |
| 35 | - foreach ($temp as $i) |
|
| 36 | - jRequire($_dir."/".$i); |
|
| 36 | + foreach ($temp as $i) { |
|
| 37 | + jRequire($_dir."/".$i); |
|
| 38 | + } |
|
| 37 | 39 | } |
| 38 | 40 | function require_js( $_dir = "./" ) { |
| 39 | 41 | $tempArray = []; |
| 40 | 42 | $temp = subFolderFile($_dir); |
| 41 | - foreach ($temp as $i) |
|
| 42 | - array_push($tempArray, $_dir."/".$i); |
|
| 43 | + foreach ($temp as $i) { |
|
| 44 | + array_push($tempArray, $_dir."/".$i); |
|
| 45 | + } |
|
| 43 | 46 | return $tempArray; |
| 44 | 47 | } |
| 45 | 48 | ?> |
@@ -1,7 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | function getGitLog( $_dir = "./" ) { |
| 3 | - if(!file_exists($_dir)) |
|
| 4 | - return []; |
|
| 3 | + if(!file_exists($_dir)) { |
|
| 4 | + return []; |
|
| 5 | + } |
|
| 5 | 6 | $currentDir = getcwd(); |
| 6 | 7 | chdir($_dir); |
| 7 | 8 | $gitHistory = []; |
@@ -35,19 +36,17 @@ discard block |
||
| 35 | 36 | $tag = trim($tag[0]); |
| 36 | 37 | $gitHistory[$lastHash]['tag'] = $tag; |
| 37 | 38 | } |
| 38 | - } |
|
| 39 | - else if (strpos($line, 'Author') === 0) { |
|
| 39 | + } else if (strpos($line, 'Author') === 0) { |
|
| 40 | 40 | $author = explode(':', $line); |
| 41 | 41 | $author = trim(end($author)); |
| 42 | 42 | $gitHistory[$lastHash]['author'] = $author; |
| 43 | - } |
|
| 44 | - else if (strpos($line, 'Date') === 0) { |
|
| 43 | + } else if (strpos($line, 'Date') === 0) { |
|
| 45 | 44 | $date = explode(':', $line, 2); |
| 46 | 45 | $date = trim(end($date)); |
| 47 | 46 | $gitHistory[$lastHash]['date'] = date('d/m/Y H:i:s A', strtotime($date)); |
| 47 | + } else { |
|
| 48 | + $gitHistory[$lastHash]['message'] .= "$line<br>"; |
|
| 48 | 49 | } |
| 49 | - else |
|
| 50 | - $gitHistory[$lastHash]['message'] .= "$line<br>"; |
|
| 51 | 50 | } |
| 52 | 51 | } |
| 53 | 52 | chdir($currentDir); |
@@ -22,8 +22,9 @@ discard block |
||
| 22 | 22 | $percent; |
| 23 | 23 | foreach (getGitLog() as $i) { |
| 24 | 24 | $cont++; |
| 25 | - if($cont % $nPerCol == 1) |
|
| 26 | - echo '<div class="row">'; |
|
| 25 | + if($cont % $nPerCol == 1) { |
|
| 26 | + echo '<div class="row">'; |
|
| 27 | + } |
|
| 27 | 28 | if(isset($i["tag"])) { |
| 28 | 29 | $percent = explode(".",$i["tag"]); |
| 29 | 30 | $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]); |
@@ -32,7 +33,8 @@ discard block |
||
| 32 | 33 | <div class="col-lg-<?=$dim?>"> |
| 33 | 34 | <div class="well well-sm miniblock"> |
| 34 | 35 | <div class="autor"><b>Autor:</b> <?=$i["author"]?><br></div> |
| 35 | - <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) echo $i["tag"]?><br></div> |
|
| 36 | + <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) { |
|
| 37 | + echo $i["tag"]?><br></div> |
|
| 36 | 38 | <div class="date"><b>Date:</b> <?=$i["date"]?><br></div> |
| 37 | 39 | <div class="message"><b>Message:</b> <?=$i["message"]?><br></div> |
| 38 | 40 | <div class="progress"> |
@@ -46,6 +48,7 @@ discard block |
||
| 46 | 48 | <?php |
| 47 | 49 | if($cont % $nPerCol == 0) |
| 48 | 50 | echo '</div>'; |
| 51 | +} |
|
| 49 | 52 | } ?> |
| 50 | 53 | </div> |
| 51 | 54 | </div> |
@@ -1,6 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | - if(!isset($GLOBALS["JATEPath"])) |
|
| 3 | - $GLOBALS["JATEPath"] = []; |
|
| 2 | + if(!isset($GLOBALS["JATEPath"])) { |
|
| 3 | + $GLOBALS["JATEPath"] = []; |
|
| 4 | + } |
|
| 4 | 5 | $commonLocations = [ |
| 5 | 6 | "bower_components/JATE/dist/" |
| 6 | 7 | , "vendor/xaberr/jate/dist/" |
@@ -9,13 +10,15 @@ discard block |
||
| 9 | 10 | , dirname(__FILE__)."/" |
| 10 | 11 | ]; |
| 11 | 12 | $jSuccess = false; |
| 12 | - foreach ($commonLocations as $path) |
|
| 13 | - if(file_exists("${path}jate/coreEngine.php")) { |
|
| 13 | + foreach ($commonLocations as $path) { |
|
| 14 | + if(file_exists("${path}jate/coreEngine.php")) { |
|
| 14 | 15 | array_push($GLOBALS["JATEPath"], $path); |
| 16 | + } |
|
| 15 | 17 | require_once("${path}jate/coreEngine.php"); |
| 16 | 18 | $jSuccess = true; |
| 17 | 19 | break; |
| 18 | 20 | } |
| 19 | - if( !$jSuccess ) |
|
| 20 | - throw new Exception("JATE can't find coreEngine.php."); |
|
| 21 | -?> |
|
| 21 | + if( !$jSuccess ) { |
|
| 22 | + throw new Exception("JATE can't find coreEngine.php."); |
|
| 23 | + } |
|
| 24 | + ?> |
|
@@ -17,16 +17,18 @@ |
||
| 17 | 17 | public function queryFetch( $_query ) { |
| 18 | 18 | $result = $this->stdQuery($_query); |
| 19 | 19 | $rows = []; |
| 20 | - while($row = pg_fetch_assoc($result)) |
|
| 21 | - $rows[] = $row; |
|
| 20 | + while($row = pg_fetch_assoc($result)) { |
|
| 21 | + $rows[] = $row; |
|
| 22 | + } |
|
| 22 | 23 | pg_free_result($result); |
| 23 | 24 | return $rows; |
| 24 | 25 | } |
| 25 | 26 | public function queryArray( $_query ) { |
| 26 | 27 | $result = $this->stdQuery($_query); |
| 27 | 28 | $rows = []; |
| 28 | - while($row = pg_fetch_array($result)) |
|
| 29 | - $rows[] = $row; |
|
| 29 | + while($row = pg_fetch_array($result)) { |
|
| 30 | + $rows[] = $row; |
|
| 31 | + } |
|
| 30 | 32 | pg_free_result($result); |
| 31 | 33 | return $rows; |
| 32 | 34 | } |