文件末尾添加换行符

This commit is contained in:
麦当苗儿
2013-04-15 16:16:53 +08:00
parent 0dc1abcbe5
commit 9b1a67881e
85 changed files with 102 additions and 113 deletions

View File

@@ -1 +1 @@
Org命名空间目录 Org命名空间目录

View File

@@ -223,5 +223,4 @@ class App {
//保证$_REQUEST正常取值 //保证$_REQUEST正常取值
$_REQUEST = array_merge($_POST,$_GET); $_REQUEST = array_merge($_POST,$_GET);
} }
}
}

View File

@@ -56,4 +56,4 @@ class Auto {
} }
return $data; return $data;
} }
} }

View File

@@ -62,4 +62,4 @@ class ContentReplace {
return $content; return $content;
} }
} }

View File

@@ -45,4 +45,4 @@ class LocationTemplate {
$templateFile = MODULE_PATH.'View/'.$template.'.html'; $templateFile = MODULE_PATH.'View/'.$template.'.html';
return $templateFile; return $templateFile;
} }
} }

View File

@@ -119,4 +119,4 @@ class ReadHtmlCacheBehavior {
return !method_exists($class,$action); return !method_exists($class,$action);
} }
} }

View File

@@ -87,4 +87,4 @@ class ShowPageTrace {
include Config::has('tmpl_trace_file')?Config::get('tmpl_trace_file'):THINK_PATH.'tpl/page_trace.tpl'; include Config::has('tmpl_trace_file')?Config::get('tmpl_trace_file'):THINK_PATH.'tpl/page_trace.tpl';
return ob_get_clean(); return ob_get_clean();
} }
} }

View File

@@ -58,4 +58,4 @@ class TokenBuildBehavior extends Behavior {
$token = '<input type="hidden" name="'.$tokenName.'" value="'.$tokenKey.'_'.$tokenValue.'" />'; $token = '<input type="hidden" name="'.$tokenName.'" value="'.$tokenKey.'_'.$tokenValue.'" />';
return $token; return $token;
} }
} }

View File

