projects
/
Pman.Admin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1a27086
)
Fix #7554 - performance on import of langs
author
Alan
<alan@roojs.com>
Tue, 17 Jan 2023 09:22:07 +0000
(17:22 +0800)
committer
Alan
<alan@roojs.com>
Tue, 17 Jan 2023 09:22:07 +0000
(17:22 +0800)
UpdateBjsTemplates.php
patch
|
blob
|
history
diff --git
a/UpdateBjsTemplates.php
b/UpdateBjsTemplates.php
index
4a8f4ec
..
5ca48a9
100644
(file)
--- a/
UpdateBjsTemplates.php
+++ b/
UpdateBjsTemplates.php
@@
-157,18
+157,27
@@
class Pman_Admin_UpdateBjsTemplates extends Pman
'view_name' => $view_name,
));
'view_name' => $view_name,
));
+
+
$o = false;
if($template->find(true)){
$o = clone ($template);
}
$o = false;
if($template->find(true)){
$o = clone ($template);
}
+ $updated = empty($template->updated) ? '1970-01-01' : $template->updated ;
+
$template->is_deleted = 0;
$template->filetype = 'bjs';
$template->updated = $template->sqlValue("NOW()");
(empty($o)) ? $template->insert() : $template->update($o);
$template->is_deleted = 0;
$template->filetype = 'bjs';
$template->updated = $template->sqlValue("NOW()");
(empty($o)) ? $template->insert() : $template->update($o);
+
+ if (strtotime($updated) >= filemtime('Pman' . '/' . $m . '/' . $fn)) {
+ continue;
+ }
+
$ids[] = $template->id;
$data = json_decode(file_get_contents('Pman' . '/' . $m . '/' . $fn), true);
$ids[] = $template->id;
$data = json_decode(file_get_contents('Pman' . '/' . $m . '/' . $fn), true);