mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
define constant fix
This commit is contained in:
@@ -12,14 +12,14 @@ class BackuAll extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'backup:all {--upload-to-google-drive}';
|
protected $signature = 'backup:all';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $description = 'Backup all data, include web root and database. options: --upload-to-google-drive';
|
protected $description = 'Backup all data, include web root and database.';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new command instance.
|
* Create a new command instance.
|
||||||
@@ -38,12 +38,11 @@ class BackuAll extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$uploadToGoogleDrive = $this->option('upload-to-google-drive');
|
|
||||||
$rep = new ToolRepository();
|
$rep = new ToolRepository();
|
||||||
$result = $rep->backupAll($uploadToGoogleDrive);
|
$result = $rep->backupAll();
|
||||||
$log = sprintf(
|
$log = sprintf(
|
||||||
'[%s], %s, uploadToGoogleDrive: %s, result: %s',
|
'[%s], %s, result: %s',
|
||||||
REQUEST_ID, __METHOD__, var_export($uploadToGoogleDrive, true), var_export($result, true)
|
REQUEST_ID, __METHOD__, var_export($result, true)
|
||||||
);
|
);
|
||||||
$this->info($log);
|
$this->info($log);
|
||||||
do_log($log);
|
do_log($log);
|
||||||
|
|||||||
@@ -60,8 +60,34 @@ class Test extends Command
|
|||||||
// $disk = Storage::disk('google_dirve');
|
// $disk = Storage::disk('google_dirve');
|
||||||
// $r = $disk->put('/', base_path('composer.json'));
|
// $r = $disk->put('/', base_path('composer.json'));
|
||||||
// $r = DB::table('users')->where('id', 1)->update(['modcomment' => DB::raw("concat_ws(',', 'ddddd', modcomment)")]);
|
// $r = DB::table('users')->where('id', 1)->update(['modcomment' => DB::raw("concat_ws(',', 'ddddd', modcomment)")]);
|
||||||
$user = User::query()->find(1);
|
|
||||||
$r = $user->peer_torrents;
|
$text = '[quote]转自PTer,感谢原制作者发布。[/quote]
|
||||||
|
[img]https://img9.doubanio.com/view/photo/l_ratio_poster/public/p2515853287.jpg[/img]
|
||||||
|
[img]https://pterclub.com/pic/PTerWEB.png[/img]
|
||||||
|
◎译 名 To us, From us / 再见18班
|
||||||
|
◎片 名 再见十八班
|
||||||
|
◎年 代 2018
|
||||||
|
◎产 地 中国大陆
|
||||||
|
◎类 别 剧情
|
||||||
|
◎语 言 汉语普通话
|
||||||
|
◎上映日期 2018-03-07(中国大陆)
|
||||||
|
◎IMDb评分 6.9/10 from 30 users
|
||||||
|
◎IMDb链接 https://www.imdb.com/title/tt7861446
|
||||||
|
◎豆瓣评分 6.7/10 from 7214 users
|
||||||
|
◎豆瓣链接 https://movie.douban.com/subject/30159456/
|
||||||
|
◎片 长 102分钟
|
||||||
|
◎主 演 柯焱曦 Yanxi Ke
|
||||||
|
熊婧文 Jingwen Xiong
|
||||||
|
秦海 Hai Qin
|
||||||
|
|
||||||
|
|
||||||
|
◎标 签 青春 | 校园 | 感动 | 成长 | 高中 | 回忆 | 老师 | 教师
|
||||||
|
|
||||||
|
◎简 介
|
||||||
|
|
||||||
|
梧桐中学高二十八班是远近闻名的问题班级,后进生、艺术生、体育生、不良少年聚集在此,以宋宸(柯焱曦 饰)为首的男生帮派和以秦淼淼(熊婧文 饰)为首的女生帮派互相不服,班级混乱无序。一天,高二十八班收到了一封信,这封信自称是由一年后的他们集体寄来。信上说,即将调来的班主任谭 睿明(秦海 饰)会改变十八班,成为对他们最重要的人。然而在一年后的未来,谭老师却永远地离开了他们。为了实现一段没有遗憾的青春,扭转历史,少年们决定按照信上所说,挑战一个个不可能实现的任务...';
|
||||||
|
|
||||||
|
$r = format_description($text);
|
||||||
dd($r);
|
dd($r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('NEXUS_START', LARAVEL_START);
|
defined('NEXUS_START') || define('NEXUS_START', LARAVEL_START);
|
||||||
define('IN_NEXUS', false);
|
defined('IN_NEXUS') || define('IN_NEXUS', false);
|
||||||
require dirname(__DIR__) . '/include/constants.php';
|
require dirname(__DIR__) . '/include/constants.php';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+12
-12
@@ -1,14 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
define('VERSION_NUMBER', '1.6.0-beta7');
|
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.6.0-beta7');
|
||||||
define('RELEASE_DATE', '2020-05-15');
|
defined('RELEASE_DATE') || define('RELEASE_DATE', '2020-05-15');
|
||||||
define('IN_TRACKER', true);
|
defined('IN_TRACKER') || define('IN_TRACKER', true);
|
||||||
define("PROJECTNAME","NexusPHP");
|
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||||
define("NEXUSPHPURL","https://nexusphp.org");
|
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||||
define("NEXUSWIKIURL","https://doc.nexusphp.org");
|
defined('NEXUSWIKIURL') || define("NEXUSWIKIURL","https://doc.nexusphp.org");
|
||||||
define("VERSION","Powered by <a href=\"aboutnexus.php\">".PROJECTNAME."</a>");
|
defined('VERSION') || define("VERSION","Powered by <a href=\"aboutnexus.php\">".PROJECTNAME."</a>");
|
||||||
define("THISTRACKER","General");
|
defined('THISTRACKER') || define("THISTRACKER","General");
|
||||||
$showversion = " - Powered by ".PROJECTNAME;
|
$showversion = " - Powered by ".PROJECTNAME;
|
||||||
define('ROOT_PATH', dirname(__DIR__) . '/');
|
defined('ROOT_PATH') || define('ROOT_PATH', dirname(__DIR__) . '/');
|
||||||
define('CURRENT_SCRIPT', strstr(basename($_SERVER['SCRIPT_FILENAME']), '.', true));
|
defined('CURRENT_SCRIPT') || define('CURRENT_SCRIPT', strstr(basename($_SERVER['SCRIPT_FILENAME']), '.', true));
|
||||||
define('IS_ANNOUNCE', CURRENT_SCRIPT == 'announce');
|
defined('IS_ANNOUNCE') || define('IS_ANNOUNCE', CURRENT_SCRIPT == 'announce');
|
||||||
define('REQUEST_ID', $_SERVER['HTTP_X_REQUEST_ID'] ?? $_SERVER['REQUEST_ID'] ?? str_pad(str_replace('.', '', NEXUS_START), 14, "0", STR_PAD_RIGHT));
|
defined('REQUEST_ID') || define('REQUEST_ID', $_SERVER['HTTP_X_REQUEST_ID'] ?? $_SERVER['REQUEST_ID'] ?? str_pad(str_replace('.', '', NEXUS_START), 14, "0", STR_PAD_RIGHT));
|
||||||
|
|||||||
@@ -4856,7 +4856,7 @@ function format_description(string $description)
|
|||||||
$quotePattern = '\[quote.*\].*\[\/quote\]';
|
$quotePattern = '\[quote.*\].*\[\/quote\]';
|
||||||
$pattern = "/($attachPattern)|($imgPattern)|($urlPattern)|($quotePattern)/isU";
|
$pattern = "/($attachPattern)|($imgPattern)|($urlPattern)|($quotePattern)/isU";
|
||||||
// $pattern = "/($attachPattern)|($imgPattern)|($urlPattern)/isU";
|
// $pattern = "/($attachPattern)|($imgPattern)|($urlPattern)/isU";
|
||||||
$delimiter = '{{||}}';
|
$delimiter = '{{__CYLX__}}';
|
||||||
$description = preg_replace_callback($pattern, function ($matches) use ($delimiter) {
|
$description = preg_replace_callback($pattern, function ($matches) use ($delimiter) {
|
||||||
return $delimiter . $matches[0] . $delimiter;
|
return $delimiter . $matches[0] . $delimiter;
|
||||||
}, $description);
|
}, $description);
|
||||||
|
|||||||
Reference in New Issue
Block a user