@@ -12,7 +12,6 @@
namespace Think; namespace Think;
class Cache { class Cache {
/** /**
* 操作句柄 * 操作句柄
* @var object * @var object
@@ -36,5 +35,4 @@ class Cache {
static public function __callStatic($method, $params){ static public function __callStatic($method, $params){
return call_user_func_array(array(self::$handler, $method), $params); return call_user_func_array(array(self::$handler, $method), $params);
} }
}
}

View File

@@ -98,4 +98,4 @@ class Apc {
public function clear() { public function clear() {
return apc_clear_cache(); return apc_clear_cache();
} }
} }

View File

@@ -143,4 +143,4 @@ class Db {
return $this->handler->execute('TRUNCATE TABLE `'.$this->options['table'].'`'); return $this->handler->execute('TRUNCATE TABLE `'.$this->options['table'].'`');
} }
} }

View File

@@ -98,4 +98,4 @@ class Eaccelerator {
public function clear() { public function clear() {
return ; return ;
} }
} }

View File

@@ -181,4 +181,4 @@ class File {
return true; return true;
} }
} }
} }

View File

@@ -110,4 +110,4 @@ class Memcache {
public function clear() { public function clear() {
return $this->handler->flush(); return $this->handler->flush();
} }
} }

View File

@@ -719,4 +719,4 @@ class SecacheClient{
trigger_error($errstr,$errno); trigger_error($errstr,$errno);
} }
} }

View File

@@ -96,4 +96,4 @@ class Simple {
$filename = $this->filename('*'); $filename = $this->filename('*');
array_map("unlink", glob($filename)); array_map("unlink", glob($filename));
} }
} }

View File

@@ -116,4 +116,4 @@ class Sqlite {
sqlite_query($this->handler, $sql); sqlite_query($this->handler, $sql);
return ; return ;
} }
} }

View File

@@ -100,4 +100,4 @@ class Wincache {
public function clear() { public function clear() {
return ; return ;
} }
} }

View File

@@ -103,4 +103,4 @@ class Xcache {
public function clear() { public function clear() {
return ; return ;
} }
} }

View File

@@ -88,4 +88,4 @@ class Config {
} }
return null; // 避免非法参数 return null; // 避免非法参数
} }
} }

View File

@@ -19,4 +19,4 @@ class Ini {
return parse_ini_string($config,true); return parse_ini_string($config,true);
} }
} }
} }

View File

@@ -26,4 +26,4 @@ class Xml {
} }
return $result; return $result;
} }
} }

View File

@@ -171,4 +171,4 @@ class Controller {
exit ; exit ;
} }
} }
} }

View File

@@ -26,4 +26,4 @@ abstract class Amf {
return ; return ;
} }
} }

View File

@@ -31,4 +31,4 @@ abstract class Phprpc {
echo $server->comment(); echo $server->comment();
} }
} }

View File

@@ -212,4 +212,4 @@ abstract class Rest {
} }
return false; return false;
} }
} }

View File

@@ -128,4 +128,4 @@ class Cookie {
} }
return; return;
} }
} }

View File

@@ -99,4 +99,4 @@ class Create {
file_put_contents(APP_PATH.$module.'/alias.php',"<?php\nreturn [\n];"); file_put_contents(APP_PATH.$module.'/alias.php',"<?php\nreturn [\n];");
} }
} }
} }

View File

@@ -71,4 +71,4 @@ class Crypt {
} }
return base64_decode($str); return base64_decode($str);
} }
} }

View File

@@ -107,4 +107,4 @@ class Db {
static public function __callStatic($method, $params){ static public function __callStatic($method, $params){
return call_user_func_array(array(self::$_instance, $method), $params); return call_user_func_array(array(self::$_instance, $method), $params);
} }
} }

View File

@@ -966,4 +966,4 @@ abstract class Driver {
// 关闭连接 // 关闭连接
$this->close(); $this->close();
} }
} }

View File

@@ -13,7 +13,7 @@ namespace Think\Db\Driver;
use Think\Db\Driver; use Think\Db\Driver;
/** /**
* PDO数据库驱动 * mysql数据库驱动
* @category Extend * @category Extend
* @package Extend * @package Extend
* @subpackage Driver.Db * @subpackage Driver.Db
@@ -72,4 +72,4 @@ class Mysql extends Driver{
return $key; return $key;
} }
} }

View File

@@ -113,24 +113,24 @@ class Oracle extends Driver{
/** /**
* 获取最后插入id ,仅适用于采用序列+触发器结合生成ID的方式 * 获取最后插入id ,仅适用于采用序列+触发器结合生成ID的方式
* 在config.php中指定 * 在config.php中指定
'DB_TRIGGER_PREFIX' => 'tr_', * 'DB_TRIGGER_PREFIX' => 'tr_',
'DB_SEQUENCE_PREFIX' => 'ts_', * 'DB_SEQUENCE_PREFIX' => 'ts_',
* eg:表 tb_user * eg:表 tb_user
相对tb_user的序列为 * 相对tb_user的序列为
-- Create sequence * -- Create sequence
create sequence TS_USER * create sequence TS_USER
minvalue 1 * minvalue 1
maxvalue 999999999999999999999999999 * maxvalue 999999999999999999999999999
start with 1 * start with 1
increment by 1 * increment by 1
nocache; * nocache;
相对tb_user,ts_user的触发器为 * 相对tb_user,ts_user的触发器为
create or replace trigger TR_USER * create or replace trigger TR_USER
before insert on "TB_USER" * before insert on "TB_USER"
for each row * for each row
begin * begin
select "TS_USER".nextval into :NEW.ID from dual; * select "TS_USER".nextval into :NEW.ID from dual;
end; * end;
* @access public * @access public
* @return integer * @return integer
*/ */
@@ -169,4 +169,4 @@ class Oracle extends Driver{
if(!$lock) return ''; if(!$lock) return '';
return ' FOR UPDATE NOWAIT '; return ' FOR UPDATE NOWAIT ';
} }
} }

View File

@@ -77,4 +77,4 @@ class Pgsql extends Driver{
return $limitStr; return $limitStr;
} }
} }

View File

@@ -87,4 +87,4 @@ class Sqlite extends Driver {
} }
return $limitStr; return $limitStr;
} }
} }

View File

@@ -128,4 +128,4 @@ class Sqlsrv extends Driver{
return $this->execute($sql); return $this->execute($sql);
} }
} }

View File

@@ -408,4 +408,4 @@ class Lite {
// 关闭连接 // 关闭连接
$this->close(); $this->close();
} }
} }

View File

