Browse Source

Retire les caractères blancs en fin de ligne

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
Christophe HENRY 5 years ago
parent
commit
965677b549

+ 1 - 1
.htaccess

@@ -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

+ 5 - 5
Configuration.class.php

@@ -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',
@@ -26,7 +26,7 @@ class Configuration extends MysqlEntity{
 	public function getAll(){
 
 		if(!isset($_SESSION['configuration'])){
-	
+
 		$configurationManager = new Configuration();
 		$configs = $configurationManager->populate();
 		$confTab = array();
@@ -36,7 +36,7 @@ class Configuration extends MysqlEntity{
 		}
 
 		$_SESSION['configuration'] = serialize($this->confTab);
-		
+
 		}else{
 			$this->confTab = unserialize($_SESSION['configuration']);
 		}
@@ -52,7 +52,7 @@ class Configuration extends MysqlEntity{
 		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']);
@@ -66,7 +66,7 @@ class Configuration extends MysqlEntity{
 		$this->confTab[$key] = $value;
 		unset($_SESSION['configuration']);
 	}
-	
+
 	function getId(){
 		return $this->id;
 	}

+ 5 - 5
Event.class.php

@@ -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',
@@ -28,7 +28,7 @@ class Event extends MysqlEntity{
 		'syncId'=>'integer',
 	);
 
-	protected $object_fields_index = 
+	protected $object_fields_index =
 	array(
 		'feed'=>'index',
 		'unread'=>'index',
@@ -36,7 +36,7 @@ class Event extends MysqlEntity{
 	);
 
 	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;
@@ -55,7 +55,7 @@ class Event extends MysqlEntity{
 		while($item = mysql_fetch_array($results)){
 			$events[$item[1]] = $item[0];
 		}
-		
+
 		return $events;
 	}
 
@@ -155,7 +155,7 @@ class Event extends MysqlEntity{
 	function setSyncId($syncId){
 		$this->syncId = $syncId;
 	}
-	
+
 	function getUnread(){
 		return $this->unread;
 	}

+ 10 - 10
Feed.class.php

@@ -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',
@@ -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;
@@ -49,7 +49,7 @@ class Feed extends MysqlEntity{
 	}
 
 	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.
@@ -92,7 +92,7 @@ class Feed extends MysqlEntity{
 
 		$items = $feed->get_items();
 		$eventManager = new Event();
-				
+
 		$events = array();
 		$iEvents = 0;
 		foreach($items as $item){
@@ -165,7 +165,7 @@ class Feed extends MysqlEntity{
 		}
 		$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;
@@ -189,7 +189,7 @@ class Feed extends MysqlEntity{
 		///@TODO: escape the variables inside mysql
  		$this->customExecute($query);
 	}
-	
+
 	function setId($id){
 		$this->id = $id;
 	}
@@ -256,12 +256,12 @@ class Feed extends MysqlEntity{
 			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;

+ 2 - 2
Folder.class.php

@@ -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',
@@ -41,7 +41,7 @@ class Folder extends MysqlEntity{
 					unset($object);
 			}
 		}
-		
+
 		return $objects;
 	}
 

+ 3 - 3
Functions.class.php

@@ -282,7 +282,7 @@ class Functions
 		  $code = substr($code, 0, 6);
 		  return $code;
 	}
-	
+
 	public static function scanRecursiveDir($dir){
 		$files = scandir($dir);
 		$allFiles = array();
@@ -326,7 +326,7 @@ class Functions
 		}
 		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 ) {
@@ -354,6 +354,6 @@ class Functions
 		mysql_close($link);
 		return true;
 	}
-		
+
 }
 ?>

+ 9 - 9
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
 */
 
@@ -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
@@ -32,23 +32,23 @@ class MysqlConnector
 	* @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(){

+ 23 - 23
MysqlEntity.class.php

@@ -6,18 +6,18 @@ require_once('MysqlConnector.class.php');
 	@auteur: Valentin CARRUESCO (valentincarruesco@yahoo.fr)
 	@date de création: 16/04/2012 02:34:15
 	@description: Classe parent de tous les modèles (classe entitées) liées a la base de donnée,
-	 cette classe est configuré pour agir avec une base MySQL, mais il est possible de redefinir ses codes SQL pour l'adapter à un autre SGBD sans affecter 
+	 cette classe est configuré pour agir avec une base MySQL, mais il est possible de redefinir ses codes SQL pour l'adapter à un autre SGBD sans affecter
 	 le reste du code du projet.
 
 */
 
 class MysqlEntity
 {
-	
+
 	private $debug = false;
 	private $debugAllQuery = false;
 
-		
+
 	function sgbdType($type){
 		$return = false;
 		switch($type){
@@ -44,17 +44,17 @@ class MysqlEntity
 		}
 		return $return ;
 	}
-	
+
 	/**
 	 * Protège une variable pour MySQL
 	 */
 	protected function secure($value, $field){
 		$type = false;
-		
+
 		// ce champ n'existe pas : on le considère comme une chaîne de caractères
 		if (isset($this->object_fields[$field]))
 			$type = $this->object_fields[$field];
-		
+
 		$return = false;
 		switch($type){
 			case 'key':
@@ -72,13 +72,13 @@ class MysqlEntity
 		}
 		return $return ;
 	}
-	
+
 	public function __construct(){
 		MysqlConnector::getInstance();
 	}
 
 	public function __destruct(){
-		
+
 	}
 
 	// GESTION SQL
@@ -138,7 +138,7 @@ class MysqlEntity
 		if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
 		$myQuery = $this->customQuery($query);
 	}
-	
+
 	public function massiveInsert($events){
 		if (empty($events)) return;
 		$query = 'INSERT INTO `'.MYSQL_PREFIX.$this->TABLE_NAME.'`(';
@@ -153,9 +153,9 @@ class MysqlEntity
 			$u = false;
 
 			foreach($events as $event){
-				
+
 					if($u){$query .=' union select ';}else{$u=true;}
-					
+
 					$i=false;
 					foreach($event->object_fields as $field=>$type){
 						if($type!='key'){
@@ -163,13 +163,13 @@ class MysqlEntity
 							$query .='"'.$this->secure($event->$field, $field).'"';
 						}
 					}
-				
-			
+
+
 			}
 
 			$query .=';';
 			if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
-		
+
 		$this->customQuery($query);
 	}
 
@@ -231,7 +231,7 @@ class MysqlEntity
 			if($i){$query .=',';}else{$i=true;}
 			$query .= '`'.$column.'`="'.$this->secure($value, $column).'" ';
 		}
-		$query .=' WHERE '; 
+		$query .=' WHERE ';
 
 		$i = false;
 		foreach ($columns2 as $column=>$value){
@@ -271,7 +271,7 @@ class MysqlEntity
 	public function loadAll($columns,$order=null,$limit=null,$operation="=",$debug=false,$selColumn='*'){
 		$objects = array();
 		$whereClause = '';
-	
+
 			if($columns!=null && sizeof($columns)!=0){
 			$whereClause .= ' WHERE ';
 				$i = false;
@@ -359,8 +359,8 @@ class MysqlEntity
 		$myQuery = $this->customQuery($query);
 		$number = mysql_fetch_array($myQuery);
 		return $number[0];
-	}	
-	
+	}
+
 	/**
 	* Méthode de suppression d'éléments de l'entité
 	* @author Valentin CARRUESCO
@@ -382,7 +382,7 @@ class MysqlEntity
 			$query = 'DELETE FROM `'.MYSQL_PREFIX.$this->TABLE_NAME.'` WHERE '.$whereClause.' ;';
 			if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
 			$this->customQuery($query);
-		
+
 	}
 
 	///@TODO: pourquoi deux méthodes différentes qui font la même chose ?
@@ -402,7 +402,7 @@ class MysqlEntity
 		}
 		return $result;
 	}
-	
+
 
 	// ACCESSEURS
 		/**
@@ -412,16 +412,16 @@ class MysqlEntity
 	* @param Aucun
 	* @return <Attribute> debug
 	*/
-	
+
 	public function getDebug(){
 		return $this->debug;
 	}
-	
+
 	/**
 	* Méthode de définition de l'attribut debug de l'entité
 	* @author Valentin CARRUESCO
 	* @category Accesseur
-	* @param <boolean> $debug 
+	* @param <boolean> $debug
 	*/
 
 	public function setDebug($debug){

+ 3 - 3
Opml.class.php

@@ -7,7 +7,7 @@
  */
 
 require_once("common.php");
- 
+
 class Opml  {
 
 	// liens déjà connus, déjà abonnés, au moment de l'importation
@@ -39,7 +39,7 @@ class Opml  {
 		* Accessoirement, on remplace les espaces non signifiants par une seule
 		  espace. C'est le cas des retours chariots physiques, non
 		  interprétables.
-		*/		
+		*/
 		// Retire toutes les entités, &amp; &eacute; etc.
 		$string = html_entity_decode($string, ENT_COMPAT, 'UTF-8' );
 		// Remet les entités HTML comme &amp; mais ne touche pas aux accents.
@@ -142,7 +142,7 @@ class Opml  {
 			}
 		}
 	}
-	
+
 	/**
 	 * Importe les flux.
 	 */

+ 52 - 52
Plugin.class.php

@@ -15,20 +15,20 @@ class Plugin{
 
 	public static function includeAll(){
 		$pluginFiles = Plugin::getFiles(true);
-		if(is_array($pluginFiles)) {   
-			foreach($pluginFiles as $pluginFile) {  
+		if(is_array($pluginFiles)) {
+			foreach($pluginFiles as $pluginFile) {
 				//Inclusion du coeur de plugin
-				include $pluginFile;  
+				include $pluginFile;
 				//Gestion des css du plugin en fonction du thème actif
 				$cssTheme = glob(dirname($pluginFile).'/*/'.DEFAULT_THEME.'.css');
 				$cssDefault = glob(dirname($pluginFile).'/*/default.css');
 				if(isset($cssTheme[0])){
-					$GLOBALS['hooks']['css_files'][] = Functions::relativePath(str_replace('\\','/',dirname(__FILE__)),str_replace('\\','/',$cssTheme[0])); 
+					$GLOBALS['hooks']['css_files'][] = Functions::relativePath(str_replace('\\','/',dirname(__FILE__)),str_replace('\\','/',$cssTheme[0]));
 				}else if(isset($cssDefault[0])){
-					$GLOBALS['hooks']['css_files'][] =  Functions::relativePath(str_replace('\\','/',dirname(__FILE__)),str_replace('\\','/',$cssDefault[0])); 
+					$GLOBALS['hooks']['css_files'][] =  Functions::relativePath(str_replace('\\','/',dirname(__FILE__)),str_replace('\\','/',$cssDefault[0]));
 				}
 			}
-		}  
+		}
 	}
 
 	private static function getStates(){
@@ -40,7 +40,7 @@ class Plugin{
 		$stateFile = dirname(__FILE__).Plugin::FOLDER.'/plugins.states.json';
 		file_put_contents($stateFile,json_encode($states));
 	}
-	
+
 
 	private static function getObject($pluginFile){
 		$plugin = new Plugin();
@@ -48,28 +48,28 @@ class Plugin{
 
 		if(preg_match("#@author\s(.+)\s\<#", $fileLines, $match))
 			$plugin->setAuthor(trim($match[1]));
-			    
+
 		if(preg_match("#@author\s(.+)\s\<([a-z\@\.A-Z\s\-]+)\>#", $fileLines, $match))
 			$plugin->setMail(strtolower($match[2]));
-			    
+
 		if(preg_match("#@name\s(.+)[\r\n]#", $fileLines, $match))
 			$plugin->setName($match[1]);
-			    
+
 		if(preg_match("#@licence\s(.+)[\r\n]#", $fileLines, $match))
 			$plugin->setLicence($match[1]);
-			    
+
 		if(preg_match("#@version\s(.+)[\r\n]#", $fileLines, $match))
 			$plugin->setVersion($match[1]);
-			    
+
 		if(preg_match("#@link\s(.+)[\r\n]#", $fileLines, $match))
 			$plugin->setLink(trim($match[1]));
 
 		if(preg_match("#@type\s(.+)[\r\n]#", $fileLines, $match))
 			$plugin->setType(trim($match[1]));
-			    
+
 		if(preg_match("#@description\s(.+)[\r\n]#", $fileLines, $match))
 			$plugin->setDescription(trim($match[1]));
-			     
+
 		if(Plugin::loadState($pluginFile) || $plugin->getType()=='component'){
 			$plugin->setState(1);
 		}else{
@@ -80,51 +80,51 @@ class Plugin{
 	}
 
 	public static function getAll(){
-		$pluginFiles = Plugin::getFiles(); 
+		$pluginFiles = Plugin::getFiles();
 
 		$plugins = array();
-		if(is_array($pluginFiles)) {   
-			foreach($pluginFiles as $pluginFile) {  
+		if(is_array($pluginFiles)) {
+			foreach($pluginFiles as $pluginFile) {
 				$plugin = Plugin::getObject($pluginFile);
 				$plugins[]=$plugin;
-			}  
+			}
 		}
 		usort($plugins, "Plugin::sortPlugin");
 		return $plugins;
 	}
 
-	
 
-		public static function addHook($hookName, $functionName) {  
-		    $GLOBALS['hooks'][$hookName][] = $functionName;  
-		} 
 
-		public static function addCss($css) {  
+		public static function addHook($hookName, $functionName) {
+		    $GLOBALS['hooks'][$hookName][] = $functionName;
+		}
+
+		public static function addCss($css) {
 			$bt =  debug_backtrace();
-			
+
 			$path = Functions::relativePath(str_replace('\\','/',dirname(__FILE__)),str_replace('\\','/',dirname($bt[0]['file']).$css));
 
-		    $GLOBALS['hooks']['css_files'][] = $path;  
+		    $GLOBALS['hooks']['css_files'][] = $path;
 		}
 
 		public static function callCss(){
 			$return='';
-		    if(isset($GLOBALS['hooks']['css_files'])) { 
-		        foreach($GLOBALS['hooks']['css_files'] as $css_file) {  
+		    if(isset($GLOBALS['hooks']['css_files'])) {
+		        foreach($GLOBALS['hooks']['css_files'] as $css_file) {
 		            $return .='<link rel="stylesheet" href="'.$css_file.'">'."\n";
-		        }  
-		    }    
+		        }
+		    }
 		    return $return;
 		}
-		
-		public static function addLink($rel, $link) {  
+
+		public static function addLink($rel, $link) {
 		    $GLOBALS['hooks']['head_link'][] = array("rel"=>$rel, "link"=>$link);
 		}
 
 		public static function callLink(){
 			$return='';
-		    if(isset($GLOBALS['hooks']['head_link'])) { 
-		        foreach($GLOBALS['hooks']['head_link'] as $head_link) {  
+		    if(isset($GLOBALS['hooks']['head_link'])) {
+		        foreach($GLOBALS['hooks']['head_link'] as $head_link) {
 		            $return .='<link rel="'.$head_link['rel'].'" href="'.$head_link['link'].'" />'."\n";
 		        }
 		    }
@@ -133,39 +133,39 @@ class Plugin{
 
 		public static function path(){
 			$bt =  debug_backtrace();
-			return Functions::relativePath(str_replace('\\','/',dirname(__FILE__)),str_replace('\\','/',dirname($bt[0]['file']))).'/'; 
+			return Functions::relativePath(str_replace('\\','/',dirname(__FILE__)),str_replace('\\','/',dirname($bt[0]['file']))).'/';
 		}
 
-		public static function addJs($js) {  
+		public static function addJs($js) {
 			$bt =  debug_backtrace();
 			$path = Functions::relativePath(str_replace('\\','/',dirname(__FILE__)),str_replace('\\','/',dirname($bt[0]['file']).$js));
-		    $GLOBALS['hooks']['js_files'][] = $path;  
+		    $GLOBALS['hooks']['js_files'][] = $path;
 		}
 
 		public static function callJs(){
 			$return='';
-		    if(isset($GLOBALS['hooks']['js_files'])) { 
-		        foreach($GLOBALS['hooks']['js_files'] as $js_file) {  
+		    if(isset($GLOBALS['hooks']['js_files'])) {
+		        foreach($GLOBALS['hooks']['js_files'] as $js_file) {
 		            $return .='<script type="text/javascript" src="'.$js_file.'"></script>'."\n";
-		        }  
-		    }    
+		        }
+		    }
 		    return $return;
 		}
 
-		public static function callHook($hookName, $hookArguments) {  
+		public static function callHook($hookName, $hookArguments) {
 			//echo '<div style="display:inline;background-color:#CC47CB;padding:3px;border:5px solid #9F1A9E;border-radius:5px;color:#ffffff;font-size:15px;">'.$hookName.'</div>';
-		    if(isset($GLOBALS['hooks'][$hookName])) { 
-		        foreach($GLOBALS['hooks'][$hookName] as $functionName) {  
-		            call_user_func_array($functionName, $hookArguments);  
-		        }  
-		    }  
-		} 
+		    if(isset($GLOBALS['hooks'][$hookName])) {
+		        foreach($GLOBALS['hooks'][$hookName] as $functionName) {
+		            call_user_func_array($functionName, $hookArguments);
+		        }
+		    }
+		}
 
 	public static function getFiles($onlyActivated=false){
 
 		$enabled = $disabled =  array();
 		$files = glob(dirname(__FILE__). Plugin::FOLDER .'/*/*.plugin.*.php') or array();
-	
+
 		foreach($files as $file){
 			$plugin = Plugin::getObject($file);
 			if($plugin->getState()){
@@ -178,7 +178,7 @@ class Plugin{
 		return $enabled;
 	}
 
-	
+
 	public static function loadState($plugin){
 		$states = Plugin::getStates();
 		return (isset($states[$plugin])?$states[$plugin]:false);
@@ -212,11 +212,11 @@ class Plugin{
 				if(file_exists($uninstall))require_once($uninstall);
 			}
 		}
-		
+
 	}
 
 	function getUid(){
-		$pathInfo = explode('/',$this->getPath()); 
+		$pathInfo = explode('/',$this->getPath());
 		$count = count($pathInfo);
 		$name = $pathInfo[$count-1];
 		return $pathInfo[$count -2].'-'.substr($name,0,strpos($name,'.'));
@@ -224,7 +224,7 @@ class Plugin{
 
 
 	static function sortPlugin($a, $b){
-		if ($a->getName() == $b->getName()) 
+		if ($a->getName() == $b->getName())
         return 0;
 	    return ($a->getName() < $b->getName()) ? -1 : 1;
 	}

+ 23 - 23
RainTPL.php

@@ -81,10 +81,10 @@ class RainTPL{
 		 *
 		 */
 		static $check_template_update = true;
-                
+
 
 		/**
-		 * PHP tags <? ?> 
+		 * PHP tags <? ?>
 		 * True: php tags are enabled into the template
 		 * False: php tags are disabled into the template and rendered as html
 		 *
@@ -92,7 +92,7 @@ class RainTPL{
 		 */
 		static $php_enabled = false;
 
-		
+
 		/**
 		 * Debug mode flag.
 		 * True: debug mode is used, syntax errors are displayed directly in template. Execution of script is not terminated.
@@ -265,7 +265,7 @@ class RainTPL{
 			$this->tpl['compiled_filename']     = $temp_compiled_filename . '.rtpl.php';	// cache filename
 			$this->tpl['cache_filename']        = $temp_compiled_filename . '.s_' . $this->cache_id . '.rtpl.php';	// static cache filename
                         $this->tpl['checked']               = true;
-                        
+
 			// if the template doesn't exist and is not an external source throw an error
 			if( self::$check_template_update && !file_exists( $this->tpl['tpl_filename'] ) && !preg_match('/http/', $tpl_name) ){
 				$e = new RainTpl_NotFoundException( 'Template '. $tpl_basename .' not found!' );
@@ -282,7 +282,7 @@ class RainTPL{
 				$this->compileFile( $tpl_basename, $tpl_basedir, $this->tpl['tpl_filename'], self::$cache_dir, $this->tpl['compiled_filename'] );
 				return true;
 			}
-			
+
 		}
 	}
 
@@ -293,7 +293,7 @@ class RainTPL{
 	*/
 	protected function xml_reSubstitution($capture) {
     		return "<?php echo '<?xml ".stripslashes($capture[1])." ?>'; ?>";
-	} 
+	}
 
 	/**
 	 * Compile and write the compiled template file
@@ -312,11 +312,11 @@ class RainTPL{
 			$template_code = str_replace( array("<?","?>"), array("&lt;?","?&gt;"), $template_code );
 
 		//xml re-substitution
-		$template_code = preg_replace_callback ( "/##XML(.*?)XML##/s", array($this, 'xml_reSubstitution'), $template_code ); 
+		$template_code = preg_replace_callback ( "/##XML(.*?)XML##/s", array($this, 'xml_reSubstitution'), $template_code );
 
 		//compile template
 		$template_compiled = "<?php if(!class_exists('raintpl')){exit;}?>" . $this->compileTemplate( $template_code, $tpl_basedir );
-		
+
 
 		// fix the php-eating-newline-after-closing-tag-problem
 		$template_compiled = str_replace( "?>\n", "?>\n\n", $template_compiled );
@@ -380,7 +380,7 @@ class RainTPL{
 	 * @access protected
 	 */
 	protected function compileCode( $parsed_code ){
-            
+
                 // if parsed code is empty return null string
                 if( !$parsed_code )
                     return "";
@@ -389,7 +389,7 @@ class RainTPL{
 		$compiled_code = $open_if = $comment_is_open = $ignore_is_open = null;
                 $loop_level = 0;
 
-                
+
 	 	//read all parsed code
 	 	foreach( $parsed_code as $html ){
 
@@ -571,7 +571,7 @@ class RainTPL{
 				else
 					// parse the function
 					$parsed_function = $function . $this->var_replace( $code[ 2 ], $tag_left_delimiter = null, $tag_right_delimiter = null, $php_left_delimiter = null, $php_right_delimiter = null, $loop_level );
-				
+
 				//if code
 				$compiled_code .=   "<?php echo $parsed_function; ?>";
 			}
@@ -605,8 +605,8 @@ class RainTPL{
 		}
 		return $compiled_code;
 	}
-	
-	
+
+
 	/**
 	 * Reduce a path, eg. www/library/../filepath//file => www/filepath/file
 	 * @param type $path
@@ -617,7 +617,7 @@ class RainTPL{
             $path = preg_replace( "#(/+)#", "/", $path );
             $path = preg_replace( "#(/\./+)#", "/", $path );
             $path = str_replace( "@not_replace@", "://", $path );
-            
+
             while( preg_match( '#\.\./#', $path ) ){
                 $path = preg_replace('#\w+/\.\./#', '', $path );
             }
@@ -640,7 +640,7 @@ class RainTPL{
 		if( self::$path_replace ){
 
 			$tpl_dir = self::$base_url . self::$tpl_dir . $tpl_basedir;
-			
+
 			// reduce the path
 			$path = $this->reduce_path($tpl_dir);
 
@@ -711,7 +711,7 @@ class RainTPL{
 			$this->function_check( $tag );
 
 			$extra_var = $this->var_replace( $extra_var, null, null, null, null, $loop_level );
-            
+
 
 			// check if there's an operator = in the variable tags, if there's this is an initialization so it will not output any value
 			$is_init_variable = preg_match( "/^(\s*?)\=[^=](.*?)$/", $extra_var );
@@ -740,7 +740,7 @@ class RainTPL{
 
 			//if there's a function
 			if( $function_var ){
-                
+
                 // check if there's a function or a static method and separate, function by parameters
 				$function_var = str_replace("::", "@double_dot@", $function_var );
 
@@ -814,7 +814,7 @@ class RainTPL{
 
                             // check if there's an operator = in the variable tags, if there's this is an initialization so it will not output any value
                             $is_init_variable = preg_match( "/^[a-z_A-Z\.\[\](\-\>)]*=[^=]*$/", $extra_var );
-                            
+
                             //function associate to variable
                             $function_var = ( $extra_var and $extra_var[0] == '|') ? substr( $extra_var, 1 ) : null;
 
@@ -833,16 +833,16 @@ class RainTPL{
 
                             //transform .$variable in ["$variable"] and .variable in ["variable"]
                             $variable_path = preg_replace('/\.(\${0,1}\w+)/', '["\\1"]', $variable_path );
-                            
+
                             // if is an assignment also assign the variable to $this->var['value']
                             if( $is_init_variable )
                                 $extra_var = "=\$this->var['{$var_name}']{$variable_path}" . $extra_var;
 
-                                
+
 
                             //if there's a function
                             if( $function_var ){
-                                
+
                                     // check if there's a function or a static method and separate, function by parameters
                                     $function_var = str_replace("::", "@double_dot@", $function_var );
 
@@ -883,13 +883,13 @@ class RainTPL{
                                             $php_var = '$' . $var_name . $variable_path;
                             }else
                                     $php_var = '$' . $var_name . $variable_path;
-                            
+
                             // compile the variable for php
                             if( isset( $function ) )
                                     $php_var = $php_left_delimiter . ( !$is_init_variable && $echo ? 'echo ' : null ) . ( $params ? "( $function( $php_var, $params ) )" : "$function( $php_var )" ) . $php_right_delimiter;
                             else
                                     $php_var = $php_left_delimiter . ( !$is_init_variable && $echo ? 'echo ' : null ) . $php_var . $extra_var . $php_right_delimiter;
-                            
+
                             $html = str_replace( $tag, $php_var, $html );
 
 

+ 3 - 3
User.class.php

@@ -11,7 +11,7 @@ class User extends MysqlEntity{
 	protected $id,$login,$password;
 	protected $TABLE_NAME = 'user';
 	protected $CLASS_NAME = 'User';
-	protected $object_fields = 
+	protected $object_fields =
 	array(
 		'id'=>'key',
 		'login'=>'string',
@@ -52,11 +52,11 @@ class User extends MysqlEntity{
 		///@TODO: set the current web directory, here and on del
 		setcookie('leedStaySignedIn', $this->getToken(), time()+31536000);
 	}
-	
+
 	static function delStayConnected() {
 		setcookie('leedStaySignedIn', '', -1);
 	}
-	
+
 	function getId(){
 		return $this->id;
 	}

+ 4 - 4
about.php

@@ -1,17 +1,17 @@
-<?php 
+<?php
 
 /*
  @nom: about
  @auteur: Idleman (idleman@idleman.fr)
- @description: Page "A propos" d'information contextuelles sur le projet 
+ @description: Page "A propos" d'information contextuelles sur le projet
  */
 
 require_once('header.php');
-require_once('constant.php'); 
+require_once('constant.php');
 
 $tpl->assign('VERSION_NUMBER',VERSION_NUMBER);
 $tpl->assign('VERSION_NAME',VERSION_NAME);
 $view = 'about';
-require_once('footer.php'); 
+require_once('footer.php');
 
 ?>

+ 28 - 28
action.php

@@ -56,7 +56,7 @@ switch ($action){
 			$syncTypeStr = _t('SYNCHRONISATION_TYPE').' : '._t('FULL_SYNCHRONISATION');
 		}
 
-		
+
 		$currentDate = date('d/m/Y H:i:s');
 		if (!$commandLine) {
 			echo "<p>{$syncTypeStr} {$currentDate}</p>\n";
@@ -72,7 +72,7 @@ switch ($action){
 		$syncId = time();
 		$enableCache = ($configurationManager->get('synchronisationEnableCache')=='')?0:$configurationManager->get('synchronisationEnableCache');
 		$forceFeed = ($configurationManager->get('synchronisationForceFeed')=='')?0:$configurationManager->get('synchronisationForceFeed');
-		
+
 		foreach ($feeds as $feed) {
 			$nbEvents = 0;
 			$nbTotal++;
@@ -101,7 +101,7 @@ switch ($action){
 
 				if (!$parseOk) echo '<div class="errorSync">';
 				echo "<dt><i>{$parseTimeStr}s</i> | <a href='{$feedUrl}'>{$feedName}</a></dt>\n";
-				
+
 			}
 			foreach($errors as $error) {
 				if ($commandLine)
@@ -159,7 +159,7 @@ switch ($action){
 		if($myUser==false) exit(_t('YOU_MUST_BE_CONNECTED_ACTION'));
 
 		$feeds = $feedManager->loadAllOnlyColumn('id',array('folder'=>$_['folder']));
-		
+
 		foreach($feeds as $feed){
 			$eventManager->change(array('unread'=>'0'),array('feed'=>$feed->getId()));
 		}
@@ -181,7 +181,7 @@ switch ($action){
 			$configurationManager->put('articlePerPages',$_['articlePerPages']);
 			$configurationManager->put('articleDisplayLink',$_['articleDisplayLink']);
 			$configurationManager->put('articleDisplayDate',$_['articleDisplayDate']);
-			$configurationManager->put('articleDisplayAuthor',$_['articleDisplayAuthor']);			
+			$configurationManager->put('articleDisplayAuthor',$_['articleDisplayAuthor']);
 			$configurationManager->put('articleDisplayHomeSort',$_['articleDisplayHomeSort']);
 			$configurationManager->put('articleDisplayFolderSort',$_['articleDisplayFolderSort']);
 			$configurationManager->put('synchronisationType',$_['synchronisationType']);
@@ -205,7 +205,7 @@ switch ($action){
 					$configurationManager->add('cryptographicSalt', $salt);
 				else
 					$configurationManager->change(array('value'=>$salt), array('key'=>'cryptographicSalt'));
-				
+
 			}
 
 	header('location: ./settings.php#preferenceBloc');
@@ -250,7 +250,7 @@ switch ($action){
 			    echo $xmlStream;
 			}
 	break;
-	
+
 
 	case 'importForm':
 		if($myUser==false) exit(_t('YOU_MUST_BE_CONNECTED_ACTION'));
@@ -262,16 +262,16 @@ switch ($action){
 					</form>
 				</body>
 			</html>
-				
+
 			';
 	break;
 
 	case 'synchronizeForm':
-	 if(isset($myUser) && $myUser!=false){  
+	 if(isset($myUser) && $myUser!=false){
 		echo '<link rel="stylesheet" href="templates/marigolds/css/style.css">
 				<a class="button" href="action.php?action=synchronize">'._t('SYNCHRONIZE_NOW').'</a>
 					<p>'._t('SYNCHRONIZE_COFFEE_TIME').'</p>
-				
+
 			';
 		}else{
 			echo _t('YOU_MUST_BE_CONNECTED_ACTION');
@@ -346,7 +346,7 @@ switch ($action){
 		echo "<p></body></html>\n";
 	break;
 
-	
+
 	case 'addFeed':
 			if($myUser==false) exit(_t('YOU_MUST_BE_CONNECTED_ACTION'));
 			require_once("SimplePie.class.php");
@@ -422,11 +422,11 @@ switch ($action){
 	break;
 
 	case 'readContent':
-		if($myUser==false) { 
+		if($myUser==false) {
 			$response_array['status'] = 'noconnect';
 			$response_array['texte'] = _t('YOU_MUST_BE_CONNECTED_ACTION');
 			header('Content-type: application/json');
-		    echo json_encode($response_array); 
+		    echo json_encode($response_array);
 			exit();
 		}
 		if(isset($_['id'])){
@@ -436,11 +436,11 @@ switch ($action){
 	break;
 
 	case 'unreadContent':
-		if($myUser==false) { 
+		if($myUser==false) {
 			$response_array['status'] = 'noconnect';
 			$response_array['texte'] = _t('YOU_MUST_BE_CONNECTED_ACTION');
 			header('Content-type: application/json');
-		    echo json_encode($response_array); 
+		    echo json_encode($response_array);
 			exit();
 		}
 		if(isset($_['id'])){
@@ -450,29 +450,29 @@ switch ($action){
 	break;
 
 	case 'addFavorite':
-		if($myUser==false) { 
+		if($myUser==false) {
 			$response_array['status'] = 'noconnect';
 			$response_array['texte'] = _t('YOU_MUST_BE_CONNECTED_ACTION');
 			header('Content-type: application/json');
-		    echo json_encode($response_array); 
+		    echo json_encode($response_array);
 			exit();
 		}
 		$eventManager->change(array('favorite'=>'1'),array('id'=>$_['id']));
 	break;
 
 	case 'removeFavorite':
-		if($myUser==false) { 
+		if($myUser==false) {
 			$response_array['status'] = 'noconnect';
 			$response_array['texte'] = _t('YOU_MUST_BE_CONNECTED_ACTION');
 			header('Content-type: application/json');
-		    echo json_encode($response_array); 
+		    echo json_encode($response_array);
 			exit();
 		}
 		$eventManager->change(array('favorite'=>'0'),array('id'=>$_['id']));
 	break;
-	
+
 	case 'login':
-	
+
 		if(isset($_['usr'])){
 			$user = $userManager->existAuthToken($_['usr']);
 			if($user==false){
@@ -491,16 +491,16 @@ switch ($action){
 				$_SESSION['currentUser'] = serialize($user);
 				if (isset($_['rememberMe'])) $user->setStayConnected();
 			}
-			header('location: ./index.php');	
+			header('location: ./index.php');
 		}
-		
 
-	
+
+
 	break;
 
 	case 'changePluginState':
 		if($myUser==false) exit(_t('YOU_MUST_BE_CONNECTED_ACTION'));
-		
+
 		if($_['state']=='0'){
 			Plugin::enabled($_['plugin']);
 
@@ -509,9 +509,9 @@ switch ($action){
 		}
 		header('location: ./settings.php#pluginBloc');
 	break;
-	
 
-	
+
+
 	case 'logout':
 		User::delStayConnected();
 		$_SESSION = array();
@@ -519,7 +519,7 @@ switch ($action){
 		session_destroy();
 		header('location: ./index.php');
 	break;
-	
+
 	default:
 		require_once("SimplePie.class.php");
 		Plugin::callHook("action_post_case", array(&$_,$myUser));

+ 5 - 5
article.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 /*
  @nom: article
@@ -28,10 +28,10 @@
 	$tpl->assign('articleDisplayAuthor',$articleDisplayAuthor);
 	$tpl->assign('articleDisplayContent',$articleDisplayContent);
 
-	
+
 	$hightlighted = $_['hightlighted'];
 	$tpl->assign('hightlighted',$hightlighted);
-	
+
 	$tpl->assign('time',$_SERVER['REQUEST_TIME']);
 
 	$target = MYSQL_PREFIX.'event.title,'.MYSQL_PREFIX.'event.unread,'.MYSQL_PREFIX.'event.favorite,'.MYSQL_PREFIX.'event.feed,';
@@ -41,10 +41,10 @@
 	if($articleDisplayDate) $target .= MYSQL_PREFIX.'event.pubdate,';
 	if($articleDisplayAuthor) $target .= MYSQL_PREFIX.'event.creator,';
 	$target .= MYSQL_PREFIX.'event.id';
-	
+
 	$startArticle = $_['scroll']*$articlePerPages-$_['nblus'];
 	$action = $_['action'];
-	
+
 	switch($action){
 		/* AFFICHAGE DES EVENEMENTS D'UN FLUX EN PARTICULIER */
 		case 'selectedFeed':

+ 3 - 3
common.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 /*
  @nom: common
@@ -33,7 +33,7 @@ class_exists('Opml') or require_once('Opml.class.php');
 //error_reporting(E_ALL);
 
 //Calage de la date
-date_default_timezone_set('Europe/Paris'); 
+date_default_timezone_set('Europe/Paris');
 
 $myUser = (isset($_SESSION['currentUser'])?unserialize($_SESSION['currentUser']):false);
 $feedManager = new Feed();
@@ -76,7 +76,7 @@ $_[$key]=Functions::secure($val, 2); // on ne veut pas d'addslashes
 $tpl->assign('_',$_);
 $tpl->assign('action','');
 
-//Inclusion des plugins  
+//Inclusion des plugins
 Plugin::includeAll();
 
 ?>

+ 1 - 1
footer.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 $tpl->assign('executionTime',number_format(microtime(true)-$start,3));
 $html = $tpl->draw($view);

+ 2 - 2
header.php

@@ -1,5 +1,5 @@
-<?php 
+<?php
 if(!file_exists('constant.php'))header('location: install.php');
-require_once('common.php'); 
+require_once('common.php');
 
 ?>

+ 1 - 1
i18n.php

@@ -13,7 +13,7 @@
 			$i18n_js =  file_get_contents(dirname(__FILE__).'/locale/'.LANGUAGE.'.json');
 			$i18n = json_decode($i18n_js,true);
 		}
-	}	
+	}
 
 	function _t($key,$args=array(),$debug=false){
 		global $i18n;

+ 8 - 8
index.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 /*
  @nom: index
@@ -6,7 +6,7 @@
  @description:  Page d'accueil et de lecture des flux
 */
 
-require_once('header.php'); 
+require_once('header.php');
 
 
 Plugin::callHook("index_pre_treatment", array(&$_));
@@ -57,7 +57,7 @@ $tpl->assign('target',$target);
 $tpl->assign('feeds','');
 $tpl->assign('order','');
 $tpl->assign('unreadEventsForFolder','');
-$pagesArray = array();				
+$pagesArray = array();
 
 				switch($action){
 					/* AFFICHAGE DES EVENEMENTS D'UN FLUX EN PARTICULIER */
@@ -68,7 +68,7 @@ $pagesArray = array();
 						$allowedOrder = array('date'=>'pubdate DESC','older'=>'pubdate','unread'=>'unread DESC,pubdate DESC');
 						$order = (isset($_['order'])?$allowedOrder[$_['order']]:$allowedOrder['date']);
 						$page = (isset($_['page'])?$_['page']:1);
-						$pages = ceil($numberOfItem/$articlePerPages); 
+						$pages = ceil($numberOfItem/$articlePerPages);
 						$startArticle = ($page-1)*$articlePerPages;
 						$events = $currentFeed->getEvents($startArticle,$articlePerPages,$order,$target);
 
@@ -81,7 +81,7 @@ $pagesArray = array();
 						$tpl->assign('currentFolder',$currentFolder);
 						$numberOfItem = $currentFolder->unreadCount();
 						$page = (isset($_['page'])?$_['page']:1);
-						$pages = ceil($numberOfItem/$articlePerPages); 
+						$pages = ceil($numberOfItem/$articlePerPages);
 						$startArticle = ($page-1)*$articlePerPages;
 						if($articleDisplayFolderSort) {$order = MYSQL_PREFIX.'event.pubdate desc';} else {$order = MYSQL_PREFIX.'event.pubdate asc';}
 						$events = $currentFolder->getEvents($startArticle,$articlePerPages,$order,$target);
@@ -92,7 +92,7 @@ $pagesArray = array();
 					case 'favorites':
 						$numberOfItem = $eventManager->rowCount(array('favorite'=>1));
 						$page = (isset($_['page'])?$_['page']:1);
-						$pages = ceil($numberOfItem/$articlePerPages); 
+						$pages = ceil($numberOfItem/$articlePerPages);
 						$startArticle = ($page-1)*$articlePerPages;
 						$events = $eventManager->loadAllOnlyColumn($target,array('favorite'=>1),'pubDate DESC',$startArticle.','.$articlePerPages);
 						$tpl->assign('numberOfItem',$numberOfItem);
@@ -103,7 +103,7 @@ $pagesArray = array();
 					default:
 						$numberOfItem = $eventManager->rowCount(array('unread'=>1));
 						$page = (isset($_['page'])?$_['page']:1);
-						$pages = ($articlePerPages>0?ceil($numberOfItem/$articlePerPages):1); 
+						$pages = ($articlePerPages>0?ceil($numberOfItem/$articlePerPages):1);
 						$startArticle = ($page-1)*$articlePerPages;
 						if($articleDisplayHomeSort) {$order = 'pubdate desc';} else {$order = 'pubdate asc';}
 						$events = $eventManager->loadAllOnlyColumn($target,array('unread'=>1),$order,$startArticle.','.$articlePerPages);
@@ -129,5 +129,5 @@ $pagesArray = array();
 				$tpl->assign('scroll',false);
 
 $view = 'index';
-require_once('footer.php'); 
+require_once('footer.php');
 ?>

+ 22 - 22
install.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 /*
  @nom: install
@@ -13,7 +13,7 @@ if (file_exists('constant.php')) {
 $cookiedir = '';
 if(dirname($_SERVER['SCRIPT_NAME'])!='/') $cookiedir=dirname($_SERVER["SCRIPT_NAME"]).'/';
 session_set_cookie_params(0, $cookiedir);
-session_start(); 
+session_start();
 require_once('Functions.class.php');
 $_ = array_merge($_GET, $_POST);
 $whiteList = array(
@@ -103,7 +103,7 @@ if(isset($_['installButton'])){
 	define('VERSION_NAME','Beta');
 
 	//Host de Mysql, le plus souvent localhost ou 127.0.0.1
-	define('MYSQL_HOST','".$_['mysqlHost']."'); 
+	define('MYSQL_HOST','".$_['mysqlHost']."');
 	//Identifiant MySQL
 	define('MYSQL_LOGIN','".$_['mysqlLogin']."');
 	//mot de passe MySQL
@@ -128,7 +128,7 @@ if(isset($_['installButton'])){
 	require_once('MysqlEntity.class.php');
 	require_once('Feed.class.php');
 	require_once('Event.class.php');
-	
+
 	require_once('User.class.php');
 	require_once('Folder.class.php');
 	require_once('Configuration.class.php');
@@ -140,7 +140,7 @@ if(isset($_['installButton'])){
 	$configurationManager = new Configuration();
 
 	$cryptographicSalt = User::generateSalt();
-	
+
 	//Création de la base et des tables
 	$feedManager->create();
 	$eventManager->create();
@@ -171,7 +171,7 @@ if(isset($_['installButton'])){
 	$configurationManager->add('articleDisplayFolderSort',$_['articleDisplayFolderSort']);
 	$configurationManager->add('synchronisationType',$_['synchronisationType']);
 	$configurationManager->add('feedMaxEvents',$_['feedMaxEvents']);
-	
+
 	$configurationManager->add('synchronisationCode',$synchronisationCode);
 	$configurationManager->add('synchronisationEnableCache',$_['synchronisationEnableCache']);
 	$configurationManager->add('synchronisationForceFeed',$_['synchronisationForceFeed']);
@@ -216,13 +216,13 @@ Si vous n'avez pas accès a la commande wget sur votre serveur, vous pouvez essa
 ?>
 <div id="menuBar">
 			<aside>
-				<h3 class="left">Verifications</h3> 
+				<h3 class="left">Verifications</h3>
 				<ul class="clear" style="margin:0">
 
-						<?php 
+						<?php
 
 						if(!is_writable('./')){
-			
+
 							$test['Erreur'][]='Écriture impossible dans le répertoire Leed, veuillez ajouter les permissions en écriture sur tout le dossier (sudo chmod 777 -R '.str_replace(basename(__FILE__),'',__FILE__).', pensez à blinder les permissions par la suite)';
 						}else{
 							$test['Succès'][]='Permissions sur le dossier courant : OK';
@@ -230,28 +230,28 @@ Si vous n'avez pas accès a la commande wget sur votre serveur, vous pouvez essa
 						if (!@function_exists('mysql_connect')){
 						   $test['Erreur'][] = 'La fonction requise "mysql_connect" est inaccessible sur votre serveur, verifiez vote installation de MySql.';
 						}else{
-						   $test['Succès'][] = 'Fonction requise "mysql_connect" : OK';    
+						   $test['Succès'][] = 'Fonction requise "mysql_connect" : OK';
 						}
 						if (!@function_exists('file_get_contents')){
 							 $test['Erreur'][] = 'La fonction requise "file_get_contents" est inaccessible sur votre serveur, verifiez votre version de PHP.';
 						}else{
-							 $test['Succès'][] = 'Fonction requise "file_get_contents" : OK';	
+							 $test['Succès'][] = 'Fonction requise "file_get_contents" : OK';
 						}
 						if (!@function_exists('file_put_contents')){
 							 $test['Erreur'][] = 'La fonction requise "file_put_contents" est inaccessible sur votre serveur, verifiez votre version de PHP.';
 						}else{
-							 $test['Succès'][] = 'Fonction requise "file_put_contents" : OK';	
+							 $test['Succès'][] = 'Fonction requise "file_put_contents" : OK';
 						}
 						if (@version_compare(PHP_VERSION, '5.1.0') <= 0){
 						 $test['Erreur'][] = 'Votre version de PHP ('.PHP_VERSION.') est trop ancienne, il est possible que certaines fonctionalitees du script comportent des disfonctionnements.';
 						}else{
-						 $test['Succès'][] = 'Compabilité de version PHP ('.PHP_VERSION.') : OK';	
+						 $test['Succès'][] = 'Compabilité de version PHP ('.PHP_VERSION.') : OK';
 						}
 
 						// if (!@extension_loaded('sqlite3')){
 						//  $test['Erreur'][] = 'L\'Extension Sqlite3 n\'est pas activée sur votre serveur, merci de bien vouloir l\'installer';
 						// }else{
-						//  $test['Succès'][] = 'Extension Sqlite3 : OK';	
+						//  $test['Succès'][] = 'Extension Sqlite3 : OK';
 						// }
 
 						if(ini_get('safe_mode') && ini_get('max_execution_time')!=0){
@@ -267,15 +267,15 @@ Si vous n'avez pas accès a la commande wget sur votre serveur, vous pouvez essa
 				</ul>
 			</aside>
 </div>
-	<?php  if(!isset($test['Erreur'])){ ?>		
+	<?php  if(!isset($test['Erreur'])){ ?>
 	<form action="install.php" method="POST">
 			<article>
 				<header>
 					<h1>Installation de Leed</h1>
 					<p>Merci de prendre quelques instants pour vérifier les infos ci-dessous :</p>
-				
+
 				</header>
-			
+
 				<section>
 					<h2>Général</h2>
 					<p>Racine du projet : <input type="text" name="root" value="<?php echo str_replace(basename(__FILE__),'','http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); ?>"></p>
@@ -294,7 +294,7 @@ Si vous n'avez pas accès a la commande wget sur votre serveur, vous pouvez essa
 					<p>Préfixe des tables : <input type="text" name="mysqlPrefix" value="leed_"></p>
 				</section>
 
-				
+
 				<section>
 					<h2>Administrateur</h2>
 					<p>Identifiant de l'administrateur : <input type="text" name="login" placeholder="Identifiant"></p>
@@ -338,18 +338,18 @@ Si vous n'avez pas accès a la commande wget sur votre serveur, vous pouvez essa
 					<p>Catégorie par défaut : <input type="text" value="Général" name="category"></p>
 					<p>Conserver les <input type="text" value="300" name="feedMaxEvents"> derniers événements d'un flux.</p>
 					<h3 class="articleDetails">NB : Plus il y aura d'événements à conserver, plus votre base de données sera importante. Nous vous conseillons de garder les 50 derniers événements au maximum pour conserver une performance correcte.<br>Notez que vos événements marqués comme favoris ne seront jamais supprimés.</h3>
-					
+
 				</section>
 
-	
+
 
 
 				<button name="installButton">Lancer l'installation</button>
 			</article>
-	</form>		
+	</form>
 	<?php }else{ ?>
 	<p>Il vous manque des prérequis pour continuer l'installation, référez vous au panneau de droite.</p>
-	<?php }?>		
+	<?php }?>
 	<?php } ?>
 		</div> <!-- #main -->
 

+ 24 - 24
locale/manager.php

@@ -1,11 +1,11 @@
-<?php 
+<?php
 
 /*
  @nom: manager
  @auteur: Idleman (idleman@idleman.fr)
  @description:  Outil de gestion des fichiers langues
  */
-header('Content-Type: text/html; charset=utf-8'); 
+header('Content-Type: text/html; charset=utf-8');
 require_once('../Functions.class.php');
 
 require_once("../common.php");
@@ -13,7 +13,7 @@ if($myUser==false) exit(_t('YOU_MUST_BE_CONNECTED_ACTION'));
 
 if(isset($_['1234567890saveButton'])){
 	unset($_['1234567890saveButton']);
-	$currentLangage = $_['1234567890currentLangage']; 
+	$currentLangage = $_['1234567890currentLangage'];
 	unset($_['1234567890currentLangage']);
 	file_put_contents($currentLangage.'.json', pretty_json_encode($_));
 }
@@ -123,24 +123,24 @@ function scanTags($dir){
 
 
 
-	
+
 
 <div id="menuBar">
 			<aside>
-				<h3 class="left">Vérifications</h3> 
+				<h3 class="left">Vérifications</h3>
 				<ul class="clear" style="margin:0">
 
-						<?php 
+						<?php
 						$test = array();
 						if(!is_writable('./')){
 							$test['Erreur'][]='Écriture impossible dans le répertoire Leed, veuillez ajouter les permissions en écriture sur tout le dossier, pensez à blinder les permissions par la suite)';
 						}
 
 						if (!@function_exists('file_get_contents')){
-							 $test['Erreur'][] = 'La fonction requise "file_get_contents" est inaccessible sur votre serveur, vérifiez votre version de PHP.';	
+							 $test['Erreur'][] = 'La fonction requise "file_get_contents" est inaccessible sur votre serveur, vérifiez votre version de PHP.';
 						}
 						if (!@function_exists('file_put_contents')){
-							 $test['Erreur'][] = 'La fonction requise "file_put_contents" est inaccessible sur votre serveur, vérifiez votre version de PHP.';	
+							 $test['Erreur'][] = 'La fonction requise "file_put_contents" est inaccessible sur votre serveur, vérifiez votre version de PHP.';
 						}
 						if (@version_compare(PHP_VERSION, '5.1.0') <= 0){
 						 $test['Erreur'][] = 'Votre version de PHP ('.PHP_VERSION.') est trop ancienne, il est possible que certaines fonctionnalités du script comportent des dysfonctionnements.';
@@ -160,9 +160,9 @@ function scanTags($dir){
 						<form action="#" method="POST">
 						<h2>Ouvrir une langue</h2>
 						<select name="1234567890currentLangage">
-							<?php 
-							
-							foreach($files as $file){ 
+							<?php
+
+							foreach($files as $file){
 							$file = str_replace('.json', '', $file);
 								?>
 							<option value="<?php echo $file; ?>"><?php echo $file; ?></option>
@@ -170,24 +170,24 @@ function scanTags($dir){
 						</select>
 							<input type="submit" value="Ouvrir" class="button">
 						</form>
-					
+
 				</ul>
 			</aside>
 </div>
-		
+
 	<form action="#" method="POST">
 			<article>
 				<header>
 					<h1>Fichier langue de Leed <input type="text" value="<?php echo @$_['1234567890currentLangage'] ; ?>" name="1234567890currentLangage"><input type="submit" name="1234567890saveButton" value="Enregistrer" class="button"></h1>
-					
+
 				</header>
-				
+
 				<section>
 					<h2>Clée présentes</h2>
 					<table class="tradTab">
 						<?php foreach($currentLangage as $key=>$value){ ?>
 						<tr>
-							<td><?php echo $key; ?></td> 
+							<td><?php echo $key; ?></td>
 							<td class="value">
 								<?php $value = htmlentities($value,ENT_COMPAT,'UTF-8');
 								if(strlen($value)>100){
@@ -198,7 +198,7 @@ function scanTags($dir){
 									?>
 									<input type="text" name="<?php echo $key; ?>" value="<?php echo $value; ?>">
 									<?php
-								} 
+								}
 								?>
 							</td>
 						</tr>
@@ -211,7 +211,7 @@ function scanTags($dir){
 					<p>Différences entre les traductions du fichier langue et les
 						traductions trouvées dans les fichiers de Leed</p>
 						<strong>Nb: Ce différentiel est la à titre informatif, il peut se tromper, merci de vérifier la véracité des différences.</strong>
-						
+
 						<table class="diffTab">
 							<tr>
 								<th>Fichier Langue ( <?php echo count($currentLangage) ?> Tags)</th>
@@ -224,7 +224,7 @@ function scanTags($dir){
 							echo '<tr><td>'.$key.'</td><td>-</td></tr>';
 						}
 					}
-				
+
 					foreach ($missingTags as $key => $value) {
 						if(!isset($currentLangage[$value])){
 							echo '<tr><td>'.$value.'</td><td>-</td></tr>';
@@ -232,11 +232,11 @@ function scanTags($dir){
 					}
 					?>
 				</section>
-				
-	
+
+
 			</article>
-	</form>		
-			
+	</form>
+
 
 		</div> <!-- #main -->
 
@@ -257,7 +257,7 @@ function scanTags($dir){
 </body>
 </html>
 
-<?php 
+<?php
 
     function pretty_json_encode($json) {
 	array_walk_recursive($json, function (&$item, $key) { if (is_string($item)) $item = mb_encode_numericentity($item, array (0x80, 0xffff, 0, 0xffff), 'UTF-8'); });

+ 6 - 6
settings.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 /*
  @nom: settings
@@ -6,7 +6,7 @@
  @description: Page de gestion de toutes les préférences/configurations administrateur
  */
 
-require_once('header.php'); 
+require_once('header.php');
 
 
 
@@ -16,14 +16,14 @@ $tpl->assign('synchronisationType',$configurationManager->get('synchronisationTy
 $tpl->assign('synchronisationEnableCache',$configurationManager->get('synchronisationEnableCache'));
 $tpl->assign('synchronisationForceFeed',$configurationManager->get('synchronisationForceFeed'));
 $tpl->assign('articleDisplayAnonymous', $configurationManager->get('articleDisplayAnonymous'));
-$tpl->assign('articleDisplayLink', $configurationManager->get('articleDisplayLink')); 
-$tpl->assign('articleDisplayDate', $configurationManager->get('articleDisplayDate')); 
+$tpl->assign('articleDisplayLink', $configurationManager->get('articleDisplayLink'));
+$tpl->assign('articleDisplayDate', $configurationManager->get('articleDisplayDate'));
 $tpl->assign('articleDisplayAuthor', $configurationManager->get('articleDisplayAuthor'));
 $tpl->assign('articleDisplayHomeSort', $configurationManager->get('articleDisplayHomeSort'));
 $tpl->assign('articleDisplayFolderSort', $configurationManager->get('articleDisplayFolderSort'));
-$tpl->assign('articleDisplayContent', $configurationManager->get('articleDisplayContent')); 
+$tpl->assign('articleDisplayContent', $configurationManager->get('articleDisplayContent'));
 $tpl->assign('articleView', $configurationManager->get('articleView'));
-//Récuperation des plugins  
+//Récuperation des plugins
 $tpl->assign('plugins',Plugin::getAll());
 
 $view = "settings";

+ 8 - 8
templates/marigolds/about.html

@@ -13,13 +13,13 @@
 					</ul>
 				</aside>
 			</div>
-			
+
 			<article>
 				<header>
 					<h1>{function="_t('ABOUT')"}</h1>
 					<p>{function="_t('ABOUT_LEED')"}</p>
 				</header>
-				
+
 
 				<section>
 					<h2>{function="_t('GENERALITY')"} :</h2>
@@ -37,20 +37,20 @@
 
 					<h2>{function="_t('INSTALLATION')"}</h2>
 					{function="_t('INSTALLATION_PARAGRAPH')"}
-					
+
 					<h2>{function="_t('QUESTIONS_SUGGESTIONS')"}</h2>
 					{function="_t('QUESTIONS_SUGGESTIONS_PARAGRAPH')"}
-					
+
 					<h2>{function="_t('LIBRARIES')"}</h2>
 					{function="_t('LIBRARIES_PARAGRAPHE')"}
-					
+
 				</section>
-				
+
 
 
 			</article>
-			
-			
+
+
 		</div> <!-- #main -->
 
 

+ 12 - 12
templates/marigolds/article.html

@@ -1,15 +1,15 @@
 {loop="$events"}
 	{$plainDescription=strip_tags($value->getDescription())}
-		
+
 	<!-- CORPS ARTICLE -->
-	 
-	
+
+
 	<section id="{$value->getId()}" class="{if="!$value->getUnread()"}eventRead{/if} {$hightlighted%2==0?'eventHightLighted':''}{$scroll?' scroll':''}" {$scroll?'style="display: none;"':''}>
 		<a title="{function="_t('RETURN_TO_TOP')"}" class="goTopButton" href="#pageTopAnvil">ˆ</a>
 		<!-- TITRE -->
 		<h2 class="articleTitle">
 			{function="Plugin::callHook("event_pre_title", array(&$value))"}
-			<a onclick="readThis(this,{$value->getId()},'title');" target="_blank" href="{$value->getLink()}" title="{$plainDescription}">{$value->getTitle()}</a> 
+			<a onclick="readThis(this,{$value->getId()},'title');" target="_blank" href="{$value->getLink()}" title="{$plainDescription}">{$value->getTitle()}</a>
 			{function="Plugin::callHook("event_post_title", array(&$value))"}
 		</h2>
 		<!-- DETAILS + OPTIONS -->
@@ -24,14 +24,14 @@
 				{/if}
 			{/if}
 
-			{if="$articleDisplayDate"} 
-				{$value->getPubdateWithInstant($time)} 
+			{if="$articleDisplayDate"}
+				{$value->getPubdateWithInstant($time)}
 			{/if}
-			{if="$value->getFavorite()!=1"} -  <a class="pointer favorite" onclick="addFavorite(this,{$value->getId()});" >{function="_t('FAVORIZE')"}</a> 
+			{if="$value->getFavorite()!=1"} -  <a class="pointer favorite" onclick="addFavorite(this,{$value->getId()});" >{function="_t('FAVORIZE')"}</a>
 			{else}
-			 <a class="pointer favorite" onclick="removeFavorite(this,{$value->getId()});" >{function="_t('UNFAVORIZE')"}</a> 
+			 <a class="pointer favorite" onclick="removeFavorite(this,{$value->getId()});" >{function="_t('UNFAVORIZE')"}</a>
 			 {/if}
-			
+
 			 <a class="pointer right readUnreadButton">({function="_t('READ')"}/{function="_t('UNREAD')"})</a>
 			 {function="Plugin::callHook("event_post_top_options", array(&$value))"}
 		</h3>
@@ -48,13 +48,13 @@
 					{$value->getContent()}
 					{function="Plugin::callHook("event_post_content", array(&$value))"}
 				{/if}
-			</div> 
-			
+			</div>
+
 			{if="$articleView!='partial'"}
 			<!-- RAPPEL DETAILS + OPTIONS POUR LES ARTICLES AFFICHES EN ENTIER -->
 			<h3 class="articleDetails">
 				{function="Plugin::callHook("event_pre_bottom_options", array(&$value))"}
-			
+
 				<a class="pointer right readUnreadButton">(lu/non lu)</a>
 				{if="$value->getFavorite()!=1"}<a class="right pointer favorite"  onclick="addFavorite(this,{$value->getId()});">{function="_t('FAVORIZE')"}</a>
 				{else}

+ 14 - 14
templates/marigolds/css/style.css

@@ -196,12 +196,12 @@ header a,header a:hover,header a:visited{
 -moz-border-radius: 5px;
 	-webkit-border-radius: 5px;
 	border-radius: 5px;
-	
+
 	line-height:20px;
 }
 
 #main aside a.unreadForFolder,#main aside a.readFolder{
-	
+
 	background-color:#F16529;
 	border:0px;
 	color:#ffffff;
@@ -253,7 +253,7 @@ header a,header a:hover,header a:visited{
 }
 
 #main article div.articleContent{
-	
+
 	margin:10px 0px 0px 0px;
 	text-align: justify;
 	clear:both;
@@ -304,7 +304,7 @@ header a,header a:hover,header a:visited{
 	font-size: 12px;
 }
 #main article div.articleContent .enclosure a{
-	
+
 	color:#F16529;
 	font-size: 10px;
 }
@@ -414,7 +414,7 @@ header a,header a:hover,header a:visited{
 }
 
 #main article section {
-	 
+
 }
 
 #main article section.eventRead .readUnreadButton {
@@ -586,7 +586,7 @@ footer a,#main aside a{
     INTERMEDIATE: Menu
    ==================== */
 
-		
+
 
 	nav a{
 		float:left;
@@ -600,19 +600,19 @@ footer a,#main aside a{
 	nav a:hover{
 		border-bottom: 5px solid #F7BC79;
 	}
-	
+
 	nav li:first-child a{ margin-left:0;  }
 	nav li:last-child  a{ margin-right:0; }
-	
+
 /* ========================
     INTERMEDIATE: IE Fixes
    ======================== */
 
 	nav ul li{
 		display:inline;
-	}	
+	}
 	.oldie nav a{
-		margin:0 0.7%;		
+		margin:0 0.7%;
 	}
 }
 
@@ -626,7 +626,7 @@ footer a,#main aside a{
 #main{
 		padding:30px 0;
 	}
- 
+
 /* ====================
     WIDE: CSS3 Effects
    ==================== */
@@ -641,7 +641,7 @@ footer a,#main aside a{
 /* ============
     WIDE: Menu
    ============ */
-	
+
 	#title{
 		float:left;
 	}
@@ -659,7 +659,7 @@ footer a,#main aside a{
 		float:left;
 		width:67%;
 	}
-		
+
 	#main #menuBar{
 		float:right;
 		width:32%;
@@ -703,7 +703,7 @@ footer a,#main aside a{
 /* =============================================================================
    Print Styles
    ========================================================================== */
- 
+
 @media print {
   * { background: transparent !important; color: black !important; box-shadow:none !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
   a, a:visited { text-decoration: underline; }

+ 1 - 1
templates/marigolds/header.html

@@ -40,7 +40,7 @@
 					{/if}
 					<div class="clear"></div>
 				</div>
-			
+
 				<nav>
 					<ul>
 						<li><a href="index.php">{function="_t('HOME')"}</a></li>

+ 24 - 24
templates/marigolds/index.html

@@ -9,7 +9,7 @@
 
 {if="($configurationManager->get('articleDisplayAnonymous')=='1') || ($myUser!=false)"}
 
-		
+
 		<div id="helpPanel">
 			<h3>Raccourcis clavier</h3>
 			<ul>
@@ -31,7 +31,7 @@
 			<!-- MENU -->
 			<!--      -->
 
-			
+
 			<div id="menuBar">
 				{function="Plugin::callHook("menu_pre_folder_menu", array(&$myUser))"}
 			<aside>
@@ -39,9 +39,9 @@
 				<h3 class="left">{function="_t('FEED')"}</h3> <button style="margin: 20px 10px;" onclick="if(confirm('{function="_t('CONFIRM_MARK_ALL_AS_READ')"}'))window.location='action.php?action=readAll'">{function="_t('MARK_ALL_AS_READ')"}</button>
 				{function="Plugin::callHook("menu_post_header_options", array(&$myUser))"}
 				<ul class="clear">
-					
-						
-					
+
+
+
 						<!--Pour chaques dossier-->
 						{loop="folders"}
 							{$feeds=""}
@@ -52,7 +52,7 @@
 						  	{if="isset($allEvents[$value->getId()])"}
 						  		{$unreadEventsForFolder=$allEvents[$value->getId()]}
 						  	{/if}
-				
+
 					<!-- DOSSIER -->
 					<li>
 
@@ -63,12 +63,12 @@
 						</h1>
 						<!-- FLUX DU DOSSIER -->
 						<ul {if="!$value->getIsopen()"}style="display:none;"{/if}>
-							 
+
 								{if="count($feeds)!=0"}
 									{loop="feeds"}
-										<li> 
+										<li>
 											{function="Plugin::callHook("menu_pre_feed_link", array(&$value))"}											 <a href="index.php?action=selectedFeed&amp;feed={$value2['id']}" title="{$value2['url']}">{function="Functions::truncate($value2['name'],37)"} </a>
-											{if="isset($unread[$value2['id']])"}  
+											{if="isset($unread[$value2['id']])"}
 											<button class="right" style="margin:5px 0 0 10px;" onclick="if(confirm('{function="_t('CONFIRM_MARK_FEED_AS_READ')"}'))window.location='action.php?action=readAll&amp;feed={$value2['id']}';">
 												<span title="{function="_t('MARK_AS_READ')"}">{$unread[$value2['id']]}</span>
 											</button>
@@ -84,8 +84,8 @@
 					{$unreadEventsForFolder=0}
 					{/loop}
 
-					
-					
+
+
 				</ul>
 			</aside>
 
@@ -98,36 +98,36 @@
 			<article>
 				<!-- ENTETE ARTICLE -->
 				<header class="articleHead">
-			
+
 				{if="$action=='selectedFeed'"}
 				<!-- AFFICHAGE DES EVENEMENTS D'UN FLUX EN PARTICULIER -->
-				
-						
+
+
 					<h1 class="articleSection"><a target="_blank" href="{$currentFeed->getWebSite()}">{$currentFeed->getName()}</a></h1>
 					<div class="clear"></div>
-						{$currentFeed->getDescription()}  
-							{function="_t('SEE_THE')"} 
-					<a href="index.php?action=selectedFeed&amp;feed={$_['feed']}&amp;page={$page}&amp;order=unread">{function="ucfirst(_t('UNREAD'))"}</a> | 
+						{$currentFeed->getDescription()}
+							{function="_t('SEE_THE')"}
+					<a href="index.php?action=selectedFeed&amp;feed={$_['feed']}&amp;page={$page}&amp;order=unread">{function="ucfirst(_t('UNREAD'))"}</a> |
 					<a href="index.php?action=selectedFeed&amp;feed={$_['feed']}&amp;page={$page}&amp;order=older">{function="_t('OLDER')"}</a> {function="_t('IN_FIRST')"}
 				{/if}
-				
+
 				{if="$action=='selectedFolder'"}
-				<!-- AFFICHAGE DES EVENEMENTS D'UN DOSSIER EN PARTICULIER -->		
+				<!-- AFFICHAGE DES EVENEMENTS D'UN DOSSIER EN PARTICULIER -->
 					<h1 class="articleSection">{function="_t('FOLDER')"} : {$currentFolder->getName()}</h1>
 					<p>{function="_t('SEE_EVENTS_FOR_FOLDER',array($currentFolder->getName()))"}</p>
 				{/if}
-				
+
 				{if="$action=='favorites'"}
-				<!-- AFFICHAGE DES EVENEMENTS FAVORIS -->		
+				<!-- AFFICHAGE DES EVENEMENTS FAVORIS -->
 					<h1 class="articleSection">{function="_t('FAVORITES_EVENTS',array('<span id="nbarticle">'.$numberOfItem.'</span>'))"}</h1>
 				{/if}
 
-				
+
 				{if="($action=='unreadEvents') || ($action=='')"}
-				<!-- AFFICHAGE DES EVENEMENTS NON LU (COMPORTEMENT PAR DEFAUT) -->		
+				<!-- AFFICHAGE DES EVENEMENTS NON LU (COMPORTEMENT PAR DEFAUT) -->
 					<h1 class="articleSection">{function="_t('UNREAD')"} (<span id="nbarticle">{$numberOfItem}</span>)</h1><div class="pointer right readUnreadButton" onmouseout="document.getElementById( 'helpPanel' ).style.display = 'none'" onmouseover="document.getElementById( 'helpPanel' ).style.display = 'block'" title="{function="_t('HELP_H_?')"}">?</div>
 				{/if}
-			
+
 			 	<div class="clear"></div>
 				</header>
 				{include="article"}

+ 14 - 14
templates/marigolds/js/script.js

@@ -42,13 +42,13 @@ $(document).ready(function(){
 
 		targetThisEvent($('article section:first'),true);
 		addEventsButtonLuNonLus();
-		
+
 		// on initialise ajaxready à true au premier chargement de la fonction
 		$(window).data('ajaxready', true);
 		$('article').append('<div id="loader">'+_t('LOADING')+'</div>');
 		$(window).data('page', 1);
 		$(window).data('nblus', 0);
-		
+
 		if ($(window).scrollTop()==0) scrollInfini();
 	}
 	//alert(_t('IDENTIFIED_WITH',['idleman']));
@@ -75,7 +75,7 @@ $(document).keydown(function (e) {
             return true;
 	}
     switch(e.which){
-    	
+
         case keyCode['m']:
             //marque l'élément sélectionné comme lu / non lu
             readTargetEvent();
@@ -151,17 +151,17 @@ function scrollInfini() {
 		{
 			// lorsqu'on commence un traitement, on met ajaxready à false
 			$(window).data('ajaxready', false);
- 			
+
  			//j'affiche mon loader pour indiquer le chargement
 			$('article #loader').show();
-			
+
 			//utilisé pour l'alternance des couleurs d'un article à l'autre
 			if ($('article section:last').hasClass('eventHightLighted')) {
 				hightlighted = 1;
 			} else {
 				hightlighted = 2;
 			}
-			
+
 			// récupération des variables passées en Get
 			var action = getUrlVars()['action'];
 			var folder = getUrlVars()['folder'];
@@ -172,12 +172,12 @@ function scrollInfini() {
 			} else {
 				order = ''
 			}
-			
+
 			$.ajax({
 				url: './article.php',
 				type: 'post',
 				data: 'scroll='+$(window).data('page')+'&nblus='+$(window).data('nblus')+'&hightlighted='+hightlighted+'&action='+action+'&folder='+folder+'&feed='+feed+order,
- 
+
 				//Succès de la requête
 				success: function(data) {
 					if (data.replace(/^\s+/g,'').replace(/\s+$/g,'') != '')
@@ -425,7 +425,7 @@ function readThis(element,id,from,callback){
 								alert(msg.texte)
 							} else {
 								if( console && console.log && msg!="" ) console.log(msg);
-								switch (activeScreen){ 
+								switch (activeScreen){
 									case '':
 										// cas de la page d'accueil
 										parent.addClass('eventRead');
@@ -439,7 +439,7 @@ function readThis(element,id,from,callback){
 											if($('article section:last').attr('style')=='display: none;') {
 												$(window).scrollTop($(document).height());
 											}
-										}); 
+										});
 										// on compte combien d'article ont été lus afin de les soustraires de la requête pour le scroll infini
 										$(window).data('nblus', $(window).data('nblus')+1);
 										// on diminue le nombre d'article en haut de page
@@ -479,7 +479,7 @@ function readThis(element,id,from,callback){
 				});
 			}
 	}
-	
+
 }
 
 function unReadThis(element,id,from){
@@ -505,7 +505,7 @@ function unReadThis(element,id,from){
 				});
 			}
 	}
-	
+
 }
 
 //synchronisation manuelle lancée depuis le boutton du menu
@@ -557,8 +557,8 @@ function getUrlVars()
 	    } else {
 	    	vars[hash[0]] = '';
 	    }
-	    
-        
+
+
     }
     return vars;
 }

+ 21 - 21
templates/marigolds/settings.html

@@ -14,8 +14,8 @@
 				<aside>
 					<h3>{function="_t('FEED_OPTION')"}</h3>
 					<ul>
-							
-							
+
+
 							<li><a class="toggle" href="#manageBloc">{function="_t('FEED_MANAGING')"}</a></li>
 							<li><a class="toggle" href="#synchronizeBloc">{function="_t('MANUAL_FEED_UPDATE')"}</a></li>
 							<li><a class="toggle" href="#preferenceBloc">{function="_t('PREFERENCES')"}</a></li>
@@ -45,25 +45,25 @@
 						{/loop}
 					</select>
 					 <button>{function="_t('ADD')"}</button></p>
-				
+
 				</section>
 				</form>
 
 				<section class="addBloc">
 				<h3>{function="_t('ADD_FOLDER')"}</h3>
-			
+
 					<form method="POST" action="action.php?action=addFolder">
 						{function="_t('NEW_FOLDER')"} <input type="text" name="newFolder"> <button>{function="_t('ADD')"}</button>
 					</form>
-					
+
 				</section>
 
 					<ul class="clear nochip">
 				    {$feedsForFolder=""}
-					{loop="$folders"}  
-					
+					{loop="$folders"}
+
 					{$feedsForFolder=$value->getFeeds()}
-						
+
 					<li>{if="$value->getId()==1"}<a id="defaultFolder"></a>{/if}
 						<h1 class="folder left" ><span>{$value->getName()}</span> ({function="count($feedsForFolder)"})
 
@@ -71,7 +71,7 @@
 						{if="$value->getId()!='1'"}
 						<button  onclick="if(confirm('{function="_t('CONFIRM_DELETE_FOLDER')"}'))window.location='action.php?action=removeFolder&amp;id={$value->getId()}'">{function="_t('DELETE')"}</button>
 						{/if}
-						
+
 <div class="clear"></div>
 						</h1>
 <div class="clear"></div>
@@ -117,7 +117,7 @@
 						<p><label for="login">{function="_t('LOGIN')"} :</label> <input type="text" id="login" name="login" value="{$myUser->getLogin()}"></p>
 						<p><label for="password">{function="_t('PASSWORD')"} :</label> <input type="text" id="password" name="password" autocomplete="off" value="" placeholder="(sera affiché en clair)"></p>
 						<h4>{function="_t('LET_EMPTY_IF_NO_PASS_CHANGE')"}</h4>
-					
+
 					</section>
 
 					<section>
@@ -198,10 +198,10 @@
 							<legend>{function="_t('KEEP_LAST_X_EVENTS_FEED',array('<input type="text" value="'.$configurationManager->get('feedMaxEvents').'" name="feedMaxEvents" size="4" />'))"}</legend>
 							<h4>{function="_t('KEEP_LAST_X_EVENTS_FEED_DESC')"}</h4>
 						</fieldset>
-					
+
 					</section>
 
-			
+
 
 
 					<button name="installButton">{function="_t('SAVE')"}</button>
@@ -218,14 +218,14 @@
 					<iframe class="importFrame" src="action.php?action=importForm" name="idFrame" id="idFrame" width="100%" height="300" ></iframe>
 				</section>
 
-				
+
 				<section class="exportBloc">
 					<form action="action.php?action=exportFeed" method="POST">
 						<h2>{function="_t('EXPORT_FEED_OPML_FORMAT')"}</h2>
 						<p>{function="_t('OPML_FILE')"} : <button name="exportButton">{function="_t('EXPORT')"}</button></p>
 					</form>
 				</section>
-				
+
 				<section class="bookBloc">
 					<h2>{function="_t('USE_BOOKMARK')"} :</h2>
 					{if="$myUser!=false"}
@@ -235,9 +235,9 @@
 					<p>{function="_t('YOU_MUST_BE_CONNECTED_BOOKMARK')"}</p>
 					{/if}
 				</section>
-				
 
-				
+
+
 				<section class="pluginBloc">
 					<h2>{function="_t('PLUGINS')"} :</h2>
 					<p>{function="_t('CAN_DOWNLOAD_PLUGINS')"} : <a href="https://github.com/ldleman/Leed-market/"> Leed Market</a>.</p>
@@ -246,7 +246,7 @@
 					<ul class="pluginList">
 					{if="count($plugins)==0"}
 					{function="_t('NO_INSTALLED_PLUGINS')"}
-					
+
 					{else}
 					{loop="$plugins"}
 					<li>
@@ -269,13 +269,13 @@
 					{/if}
 				</section>
 
-				
 
-				
+
+
 				{function="Plugin::callHook("setting_post_section", array(&$myUser))"}
 			</article>
-			
-			
+
+
 		</div> <!-- #main -->
 
 {else}

+ 1 - 1
update-1.5.sql

@@ -1,7 +1,7 @@
 /* #############
 ###  MISE À JOUR Base de données de Leed pour fonctionnement en v1.5
 
-Conseils : 
+Conseils :
 - Avant d'effectuer la mise à jour, sauvegardez votre BDD et exportez vos flux en OPML.
 - Attention : "leed_" est à remplacer par votre préfix de table.
 - Ce fichier est à supprimer après installation.