代码格式化

This commit is contained in:
2016-08-27 22:24:30 +08:00
parent db9e4b00e7
commit 1710eb742c
12 changed files with 418 additions and 395 deletions

View File

@@ -99,7 +99,7 @@ function rand_string($len = 6, $type = '', $addChars = '') {
break;
}
if ($len > 10) {
//位数过长重复字符串一定次数
//位数过长重复字符串一定次数
$chars = $type == 1 ? str_repeat($chars, $len) : str_repeat($chars, 5);
}
if ($type != 4) {
@@ -275,7 +275,7 @@ function get_file($file_id, $field = null) {
$file = db('File')->where(array('id' => $file_id))->find();
if ($field == 'path') {
return $file['savepath'];
}elseif ($field == 'time') {
} elseif ($field == 'time') {
return date('Y-m-d H:i:s', $file['create_time']);
}
return empty($field) ? $file : $file[$field];