Browse Source

修正sqlite3的问题,优化命令行工具

tags/6.1.0^2
llgoer 2 years ago
parent
commit
89bf627ca2
16 changed files with 56 additions and 9 deletions
  1. +5
    -3
      .gitignore
  2. +9
    -3
      dedebiz
  3. +8
    -0
      src/admin/dialog/select_mimages.php
  4. +2
    -0
      src/data/admin/allowurl.txt
  5. +11
    -0
      src/data/admin/config_update.php
  6. +1
    -0
      src/data/admin/idc.txt
  7. +1
    -0
      src/data/admin/index.html
  8. +5
    -0
      src/data/admin/quickmenu-1.txt
  9. +3
    -0
      src/data/admin/quickmenu.txt
  10. +4
    -0
      src/data/admin/source.txt
  11. +1
    -0
      src/data/admin/ver.txt
  12. +1
    -0
      src/data/admin/verifies.txt
  13. +1
    -0
      src/data/admin/writer.txt
  14. +1
    -0
      src/data/cache/index.html
  15. +1
    -0
      src/data/tplcache/index.html
  16. +2
    -3
      src/system/database/dedesqlite.class.php

+ 5
- 3
.gitignore View File

@@ -1,7 +1,10 @@
.DS_Store
src/data/tplcache/
src/data/tplcache/*.inc
src/data/tplcache/*.txt
src/data/sessions*
src/data/cache/
src/data/cache/*.inc
src/data/cache/*.dat
src/data/cache/*/
src/data/common.inc.php
src/data/config.cache.bak.php
src/data/config.cache.inc.php
@@ -14,7 +17,6 @@ src/uploads/allimg/*
src/.txt
src/data/enums/
src/index.html
src/data/admin/
src/data/module/
src/uploads/*.php
src/data/time.lock.inc


+ 9
- 3
dedebiz View File

@@ -310,7 +310,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) {
$fp = fopen($workDir."/install/common.inc.php","r");
$configStr1 = fread($fp,filesize($workDir."/install/common.inc.php"));
fclose($fp);
@chmod($workDir."/../data",0777);
@chmod($workDir."/data",0777);
$dbtype = "sqlite";
$dbhost = "";
$dbname = "DedeBIZ";
@@ -319,6 +319,8 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) {
$dbprefix = "dede_";
$dblang = "utf8";

mkdir($workDir.'/data/tplcache', 0777);

//common.inc.php
$configStr1 = str_replace("~dbtype~",$dbtype,$configStr1);
$configStr1 = str_replace("~dbhost~",$dbhost,$configStr1);
@@ -348,11 +350,11 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) {
$configStr2 = str_replace("~webname~",$webname,$configStr2);
$configStr2 = str_replace("~adminmail~",$adminmail,$configStr2);

$fp = fopen($workDir.'/../data/config.cache.inc.php','w');
$fp = fopen($workDir.'/data/config.cache.inc.php','w');
fwrite($fp,$configStr2);
fclose($fp);

$fp = fopen($workDir.'/../data/config.cache.bak.php','w');
$fp = fopen($workDir.'/data/config.cache.bak.php','w');
fwrite($fp,$configStr2);
fclose($fp);

@@ -462,6 +464,10 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) {
if (phpversion() < "5.4") {
die("DedeBIZ:command web server not support\n\n");
}

// 写入安装程序锁
file_put_contents($workDir.'/install/install_lock.txt', 'ok');

echo "Start Dev Server For DedeBIZ\n\r";
echo "Open http://localhost:8088\n\r";
passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./'));


+ 8
- 0
src/admin/dialog/select_mimages.php View File

@@ -74,11 +74,19 @@ button+button{margin-left:10px}
el.setAttribute('data-num',i);
});
}
function isFileImage(file) {
return file && file['type'].split('/')[0] === 'image';
}
function addList(files){
var files_sum = files.length;
var vDom = document.createDocumentFragment();
for(let i=0;i<files_sum;i++){
let file = files[i];
if (!isFileImage(file)) {
alert("选择非图片文件无法上传")
return;
}
console.log(file);
let blobUrl = window.URL.createObjectURL(file)
axupimgs.res.push({file:file,blobUrl:blobUrl,url:''});
let li = document.createElement('li');


+ 2
- 0
src/data/admin/allowurl.txt View File

@@ -0,0 +1,2 @@
www.dedebiz.com
www.zhelixie.com

+ 11
- 0
src/data/admin/config_update.php View File

@@ -0,0 +1,11 @@
<?php

/**
* @version $Id: config_update.php 1 11:36 2011-2-21 tianya $
* @package DedeBIZ.Administrator
* @copyright Copyright (c) 2022, DedeBIZ.COM
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/

//更新服务器,如果有变动,请到 https://www.dedebiz.com 查询

+ 1
- 0
src/data/admin/idc.txt View File

@@ -0,0 +1 @@
暂无相关信息

+ 1
- 0
src/data/admin/index.html View File

@@ -0,0 +1 @@
dir

+ 5
- 0
src/data/admin/quickmenu-1.txt View File

@@ -0,0 +1,5 @@
<menu:item ico="images/addnews.gif" link="content_list.php" title="文档列表" />
<menu:item ico="images/menuarrow.gif" link="feedback_main.php" title="评论管理" />
<menu:item ico="images/manage1.gif" link="public_guide.php" title="内容发布" />
<menu:item ico="images/file_dir.gif" link="catalog_main.php" title="栏目管理" />
<menu:item ico="images/manage1.gif" link="sys_info.php" title="修改参数" />

+ 3
- 0
src/data/admin/quickmenu.txt View File

@@ -0,0 +1,3 @@
<menu:item ico="images/addnews.gif" link="content_list.php" title="文档列表" />
<menu:item ico="images/menuarrow.gif" link="feedback_main.php" title="评论管理" />
<menu:item ico="images/manage1.gif" link="public_guide.php" title="内容发布" />

+ 4
- 0
src/data/admin/source.txt View File

@@ -0,0 +1,4 @@
DedeBIZ
今日头条
微信公众号
百家号

+ 1
- 0
src/data/admin/ver.txt View File

@@ -0,0 +1 @@
20220305

+ 1
- 0
src/data/admin/verifies.txt View File

@@ -0,0 +1 @@
20201022

+ 1
- 0
src/data/admin/writer.txt View File

@@ -0,0 +1 @@
秩名,网络,消息

+ 1
- 0
src/data/cache/index.html View File

@@ -0,0 +1 @@
dir

+ 1
- 0
src/data/tplcache/index.html View File

@@ -0,0 +1 @@
dir

+ 2
- 3
src/system/database/dedesqlite.class.php View File

@@ -129,14 +129,13 @@ class DedeSqlite
//为了防止采集等需要较长运行时间的程序超时,在运行这类程序时设置系统等待和交互时间
function SetLongLink()
{
@mysqli_query("SET interactive_timeout=3600, wait_timeout=3600 ;", $this->linkID);
// @mysqli_query("SET interactive_timeout=3600, wait_timeout=3600 ;", $this->linkID);
}
//获得错误描述
function GetError()
{
$str = mysqli_error($this->linkID);
return $str;
return $this->linkID->lastErrorMsg();
}
//关闭数据库


Loading…
Cancel
Save