PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.4.9
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.4.9
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/Core/Importer/Utils/LogHandler.php +6 -8 3.7.53.4.9 View file →
@@ -1,19 +1,18 @@
1 1 <?php
2 2 namespace Templately\Core\Importer\Utils;
3 3
4 4 use Templately\Core\Importer\FullSiteImport;
5 -use Templately\Utils\Helper;
6 5
7 6 class LogHandler {
8 7 public static function get_log_dir() {
9 - // Import logs carry pack and session detail and sit in web-served
10 - // wp-uploads, so the root gets its access guards on the way past.
11 - return Helper::upload_dir('log');
8 + $upload_dir = wp_upload_dir();
9 + $log_dir = trailingslashit($upload_dir['basedir']) . 'templately' . DIRECTORY_SEPARATOR . 'log' . DIRECTORY_SEPARATOR;
10 + return $log_dir;
12 11 }
13 12
14 13 public static function get_log_file_path() {
15 - $session_id = SessionData::get_session_id();
14 + $session_id = Utils::get_session_id();
16 15 $log_dir = self::get_log_dir();
17 16 return trailingslashit($log_dir) . "fsi-$session_id.log";
18 17 }
19 18
@@ -28,11 +27,10 @@
28 27 if (!is_writable($upload_dir['basedir'])) {
29 28 return false;
30 29 }
31 30
32 - if ($session_id = SessionData::get_session_id()) {
33 - SessionData::set($session_id, 'log_type', 'file');
34 - }
31 + $data = ['log_type' => 'file'];
32 + Utils::update_session_data_by_id($data);
35 33
36 34 if (!is_dir($log_dir)) {
37 35 wp_mkdir_p($log_dir);
38 36 } else {