Revert "修复各种E_NOTICE下的问题"

revert-25-master
warlee 2015-08-28 11:45:24 +08:00
parent 7d86126102
commit dc1ad5b5d6
5 changed files with 13 additions and 18 deletions

View File

@ -97,7 +97,7 @@ if (strtoupper(substr(PHP_OS, 0,3)) === 'WIN') {
} }
$in = parse_incoming(); $in = parse_incoming();
@session_start(); session_start();
session_write_close();//避免session锁定问题;之后要修改$_SESSION 需要先调用session_start() session_write_close();//避免session锁定问题;之后要修改$_SESSION 需要先调用session_start()
$config['autorun'] = array( $config['autorun'] = array(
array('controller'=>'user','function'=>'loginCheck'), array('controller'=>'user','function'=>'loginCheck'),

View File

@ -101,12 +101,9 @@ class explorer extends Controller{
} }
//回收站不记录前进后退 //回收站不记录前进后退
if (isset($this->in['type'])){
if($this->in['path'] != '*recycle*/' && $this->in['type'] !=='desktop'){ if($this->in['path'] != '*recycle*/' && $this->in['type'] !=='desktop'){
$_SESSION['this_path']=$user_path; $_SESSION['this_path']=$user_path;
} }
}
$list=$this->path($this->path); $list=$this->path($this->path);
$list['history_status']= array('back'=>$hi->isback(),'next'=>$hi->isnext()); $list['history_status']= array('back'=>$hi->isback(),'next'=>$hi->isnext());
show_json($list); show_json($list);
@ -257,7 +254,7 @@ class explorer extends Controller{
} }
$state = $error==0?true:false; $state = $error==0?true:false;
$info = $success.' success,'.$error.' error'; $info = $success.' success,'.$error.' error';
if ($error==0) { if (count($info_list) == 1 && $error==0) {
$info = $this->L['remove_success']; $info = $this->L['remove_success'];
} }
show_json($info,$state); show_json($info,$state);
@ -394,7 +391,7 @@ class explorer extends Controller{
} }
public function pathPast(){ public function pathPast(){
if (!isset($_SESSION['path_copy'])){ if (!isset($_SESSION['path_copy'])){
show_json($this->L['clipboard_null'],false,array()); show_json($this->L['clipboard_null'],false,$data);
} }
session_start();//re start session_start();//re start

View File

@ -50,9 +50,8 @@ function iconv_system($str){
} }
function get_filesize($path){ function get_filesize($path){
// 某些情况下filesize会出错 return abs(sprintf("%u",filesize($path)));
@$ret = abs(sprintf("%u",filesize($path))); }
return (int)$ret;}
/** /**
* 获取文件详细信息 * 获取文件详细信息
* 文件名从程序编码转换成系统编码,传入utf8系统函数需要为gbk * 文件名从程序编码转换成系统编码,传入utf8系统函数需要为gbk
@ -131,7 +130,7 @@ function get_path_ext($path){
//自动获取不重复文件(夹)名 //自动获取不重复文件(夹)名
//如果传入$file_add 则检测存在则自定重命名 a.txt 为a{$file_add}.txt //如果传入$file_add 则检测存在则自定重命名 a.txt 为a{$file_add}.txt
function get_filename_auto($path,$file_add = ""){ function get_filename_auto($path,$file_add){
$i=1; $i=1;
$father = get_path_father($path); $father = get_path_father($path);
$name = get_path_this($path); $name = get_path_this($path);
@ -292,8 +291,7 @@ function path_haschildren($dir,$check_file=false){
if ($check_file) {//有子目录或者文件都说明有子内容 if ($check_file) {//有子目录或者文件都说明有子内容
if(is_dir($fullpath.'/') || is_file($fullpath)) return true; if(is_dir($fullpath.'/') || is_file($fullpath)) return true;
}else{//只检查有没有文件 }else{//只检查有没有文件
@$ret =(is_dir($fullpath.'/')); if(is_dir($fullpath.'/')) return true;
return (bool)$ret;
} }
} }
} }
@ -630,8 +628,8 @@ function file_download_this($from, $file_name){
} }
//下载完成,重命名临时文件到目标文件 //下载完成,重命名临时文件到目标文件
del_file($file_name); del_file($file_name);
$rename_ret = @rename($temp_file,$file_name); rename($temp_file,$file_name);
return (bool)$rename_ret; return true;
}else{ }else{
return false; return false;
} }

View File

@ -89,7 +89,7 @@ http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script src="<?php echo STATIC_PATH;?>js/lib/ace/src-min-noconflict/ace.js?ver=<?php echo KOD_VERSION;?>"></script> <script src="<?php echo STATIC_PATH;?>js/lib/ace/src-min-noconflict/ace.js?ver=<?php echo KOD_VERSION;?>"></script>
<script src="<?php echo STATIC_PATH;?>js/lib/ace/src-min-noconflict/ext-language_tools.js?ver=<?php echo KOD_VERSION;?>"></script> <script src="<?php echo STATIC_PATH;?>js/lib/ace/src-min-noconflict/ext-language_tools.js?ver=<?php echo KOD_VERSION;?>"></script>
<script type="text/javascript"> <script type="text/javascript">
G.frist_file = "<?php echo (isset($_GET['filename']) ? $_GET['filename'] : '') ;?>"; G.frist_file = "<?php echo $_GET['filename'];?>";
G.code_config = <?php echo $editor_config;?>; G.code_config = <?php echo $editor_config;?>;
G.code_theme_all = "<?php echo $config['setting_all']['codethemeall']?>"; G.code_theme_all = "<?php echo $config['setting_all']['codethemeall']?>";
seajs.config({ seajs.config({

View File

@ -50,7 +50,7 @@
<script src="<?php echo STATIC_PATH;?>js/lib/seajs/sea.js?ver=<?php echo KOD_VERSION;?>"></script> <script src="<?php echo STATIC_PATH;?>js/lib/seajs/sea.js?ver=<?php echo KOD_VERSION;?>"></script>
<script src="./index.php?user/common_js#id=<?php echo rand_string(8);?>"></script> <script src="./index.php?user/common_js#id=<?php echo rand_string(8);?>"></script>
<script type="text/javascript"> <script type="text/javascript">
G.project = "<?php echo (isset($_GET['project']) ? $_GET['project'] : '') ;?>"; G.project = "<?php echo $_GET['project'];?>";
seajs.config({ seajs.config({
base: "<?php echo STATIC_PATH;?>js/", base: "<?php echo STATIC_PATH;?>js/",
preload: ["lib/jquery-1.8.0.min"], preload: ["lib/jquery-1.8.0.min"],