diff options
| author | 2013-11-04 20:48:38 +0100 | |
|---|---|---|
| committer | 2013-11-04 23:34:07 +0100 | |
| commit | 5e1109312044b41932e14eb2e8e9ad9497d2ac61 (patch) | |
| tree | ee2bf0d13cc40ceb28bab7423c9f896574f60645 /lib | |
| parent | 4a999fb6286bafcd070a1ebe53ceb5effacc8b59 (diff) | |
Détails : blancs
Suppression des blancs en fin de ligne
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lib_phpQuery.php | 42 | ||||
| -rw-r--r-- | lib/lib_rss.php | 20 | ||||
| -rw-r--r-- | lib/lib_text.php | 2 | ||||
| -rw-r--r-- | lib/minz/Request.php | 40 | ||||
| -rwxr-xr-x | lib/minz/Url.php | 10 |
5 files changed, 57 insertions, 57 deletions
diff --git a/lib/lib_phpQuery.php b/lib/lib_phpQuery.php index 4aefb70fe..194efa0c6 100644 --- a/lib/lib_phpQuery.php +++ b/lib/lib_phpQuery.php @@ -280,7 +280,7 @@ class DOMDocumentWrapper { // @see http://www.w3.org/International/O-HTTP-charset if (! $documentCharset) { $documentCharset = 'ISO-8859-1'; - $addDocumentCharset = true; + $addDocumentCharset = true; } // Should be careful here, still need 'magic encoding detection' since lots of pages have other 'default encoding' // Worse, some pages can have mixed encodings... we'll try not to worry about that @@ -567,7 +567,7 @@ class DOMDocumentWrapper { // if ($fake === false) // throw new Exception("Error loading documentFragment markup"); // else -// $return = array_merge($return, +// $return = array_merge($return, // $this->import($fake->root->childNodes) // ); // } else { @@ -969,24 +969,24 @@ interface ICallbackNamed { } /** * Callback class introduces currying-like pattern. - * + * * Example: * function foo($param1, $param2, $param3) { * var_dump($param1, $param2, $param3); * } - * $fooCurried = new Callback('foo', - * 'param1 is now statically set', + * $fooCurried = new Callback('foo', + * 'param1 is now statically set', * new CallbackParam, new CallbackParam * ); * phpQuery::callbackRun($fooCurried, * array('param2 value', 'param3 value' * ); - * - * Callback class is supported in all phpQuery methods which accepts callbacks. + * + * Callback class is supported in all phpQuery methods which accepts callbacks. * * @link http://code.google.com/p/phpquery/wiki/Callbacks#Param_Structures * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> - * + * * @TODO??? return fake forwarding function created via create_function * @TODO honor paramStructure */ @@ -995,7 +995,7 @@ class Callback public $callback = null; public $params = null; protected $name; - public function __construct($callback, $param1 = null, $param2 = null, + public function __construct($callback, $param1 = null, $param2 = null, $param3 = null) { $params = func_get_args(); $params = array_slice($params, 1); @@ -1024,11 +1024,11 @@ class Callback } /** * Shorthand for new Callback(create_function(...), ...); - * + * * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> */ class CallbackBody extends Callback { - public function __construct($paramList, $code, $param1 = null, $param2 = null, + public function __construct($paramList, $code, $param1 = null, $param2 = null, $param3 = null) { $params = func_get_args(); $params = array_slice($params, 2); @@ -1038,7 +1038,7 @@ class CallbackBody extends Callback { } /** * Callback type which on execution returns reference passed during creation. - * + * * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> */ class CallbackReturnReference extends Callback @@ -1060,7 +1060,7 @@ class CallbackReturnReference extends Callback } /** * Callback type which on execution returns value passed during creation. - * + * * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> */ class CallbackReturnValue extends Callback @@ -1087,7 +1087,7 @@ class CallbackReturnValue extends Callback } /** * CallbackParameterToReference can be used when we don't really want a callback, - * only parameter passed to it. CallbackParameterToReference takes first + * only parameter passed to it. CallbackParameterToReference takes first * parameter's value and passes it to reference. * * @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com> @@ -1095,7 +1095,7 @@ class CallbackReturnValue extends Callback class CallbackParameterToReference extends Callback { /** * @param $reference - * @TODO implement $paramIndex; + * @TODO implement $paramIndex; * param index choose which callback param will be passed to reference */ public function __construct(&$reference){ @@ -2994,7 +2994,7 @@ class phpQueryObject } /** * Enter description here... - * + * * @param $code * @return unknown_type */ @@ -3005,7 +3005,7 @@ class phpQueryObject } /** * Enter description here... - * + * * @param $code * @return unknown_type */ @@ -4034,7 +4034,7 @@ class phpQueryObject } /** * Enter description here... - * + * * @param <type> $key * @param <type> $value */ @@ -4051,7 +4051,7 @@ class phpQueryObject } /** * Enter description here... - * + * * @param <type> $key */ public function removeData($key) { @@ -4392,8 +4392,8 @@ if (!function_exists('mb_substr_count')) */ abstract class phpQuery { /** - * XXX: Workaround for mbstring problems - * + * XXX: Workaround for mbstring problems + * * @var bool */ public static $mbstringSupport = true; diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 41e95fc90..7f22c8244 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -43,17 +43,17 @@ function get_domain ($url) { function opml_export ($cats) { $txt = ''; - + foreach ($cats as $cat) { $txt .= '<outline text="' . $cat['name'] . '">' . "\n"; - + foreach ($cat['feeds'] as $feed) { $txt .= "\t" . '<outline text="' . cleanText ($feed->name ()) . '" type="rss" xmlUrl="' . htmlentities ($feed->url (), ENT_COMPAT, 'UTF-8') . '" htmlUrl="' . htmlentities ($feed->website (), ENT_COMPAT, 'UTF-8') . '" />' . "\n"; } - + $txt .= '</outline>' . "\n"; } - + return $txt; } @@ -79,13 +79,13 @@ function opml_import ($xml) { if (!isset ($outline['xmlUrl'])) { // Catégorie $title = ''; - + if (isset ($outline['text'])) { $title = (string) $outline['text']; } elseif (isset ($outline['title'])) { $title = (string) $outline['title']; } - + if ($title) { // Permet d'éviter les soucis au niveau des id : // ceux-ci sont générés en fonction de la date, @@ -99,7 +99,7 @@ function opml_import ($xml) { $cat = new Category ($title); } $categories[] = $cat; - + $feeds = array_merge ($feeds, getFeedsOutline ($outline, $cat->id ())); } } else { @@ -116,7 +116,7 @@ function opml_import ($xml) { */ function getFeedsOutline ($outline, $cat_id) { $feeds = array (); - + foreach ($outline->children () as $child) { if (isset ($child['xmlUrl'])) { $feeds[] = getFeed ($child, $cat_id); @@ -127,7 +127,7 @@ function getFeedsOutline ($outline, $cat_id) { ); } } - + return $feeds; } @@ -149,7 +149,7 @@ function getFeed ($outline, $cat_id) { /* permet de récupérer le contenu d'un article pour un flux qui n'est pas complet */ function get_content_by_parsing ($url, $path) { $html = file_get_contents ($url); - + if ($html) { $doc = phpQuery::newDocument ($html); $content = $doc->find ($path); diff --git a/lib/lib_text.php b/lib/lib_text.php index 9792e191e..99bac0c36 100644 --- a/lib/lib_text.php +++ b/lib/lib_text.php @@ -72,7 +72,7 @@ function splitUri($matches) { $uri = $matches[1].':'.$matches[2].$matches[3]; $t = parse_url($uri); $link = $matches[3]; - + if (!empty($t['scheme'])) { return ' <a href="'.$uri.'">'.$link.'</a>'; } else { diff --git a/lib/minz/Request.php b/lib/minz/Request.php index bde17f988..ffddbe6ad 100644 --- a/lib/minz/Request.php +++ b/lib/minz/Request.php @@ -1,5 +1,5 @@ <?php -/** +/** * MINZ - Copyright 2011 Marien Fressinaud * Sous licence AGPL3 <http://www.gnu.org/licenses/> */ @@ -11,12 +11,12 @@ class Request { private static $controller_name = ''; private static $action_name = ''; private static $params = array (); - + private static $default_controller_name = 'index'; private static $default_action_name = 'index'; - + public static $reseted = true; - + /** * Getteurs */ @@ -49,7 +49,7 @@ class Request { public static function defaultActionName () { return self::$default_action_name; } - + /** * Setteurs */ @@ -63,7 +63,7 @@ class Request { if (!is_array($params)) { $params = array ($params); } - + self::$params = $params; } public static function _param ($key, $value = false) { @@ -73,21 +73,21 @@ class Request { self::$params[$key] = $value; } } - + /** * Initialise la Request */ public static function init () { self::magicQuotesOff (); } - + /** * Retourn le nom de domaine du site */ public static function getDomainName () { return $_SERVER['HTTP_HOST']; } - + /** * Détermine la base de l'url * @return la base de l'url @@ -95,7 +95,7 @@ class Request { public static function getBaseUrl () { return Configuration::baseUrl (); } - + /** * Récupère l'URI de la requête * @return l'URI @@ -104,16 +104,16 @@ class Request { if (isset ($_SERVER['REQUEST_URI'])) { $base_url = self::getBaseUrl (); $uri = $_SERVER['REQUEST_URI']; - + $len_base_url = strlen ($base_url); - $real_uri = substr ($uri, $len_base_url); + $real_uri = substr ($uri, $len_base_url); } else { $real_uri = ''; } - + return $real_uri; } - + /** * Relance une requête * @param $url l'url vers laquelle est relancée la requête @@ -122,13 +122,13 @@ class Request { */ public static function forward ($url = array (), $redirect = false) { $url = Url::checkUrl ($url); - + if ($redirect) { header ('Location: ' . Url::display ($url, 'php')); exit (); } else { self::$reseted = true; - + self::_controllerName ($url['c']); self::_actionName ($url['a']); self::_params (array_merge ( @@ -137,7 +137,7 @@ class Request { )); } } - + /** * Permet de récupérer une variable de type $_GET * @param $param nom de la variable @@ -155,7 +155,7 @@ class Request { return $default; } } - + /** * Permet de récupérer une variable de type $_POST * @param $param nom de la variable @@ -173,7 +173,7 @@ class Request { return $default; } } - + /** * Méthode désactivant les magic_quotes pour les variables * $_GET @@ -187,7 +187,7 @@ class Request { $_COOKIE = Helper::stripslashes_r ($_COOKIE); } } - + public static function isPost () { return !empty ($_POST) || !empty ($_FILES); } diff --git a/lib/minz/Url.php b/lib/minz/Url.php index 4a703e64b..ce051ebd9 100755 --- a/lib/minz/Url.php +++ b/lib/minz/Url.php @@ -18,9 +18,9 @@ class Url { */ public static function display ($url = array (), $encodage = 'html', $absolute = false) { $url = self::checkUrl ($url); - + $url_string = ''; - + if ($absolute) { if (is_array ($url) && isset ($url['protocol'])) { $protocol = $url['protocol']; @@ -34,10 +34,10 @@ class Url { else { $url_string = '.'; } - + if (is_array ($url)) { $router = new Router (); - + if (Configuration::useUrlRewriting ()) { $url_string .= $router->printUriRewrited ($url); } else { @@ -46,7 +46,7 @@ class Url { } else { $url_string .= $url; } - + return $url_string; } |
