diff --git a/.travis.yml b/.travis.yml index 85ec6e52d..037aaec56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,10 +62,10 @@ script: - chmod +x $TRAVIS_BUILD_DIR/travis/install-nginx.sh - $TRAVIS_BUILD_DIR/travis/install-nginx.sh - chown -R $(whoami):$(whoami) $TRAVIS_BUILD_DIR/app/storage - - chmod +x $TRAVIS_BUILD_DIR/app/storage + - chmod +x $TRAVIS_BUILD_DIR/storage - curl "http://masterlab.ci:8888/framework/feature/getPhpIni?data_type=json" - cat /tmp/error.log - - touch $TRAVIS_BUILD_DIR/app/storage/tmp/10000.png + - touch $TRAVIS_BUILD_DIR/storage/tmp/10000.png - php app/public/test_mysql.php - cd app/test - sudo chmod +x $TRAVIS_BUILD_DIR diff --git a/app/classes/UploadLogic.php b/app/classes/UploadLogic.php index 48d0e5ee9..9b12a830c 100644 --- a/app/classes/UploadLogic.php +++ b/app/classes/UploadLogic.php @@ -30,7 +30,7 @@ public function __construct($issueId = null) } /** - * 统一的上传处理逻辑,根据文件类型上传至 app/storage/attachment 下 + * 统一的上传处理逻辑,根据文件类型上传至 /storage/attachment 下 * @param string $fieldName * @param string $fileType * @param string $uuid @@ -42,18 +42,14 @@ public function __construct($issueId = null) */ public function move($fieldName, $fileType, $uuid = '', $originName = '', $originFileSize = 0, $tmpIssueId = '') { - $settings = Settings::getInstance()->attachment(); //文件保存目录路径 $savePath = $settings['attachment_dir']; //最大文件大小 $max_size = $settings['attachment_size']; - //文件保存目录URL $saveUrl = ATTACHMENT_URL; - $relatePath = ''; - //定义允许上传的文件扩展名 $extArr = array( 'project_image' => array('jpg', 'jpeg', 'png', 'gif'), diff --git a/app/ctrl/admin/LogOperating.php b/app/ctrl/admin/LogOperating.php index 8e2173fb7..cdcae9223 100644 --- a/app/ctrl/admin/LogOperating.php +++ b/app/ctrl/admin/LogOperating.php @@ -5,7 +5,6 @@ use main\app\classes\LogOperatingLogic; use main\app\classes\PermissionGlobal; -use main\app\classes\SlowLogLogic; use main\app\classes\UserAuth; use main\app\ctrl\BaseAdminCtrl; use main\app\model\LogOperatingModel; diff --git a/app/globals.php b/app/globals.php index 97e18370c..23be88db5 100644 --- a/app/globals.php +++ b/app/globals.php @@ -73,7 +73,7 @@ function bindAppConfig($envVarArr) $appStatus = $envVarArr['APP_STATUS']; // 加载主配置文件 config.yml @todo 使用yaml扩展函数将更高效 - $cacheYamlConfigFile = APP_PATH . 'storage/cache/config.' . $appStatus . '.yaml.php'; + $cacheYamlConfigFile = PRE_APP_PATH . 'storage/cache/config.' . $appStatus . '.yaml.php'; if ($cacheYamlConfig && file_exists($cacheYamlConfigFile)) { include $cacheYamlConfigFile; if (isset($_yaml_config) && !empty($_yaml_config)) { diff --git a/app/model/DbModel.php b/app/model/DbModel.php index 06e799620..00a9fbc4a 100644 --- a/app/model/DbModel.php +++ b/app/model/DbModel.php @@ -240,7 +240,6 @@ public function commit() return $this->db->commit(); } - /** * 执行更新性的SQL语句 ,返回受修改或删除 SQL语句影响的行数。如果没有受影响的行,则返回 0。失败返回false * @param string $sql diff --git a/app/view/twig/admin/system/system_backup_data.twig b/app/view/twig/admin/system/system_backup_data.twig index 241b72942..c5ecc3505 100644 --- a/app/view/twig/admin/system/system_backup_data.twig +++ b/app/view/twig/admin/system/system_backup_data.twig @@ -52,7 +52,7 @@

由于数据会比较复杂,可能会延迟一段时间才能完成。


你可以通过备份将MasterLab数据转移到不同的数据库或其他MasterLab实例。备份文件保存在服务器上

-

备份路径为 masterlab/app/storage/backup 请确保该路径有写入权限

+

备份路径为 masterlab/storage/backup 请确保该路径有写入权限

diff --git a/composer.json b/composer.json index 2d31ae191..f68ff2c66 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "phpoffice/phpspreadsheet": "1.9.0", "twig/twig": "v2.12.2", "adldap2/adldap2": "10.2", - "doctrine/dbal": "^2.10", + "doctrine/dbal": "2.10", "doctrine/event-manager":"1.1.0", "doctrine/inflector":"1.3.1", "symfony/event-dispatcher": "4.4.6", @@ -27,9 +27,9 @@ "ext-pdo": "*", "ext-curl": "*", "ext-redis": "*", - "lcobucci/jwt": "^3.3", - "lasserafn/php-initial-avatar-generator": "^4.1", - "dragonmantank/cron-expression": "^3.0" + "lcobucci/jwt": "3.3", + "lasserafn/php-initial-avatar-generator": "4.1", + "dragonmantank/cron-expression": "3.0" }, "require-dev": { "phpunit/phpunit": "7.0", diff --git a/lib/SlowLog.php b/lib/SlowLog.php index 17122dda7..3af05de2d 100644 --- a/lib/SlowLog.php +++ b/lib/SlowLog.php @@ -15,7 +15,7 @@ class SlowLog * @param string $storagePath * @return SlowLog */ - public static function getInstance($storagePath = APP_PATH.'storage/log/slow/sql') + public static function getInstance($storagePath = STORAGE_PATH.'log/slow/sql') { $index = md5($storagePath); if (!isset(self::$instance[$index]) || !is_object(self::$instance[$index])) { @@ -24,7 +24,7 @@ public static function getInstance($storagePath = APP_PATH.'storage/log/slow/sql return self::$instance[$index]; } - public function __construct($storagePath = APP_PATH.'storage/log/slow/sql') + public function __construct($storagePath = STORAGE_PATH.'log/slow/sql') { $this->pattern = new Pattern(); $this->storage_path = $storagePath; diff --git a/public/index.php b/public/index.php index 7118400f3..a835d0a1e 100644 --- a/public/index.php +++ b/public/index.php @@ -10,6 +10,7 @@ $hornetConfig = new \stdClass(); $hornetConfig->currentApp = APP_NAME; $hornetConfig->appPath = APP_PATH; +$hornetConfig->storagePath = STORAGE_PATH; $hornetConfig->appStatus = APP_STATUS; $hornetConfig->enableTrace = ENABLE_TRACE; $hornetConfig->enableXhprof = ENABLE_XHPROF;