diff options
author | Urban Müller | 2020-10-29 19:05:22 +0100 |
---|---|---|
committer | Urban Müller | 2020-10-29 19:05:22 +0100 |
commit | e6de1a44981894e907fb07fe9d84c82fd5f5a472 (patch) | |
tree | 81b064a205910ed369040a7628f26774d62b8985 | |
parent | 0b1ec413a83ab8c740106336ec16eb6ab9164bb7 (diff) | |
download | itools-e6de1a44981894e907fb07fe9d84c82fd5f5a472.tar.gz itools-e6de1a44981894e907fb07fe9d84c82fd5f5a472.tar.bz2 itools-e6de1a44981894e907fb07fe9d84c82fd5f5a472.zip |
use new array syntax for texts in old/new mixed files
-rw-r--r-- | it_text.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_text.class b/it_text.class index 660213e..7b27006 100644 --- a/it_text.class +++ b/it_text.class @@ -274,7 +274,7 @@ function dump_php() $oldmask = umask(002); $filename = $this->p['phpfiles'][0]; - $oldsyntax = file_exists($filename) && trim(it::exec('grep -q \'array(\' {filename} && echo array', ['filename' => $filename])); + $oldsyntax = file_exists($filename) && it::system('fgrep -q " => [" {filename}', ['filename' => $filename]); if ((count($this->p['phpfiles']) == 1) && ($f = it::fopen($filename, 'w'))) { $dump = '<?php return ' . strtr(var_export($this->statictext, true), array("=> \n array (" => "=> array(", "array (\n '_'" => "array(\n'_'", "\n ),\n " => "\n),\n", "\n ),\n" => "\n),\n", "\r" => "")) . ";\n?>\n"; |