@@ -109,4 +109,4 @@ class Debug {
}else }else
return $output; return $output;
} }
} }

View File

@@ -114,4 +114,4 @@ class Error {
include Config::get('exception_tmpl'); include Config::get('exception_tmpl');
exit; exit;
} }
} }

View File

@@ -13,4 +13,4 @@ namespace Think;
class Exception extends \Exception { class Exception extends \Exception {
} }

View File

@@ -219,4 +219,4 @@ class Filter {
} }
return $string; return $string;
} }
} }

View File

@@ -546,4 +546,4 @@ class Gd{
public function __destruct() { public function __destruct() {
empty($this->im) || imagedestroy($this->im); empty($this->im) || imagedestroy($this->im);
} }
} }

View File

@@ -588,4 +588,4 @@ class Imagick{
public function __destruct() { public function __destruct() {
empty($this->im) || $this->im->destroy(); empty($this->im) || $this->im->destroy();
} }
} }

View File

@@ -87,4 +87,4 @@ class Input {
$value .= ' '; $value .= ' ';
} }
} }
} }

View File

@@ -51,4 +51,4 @@ class Lang {
$name = strtolower($name); $name = strtolower($name);
return isset(self::$_lang[$range][$name]) ? self::$_lang[$range][$name] : $name; return isset(self::$_lang[$range][$name]) ? self::$_lang[$range][$name] : $name;
} }
} }

View File

@@ -227,5 +227,4 @@ class Loader {
} }
return $_instance[$identify]; return $_instance[$identify];
} }
}
}

View File

@@ -81,5 +81,4 @@ class Log {
static public function write($log,$level,$destination='') { static public function write($log,$level,$destination='') {
self::$storage && self::$storage->write("{$level}: {$log}",$destination); self::$storage && self::$storage->write("{$level}: {$log}",$destination);
} }
}
}

View File

@@ -40,4 +40,4 @@ class File {
rename($destination,dirname($destination).'/'.time().'-'.basename($destination)); rename($destination,dirname($destination).'/'.time().'-'.basename($destination));
error_log("[{$now}] ".$_SERVER['REMOTE_ADDR'].' '.$_SERVER['REQUEST_URI']."\r\n{$log}\r\n", 3,$destination); error_log("[{$now}] ".$_SERVER['REMOTE_ADDR'].' '.$_SERVER['REQUEST_URI']."\r\n{$log}\r\n", 3,$destination);
} }
} }

View File

@@ -1174,5 +1174,4 @@ class Model {
$this->$name = $value; $this->$name = $value;
return $this; return $this;
} }
}
}

View File

@@ -12,7 +12,6 @@
namespace Think\Model; namespace Think\Model;
class Lite { class Lite {
// 当前数据库操作对象 // 当前数据库操作对象
protected $db = null; protected $db = null;
// 数据库名称 // 数据库名称
@@ -232,4 +231,4 @@ class Lite {
return $this->db->getLastSql($this->name); return $this->db->getLastSql($this->name);
} }
} }

View File

@@ -68,5 +68,4 @@ class Oauth {
static public function call($api,$param='',$method='GET'){ static public function call($api,$param='',$method='GET'){
return self::$handler->call($api,$param,$method); return self::$handler->call($api,$param,$method);
} }
}
}

View File

@@ -230,4 +230,4 @@ abstract class Driver {
* 获取当前授权用户的用户信息 * 获取当前授权用户的用户信息
*/ */
abstract public function getOauthInfo(); abstract public function getOauthInfo();
} }

View File

@@ -90,4 +90,4 @@ class Baidu extends Driver{
} }
} }
} }

View File

@@ -90,4 +90,4 @@ class Diandian extends Driver{
} }
} }
} }

View File

@@ -88,4 +88,4 @@ class Douban extends Driver{
} }
} }
} }

View File

@@ -90,4 +90,4 @@ class Github extends Driver{
} }
} }
} }

View File

@@ -96,4 +96,4 @@ class Google extends Driver{
} }
} }
} }

View File

@@ -91,4 +91,4 @@ class Kaixin extends Driver{
} }
} }
} }

View File

@@ -97,4 +97,4 @@ class Msn extends Driver{
} }
} }
} }

View File

@@ -99,4 +99,4 @@ class Qq extends Driver{
E("获取腾讯QQ用户信息失败{$data['msg']}"); E("获取腾讯QQ用户信息失败{$data['msg']}");
} }
} }
} }

