| @@ -1,14 +1,15 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Templately\Core\Importer\Utils; |
| 3 | 3 | |
| 4 | 4 | use Templately\Core\Importer\FullSiteImport; |
| 5 | +use Templately\Utils\Helper; | |
| 5 | 6 | |
| 6 | 7 | class LogHandler { |
| 7 | 8 | public static function get_log_dir() { |
| 8 | - $upload_dir = wp_upload_dir(); | |
| 9 | - $log_dir = trailingslashit($upload_dir['basedir']) . 'templately' . DIRECTORY_SEPARATOR . 'log' . DIRECTORY_SEPARATOR; | |
| 10 | - return $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'); | |
| 11 | 12 | } |
| 12 | 13 | |
| 13 | 14 | public static function get_log_file_path() { |
| 14 | 15 | $session_id = SessionData::get_session_id(); |