@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | if(array_key_exists('output_file', $this->config)) |
661 | 661 | { |
662 | 662 | // build md5 hash of previous stored xml without <mod_time> Elements |
663 | - $oldphonebhash = md5(preg_replace("/<mod_time>(\\d{10})/","",file_get_contents($this->config['output_file'],'r'),-1,$debugoldtsreplace)); |
|
663 | + $oldphonebhash = md5(preg_replace("/<mod_time>(\\d{10})/", "", file_get_contents($this->config['output_file'], 'r'), -1, $debugoldtsreplace)); |
|
664 | 664 | $output = fopen($this->config['output_file'], 'w'); |
665 | 665 | if($output) |
666 | 666 | { |
@@ -668,13 +668,13 @@ discard block |
||
668 | 668 | fclose($output); |
669 | 669 | print " Saved to file " . $this->config['output_file'] . PHP_EOL; |
670 | 670 | } |
671 | - if (array_key_exists('output_and_upload', $this->config) and $this->config['output_and_upload']) |
|
671 | + if(array_key_exists('output_and_upload', $this->config) and $this->config['output_and_upload']) |
|
672 | 672 | { |
673 | - $newphonebhash = md5(preg_replace("/<mod_time>(\\d{10})/","",file_get_contents($this->config['output_file'],'r'),-1,$debugnewtsreplace)); |
|
673 | + $newphonebhash = md5(preg_replace("/<mod_time>(\\d{10})/", "", file_get_contents($this->config['output_file'], 'r'), -1, $debugnewtsreplace)); |
|
674 | 674 | print " INFO: Compare old and new phonebook file versions." . PHP_EOL . " INFO: old version: " . $oldphonebhash . PHP_EOL . " INFO: new version: " . $newphonebhash . PHP_EOL; |
675 | 675 | if($oldphonebhash === $newphonebhash) |
676 | 676 | { |
677 | - print " INFO: Same versions ==> No changes in phonebook or images" . PHP_EOL . " EXIT: No need to upload phonebook to the FRITZ!Box.". PHP_EOL; |
|
677 | + print " INFO: Same versions ==> No changes in phonebook or images" . PHP_EOL . " EXIT: No need to upload phonebook to the FRITZ!Box." . PHP_EOL; |
|
678 | 678 | return 0; |
679 | 679 | } |
680 | 680 | else |