View File

@@ -113,4 +113,4 @@ class Renren extends Driver{
E("获取人人网用户信息失败:{$data['error_msg']}"); E("获取人人网用户信息失败:{$data['error_msg']}");
} }
} }
} }

View File

@@ -90,4 +90,4 @@ class Sina extends Driver{
} }
} }
} }

View File

@@ -90,4 +90,4 @@ class Sohu extends Driver{
} }
} }
} }

View File

@@ -92,4 +92,4 @@ class T163 extends Driver{
} }
} }
} }

View File

@@ -94,4 +94,4 @@ class Taobao extends Driver{
} }
} }
} }

View File

@@ -95,4 +95,4 @@ class Tencent extends Driver{
} }
} }
} }

View File

@@ -90,4 +90,4 @@ class X360 extends Driver{
} }
} }
} }

View File

@@ -29,4 +29,4 @@ class Parser {
static public function __callStatic($method, $params){ static public function __callStatic($method, $params){
return self::parse($params[0],$method); return self::parse($params[0],$method);
} }
} }

View File

@@ -287,5 +287,4 @@ class Ubb{
return [$addr, $text]; return [$addr, $text];
} }
} }

View File

@@ -423,4 +423,4 @@ class Route {
$_GET = array_merge($var,$_GET); $_GET = array_merge($var,$_GET);
} }
} }
} }

View File

@@ -19,4 +19,4 @@ class Driver extends SessionHandler {
$this->config = array_merge($this->config,$config); $this->config = array_merge($this->config,$config);
} }
} }

View File

@@ -157,4 +157,4 @@ class Session {
static public function __callStatic($name,$args) { static public function __callStatic($name,$args) {
self::operate($name); self::operate($name);
} }
} }

View File

@@ -81,5 +81,4 @@ class Tag {
} }
return ; return ;
} }
}
}

View File

@@ -717,4 +717,4 @@ class Template {
return $template; return $template;
} }
} }
} }

View File

@@ -42,4 +42,4 @@ class File {
} }
return true; return true;
} }
} }

View File

@@ -241,4 +241,4 @@ class TagLib {
public function getTags(){ public function getTags(){
return $this->tags; return $this->tags;
} }
} }

View File

@@ -611,5 +611,4 @@ class Cx extends TagLib {
$parseStr .= '<?php } ?>'; $parseStr .= '<?php } ?>';
return $parseStr; return $parseStr;
} }
}
}

View File

@@ -512,4 +512,4 @@ class Upload {
public function getErrorMsg() { public function getErrorMsg() {
return $this->error; return $this->error;
} }
} }

View File

@@ -148,4 +148,4 @@ class Url {
} }
return false; return false;
} }
} }

View File

@@ -186,4 +186,4 @@ class Validate {
$rule = $validate[strtolower($rule)]; $rule = $validate[strtolower($rule)];
return preg_match($rule,$value)===1; return preg_match($rule,$value)===1;
} }
} }

View File

@@ -225,4 +225,4 @@ class View {
// 输出模板文件 // 输出模板文件
echo $content; echo $content;
} }
} }

View File

@@ -25,4 +25,4 @@ class Think {
$this->template->fetch($template,$data); $this->template->fetch($template,$data);
} }
} }
} }

View File

@@ -226,4 +226,4 @@ function parse_name($name, $type=0) {
} else { } else {
return strtolower(trim(preg_replace("/[A-Z]/", "_\\0", $name), "_")); return strtolower(trim(preg_replace("/[A-Z]/", "_\\0", $name), "_"));
} }
} }

View File

@@ -55,4 +55,4 @@ return [
'db_rw_separate' => false, // 数据库读写是否分离 主从式有效 'db_rw_separate' => false, // 数据库读写是否分离 主从式有效
'db_master_num' => 1, // 读写分离后 主服务器数量 'db_master_num' => 1, // 读写分离后 主服务器数量
'db_slave_no' => '', // 指定从服务器序号 'db_slave_no' => '', // 指定从服务器序号
]; ];

View File

@@ -53,4 +53,4 @@ if(is_file(APP_PATH.'build.php')) { // 自动化创建脚本
Create::build(include APP_PATH.'build.php'); Create::build(include APP_PATH.'build.php');
} }
// 执行应用 // 执行应用
App::run(); App::run();