@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | function DeArchive($data) { |
| 3 | - if(is_string($data)) { |
|
| 4 | - if(substr($data,0,55) == "Creatures Evolution Engine - Archived information file.") { |
|
| 5 | - $data = substr($data,strpos($data,chr(0x1A).chr(0x04))+2); |
|
| 3 | + if (is_string($data)) { |
|
| 4 | + if (substr($data, 0, 55) == "Creatures Evolution Engine - Archived information file.") { |
|
| 5 | + $data = substr($data, strpos($data, chr(0x1A).chr(0x04))+2); |
|
| 6 | 6 | $data = gzuncompress($data); |
| 7 | 7 | return $data; |
| 8 | 8 | } |
| 9 | 9 | die('Couldn\'t dearchive -- Probably invalid file'); |
| 10 | 10 | return false; |
| 11 | - } else if(is_resource($data)) { |
|
| 11 | + } else if (is_resource($data)) { |
|
| 12 | 12 | return false; //coming soon |
| 13 | 13 | } |
| 14 | 14 | } |
| 15 | 15 | /** |
| 16 | 16 | * @param string $data |
| 17 | 17 | */ |
| 18 | -function Archive($data,$filehandle=null) { |
|
| 19 | - if(is_resource($filehandle)) { |
|
| 18 | +function Archive($data, $filehandle = null) { |
|
| 19 | + if (is_resource($filehandle)) { |
|
| 20 | 20 | return false; |
| 21 | 21 | } |
| 22 | 22 | $data = gzcompress($data); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | /** @return string |
| 24 | 24 | */ |
| 25 | 25 | public function Compile() { |
| 26 | - return $this->GetType() . $this->contents; |
|
| 26 | + return $this->GetType().$this->contents; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /// @brief Gets the block's contents |