add readonly to textarea as changes not saved

master
Jean-Christian Paul Denis 2021-11-04 23:18:43 +01:00
parent 403f09a4f5
commit 312d12789e
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 12 additions and 9 deletions

View File

@ -10,7 +10,6 @@
* @copyright Jean-Christian Denis * @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
class tweakStores class tweakStores
{ {
public static $notice = []; public static $notice = [];
@ -71,6 +70,7 @@ class tweakStores
public static function parseFilePattern($id, $module, $file_pattern) public static function parseFilePattern($id, $module, $file_pattern)
{ {
$module = self::sanitizeModule($id, $module); $module = self::sanitizeModule($id, $module);
return text::tidyURL(str_replace( return text::tidyURL(str_replace(
[ [
'%type%', '%type%',
@ -120,7 +120,6 @@ class tweakStores
# author # author
if (empty($module['author'])) { if (empty($module['author'])) {
self::$failed[] = 'no module author set in _define.php'; self::$failed[] = 'no module author set in _define.php';
} }
$rsp->author($module['author']); $rsp->author($module['author']);
@ -150,6 +149,7 @@ class tweakStores
} }
if ($req[0] == 'core') { if ($req[0] == 'core') {
$module['dc_min'] = $req[1]; $module['dc_min'] = $req[1];
break; break;
} }
} }
@ -195,12 +195,15 @@ class tweakStores
if (!empty(self::$failed)) { if (!empty(self::$failed)) {
return false; return false;
} }
try { try {
files::putContent($module['root'] . '/dcstore.xml', str_replace('><', ">\n<", $content)); files::putContent($module['root'] . '/dcstore.xml', str_replace('><', ">\n<", $content));
} catch (Exception $e) { } catch (Exception $e) {
self::$failed[] = $e->getMessage(); self::$failed[] = $e->getMessage();
return false; return false;
} }
return true; return true;
} }
} }