Skip to content

Commit

Permalink
Retire les caractères blancs en fin de ligne
Browse files Browse the repository at this point in the history
find . -type f -print -o -path './.git' \
-prune -o -path './cache' -prune \
| xargs sed --in-place 's/[ \t]\+$//g'
git checkout templates/marigolds/favicon.png

git diff | wc -l
2313

git diff --ignore-all-space | wc -l
0
  • Loading branch information
Sbgodin committed Jan 17, 2014
1 parent 5a69472 commit 965677b
Show file tree
Hide file tree
Showing 31 changed files with 338 additions and 338 deletions.
2 changes: 1 addition & 1 deletion .htaccess
Expand Up @@ -127,7 +127,7 @@ AddType text/x-vcard vcf
# <IfModule filter_module>
# FilterDeclare COMPRESS
# There are two way to configure the filters, according to the Apache version.
# Apache >= 2.4
# Apache >= 2.4
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
# FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
Expand Down
10 changes: 5 additions & 5 deletions Configuration.class.php
Expand Up @@ -12,7 +12,7 @@ class Configuration extends MysqlEntity{
protected $id,$key,$value,$confTab;
protected $TABLE_NAME = 'configuration';
protected $CLASS_NAME = 'Configuration';
protected $object_fields =
protected $object_fields =
array(
'id'=>'key',
'key'=>'longstring',
Expand All @@ -26,7 +26,7 @@ function __construct(){
public function getAll(){

if(!isset($_SESSION['configuration'])){

$configurationManager = new Configuration();
$configs = $configurationManager->populate();
$confTab = array();
Expand All @@ -36,7 +36,7 @@ public function getAll(){
}

$_SESSION['configuration'] = serialize($this->confTab);

}else{
$this->confTab = unserialize($_SESSION['configuration']);
}
Expand All @@ -52,7 +52,7 @@ public function put($key,$value){
if (isset($this->confTab[$key])){
$configurationManager->change(array('value'=>$value),array('key'=>$key));
} else {
$configurationManager->add($key,$value);
$configurationManager->add($key,$value);
}
$this->confTab[$key] = $value;
unset($_SESSION['configuration']);
Expand All @@ -66,7 +66,7 @@ public function add($key,$value){
$this->confTab[$key] = $value;
unset($_SESSION['configuration']);
}

function getId(){
return $this->id;
}
Expand Down
10 changes: 5 additions & 5 deletions Event.class.php
Expand Up @@ -11,7 +11,7 @@ class Event extends MysqlEntity{
protected $id,$title,$guid,$content,$description,$pudate,$link,$feed,$category,$creator,$unread,$favorite;
protected $TABLE_NAME = 'event';
protected $CLASS_NAME = 'Event';
protected $object_fields =
protected $object_fields =
array(
'id'=>'key',
'guid'=>'longstring',
Expand All @@ -28,15 +28,15 @@ class Event extends MysqlEntity{
'syncId'=>'integer',
);

protected $object_fields_index =
protected $object_fields_index =
array(
'feed'=>'index',
'unread'=>'index',
'favorite'=>'index'
);

function __construct($guid=null,$title=null,$description=null,$content=null,$pubdate=null,$link=null,$category=null,$creator=null){

$this->guid = $guid;
$this->title = $title;
$this->creator = $creator;
Expand All @@ -55,7 +55,7 @@ function getEventCountPerFolder(){
while($item = mysql_fetch_array($results)){
$events[$item[1]] = $item[0];
}

return $events;
}

Expand Down Expand Up @@ -155,7 +155,7 @@ function getSyncId(){
function setSyncId($syncId){
$this->syncId = $syncId;
}

function getUnread(){
return $this->unread;
}
Expand Down
20 changes: 10 additions & 10 deletions Feed.class.php
Expand Up @@ -11,7 +11,7 @@ class Feed extends MysqlEntity{
protected $id,$name,$url,$events=array(),$description,$website,$folder,$lastupdate;
protected $TABLE_NAME = 'feed';
protected $CLASS_NAME = 'Feed';
protected $object_fields =
protected $object_fields =
array(
'id'=>'key',
'name'=>'string',
Expand All @@ -21,14 +21,14 @@ class Feed extends MysqlEntity{
'lastupdate'=>'string',
'folder'=>'integer'
);
protected $object_fields_index =

protected $object_fields_index =
array(
'folder'=>'index'
);

protected $error = '';

function __construct($name=null,$url=null){
$this->name = $name;
$this->url = $url;
Expand All @@ -49,7 +49,7 @@ function getInfos(){
}

function getError() { return $this->error; }

/*@TODO: fournir un extrait quand il 'y a pas de description. De même pour les médias.
@TODO: SimplePie remplace "é" par "&eacute;", il ne devrait pas le faire.
J'ai testé set_stupidly_fast(true) sans succès.
Expand Down Expand Up @@ -92,7 +92,7 @@ function parse($syncId,&$nbEvents =0, $enableCache=true, $forceFeed=false){

$items = $feed->get_items();
$eventManager = new Event();

$events = array();
$iEvents = 0;
foreach($items as $item){
Expand Down Expand Up @@ -165,7 +165,7 @@ function parse($syncId,&$nbEvents =0, $enableCache=true, $forceFeed=false){
}
$query='UPDATE `'.MYSQL_PREFIX.'event` SET syncId='.$syncId.' WHERE id in (0'.$listid.');';
$myQuery = $this->customQuery($query);

$this->lastupdate = $_SERVER['REQUEST_TIME'];
$this->save();
return true;
Expand All @@ -189,7 +189,7 @@ function removeOldEvents($maxEvent, $currentSyncId){
///@TODO: escape the variables inside mysql
$this->customExecute($query);
}

function setId($id){
$this->id = $id;
}
Expand Down Expand Up @@ -256,12 +256,12 @@ function getFeedsPerFolder(){
while($item = mysql_fetch_array($results)){
$name = $item['name'];
$feedsIdMap[$item['id']]['name'] = $name;


$feedsFolderMap[$item['folder']][$item['id']]['id'] = $item['id'];
$feedsFolderMap[$item['folder']][$item['id']]['name'] = $name;
$feedsFolderMap[$item['folder']][$item['id']]['url'] = $item['url'];

}
}
$feeds['folderMap'] = $feedsFolderMap;
Expand Down
4 changes: 2 additions & 2 deletions Folder.class.php
Expand Up @@ -11,7 +11,7 @@ class Folder extends MysqlEntity{
protected $id,$name,$parent,$isopen;
protected $TABLE_NAME = 'folder';
protected $CLASS_NAME = 'Folder';
protected $object_fields =
protected $object_fields =
array(
'id'=>'key',
'name'=>'string',
Expand Down Expand Up @@ -41,7 +41,7 @@ function getEvents($start=0,$limit=10000,$order,$columns='*'){
unset($object);
}
}

return $objects;
}

Expand Down
6 changes: 3 additions & 3 deletions Functions.class.php
Expand Up @@ -282,7 +282,7 @@ public static function hexaValue($str){
$code = substr($code, 0, 6);
return $code;
}

public static function scanRecursiveDir($dir){
$files = scandir($dir);
$allFiles = array();
Expand Down Expand Up @@ -326,7 +326,7 @@ public static function relativePath($from, $to, $ps = '/') {
}
return str_pad("", count($arFrom) * 3, '..'.$ps).implode($ps, $arTo);
}


// Nettoyage de l'url avant la mise en base
public static function clean_url( $url ) {
Expand Down Expand Up @@ -354,6 +354,6 @@ public static function testDb($server, $login, $pass, $db=null) {
mysql_close($link);
return true;
}

}
?>
18 changes: 9 additions & 9 deletions MysqlConnector.class.php
@@ -1,9 +1,9 @@
<?php

/*
@nom: mysql
@auteur: Idleman (idleman@idleman.fr)
@date de création:
@date de création:
@description: Classe de gestion des connexions Mysql
*/

Expand All @@ -18,12 +18,12 @@ class MysqlConnector
public $debug=0;
private $connection = null;
public static $instance = null;

private function __construct(){
$this->connect();
}



/**
* Methode de recuperation unique de l'instance
Expand All @@ -32,23 +32,23 @@ private function __construct(){
* @param <Aucun>
* @return <mysql> $instance
*/

public static function getInstance(){

if (MysqlConnector::$instance === null) {
MysqlConnector::$instance = new self();
MysqlConnector::$instance = new self();
}
return MysqlConnector::$instance;
}



public function connect(){
$this->connection = mysql_connect(MYSQL_HOST,MYSQL_LOGIN,MYSQL_MDP);
mysql_query('SET NAMES utf8');
mysql_select_db(MYSQL_BDD,$this->connection);
}



public function __toString(){
Expand Down

0 comments on commit 965677b

Please sign in to comment.