@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\Queue |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | * @return void |
| 26 | 26 | */ |
| 27 | 27 | function action_purger_queue_dist() { |
| 28 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 29 | - $securiser_action(); |
|
| 28 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 29 | + $securiser_action(); |
|
| 30 | 30 | |
| 31 | - if (autoriser('purger', 'queue')) { |
|
| 32 | - include_spip('inc/queue'); |
|
| 33 | - queue_purger(); |
|
| 34 | - } |
|
| 31 | + if (autoriser('purger', 'queue')) { |
|
| 32 | + include_spip('inc/queue'); |
|
| 33 | + queue_purger(); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | 36 | } |
@@ -23,23 +23,23 @@ |
||
| 23 | 23 | |
| 24 | 24 | define('_SUB_REGEXP_SYMBOL', '[\w_:.-]'); |
| 25 | 25 | |
| 26 | -define('_REGEXP_NMTOKEN', '/^' . _SUB_REGEXP_SYMBOL . '+$/'); |
|
| 26 | +define('_REGEXP_NMTOKEN', '/^'._SUB_REGEXP_SYMBOL.'+$/'); |
|
| 27 | 27 | |
| 28 | -define('_REGEXP_NMTOKENS', '/^(' . _SUB_REGEXP_SYMBOL . '+\s*)*$/'); |
|
| 28 | +define('_REGEXP_NMTOKENS', '/^('._SUB_REGEXP_SYMBOL.'+\s*)*$/'); |
|
| 29 | 29 | |
| 30 | -define('_REGEXP_ID', '/^[A-Za-z_:]' . _SUB_REGEXP_SYMBOL . '*$/'); |
|
| 30 | +define('_REGEXP_ID', '/^[A-Za-z_:]'._SUB_REGEXP_SYMBOL.'*$/'); |
|
| 31 | 31 | |
| 32 | -define('_REGEXP_ENTITY_USE', '/%(' . _SUB_REGEXP_SYMBOL . '+);/'); |
|
| 33 | -define('_REGEXP_ENTITY_DEF', '/^%(' . _SUB_REGEXP_SYMBOL . '+);/'); |
|
| 32 | +define('_REGEXP_ENTITY_USE', '/%('._SUB_REGEXP_SYMBOL.'+);/'); |
|
| 33 | +define('_REGEXP_ENTITY_DEF', '/^%('._SUB_REGEXP_SYMBOL.'+);/'); |
|
| 34 | 34 | define('_REGEXP_TYPE_XML', 'PUBLIC|SYSTEM|INCLUDE|IGNORE|CDATA'); |
| 35 | -define('_REGEXP_ENTITY_DECL', '/^<!ENTITY\s+(%?)\s*(' . |
|
| 36 | - _SUB_REGEXP_SYMBOL . |
|
| 37 | - '+;?)\s+(' . |
|
| 38 | - _REGEXP_TYPE_XML . |
|
| 39 | - ')?\s*(' . |
|
| 40 | - "('([^']*)')" . |
|
| 41 | - '|("([^"]*)")' . |
|
| 42 | - '|\s*(%' . _SUB_REGEXP_SYMBOL . '+;)\s*' . |
|
| 35 | +define('_REGEXP_ENTITY_DECL', '/^<!ENTITY\s+(%?)\s*('. |
|
| 36 | + _SUB_REGEXP_SYMBOL. |
|
| 37 | + '+;?)\s+('. |
|
| 38 | + _REGEXP_TYPE_XML. |
|
| 39 | + ')?\s*('. |
|
| 40 | + "('([^']*)')". |
|
| 41 | + '|("([^"]*)")'. |
|
| 42 | + '|\s*(%'._SUB_REGEXP_SYMBOL.'+;)\s*'. |
|
| 43 | 43 | ')\s*(--.*?--)?("([^"]*)")?\s*>\s*(.*)$/s'); |
| 44 | 44 | |
| 45 | 45 | define('_REGEXP_INCLUDE_USE', '/^<!\[\s*%\s*([^;]*);\s*\[\s*(.*)$/s'); |
@@ -11,12 +11,12 @@ discard block |
||
| 11 | 11 | \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | define( |
| 18 | - '_REGEXP_DOCTYPE', |
|
| 19 | - '/^((?:<\001?[?][^>]*>\s*)*(?:<!--.*?-->\s*)*)*<!DOCTYPE\s+(\w+)\s+(\w+)\s*([^>]*)>\s*/s' |
|
| 18 | + '_REGEXP_DOCTYPE', |
|
| 19 | + '/^((?:<\001?[?][^>]*>\s*)*(?:<!--.*?-->\s*)*)*<!DOCTYPE\s+(\w+)\s+(\w+)\s*([^>]*)>\s*/s' |
|
| 20 | 20 | ); |
| 21 | 21 | |
| 22 | 22 | define('_REGEXP_XML', '/^(\s*(?:<[?][^x>][^>]*>\s*)?(?:<[?]xml[^>]*>)?\s*(?:<!--.*?-->\s*)*)<(\w+)/s'); |
@@ -35,14 +35,14 @@ discard block |
||
| 35 | 35 | define('_REGEXP_ENTITY_DEF', '/^%(' . _SUB_REGEXP_SYMBOL . '+);/'); |
| 36 | 36 | define('_REGEXP_TYPE_XML', 'PUBLIC|SYSTEM|INCLUDE|IGNORE|CDATA'); |
| 37 | 37 | define('_REGEXP_ENTITY_DECL', '/^<!ENTITY\s+(%?)\s*(' . |
| 38 | - _SUB_REGEXP_SYMBOL . |
|
| 39 | - '+;?)\s+(' . |
|
| 40 | - _REGEXP_TYPE_XML . |
|
| 41 | - ')?\s*(' . |
|
| 42 | - "('([^']*)')" . |
|
| 43 | - '|("([^"]*)")' . |
|
| 44 | - '|\s*(%' . _SUB_REGEXP_SYMBOL . '+;)\s*' . |
|
| 45 | - ')\s*(--.*?--)?("([^"]*)")?\s*>\s*(.*)$/s'); |
|
| 38 | + _SUB_REGEXP_SYMBOL . |
|
| 39 | + '+;?)\s+(' . |
|
| 40 | + _REGEXP_TYPE_XML . |
|
| 41 | + ')?\s*(' . |
|
| 42 | + "('([^']*)')" . |
|
| 43 | + '|("([^"]*)")' . |
|
| 44 | + '|\s*(%' . _SUB_REGEXP_SYMBOL . '+;)\s*' . |
|
| 45 | + ')\s*(--.*?--)?("([^"]*)")?\s*>\s*(.*)$/s'); |
|
| 46 | 46 | |
| 47 | 47 | define('_REGEXP_INCLUDE_USE', '/^<!\[\s*%\s*([^;]*);\s*\[\s*(.*)$/s'); |
| 48 | 48 | |
@@ -52,11 +52,11 @@ discard block |
||
| 52 | 52 | * Document Type Compilation |
| 53 | 53 | **/ |
| 54 | 54 | class DTC { |
| 55 | - public $macros = []; |
|
| 56 | - public $elements = []; |
|
| 57 | - public $peres = []; |
|
| 58 | - public $attributs = []; |
|
| 59 | - public $entites = []; |
|
| 60 | - public $regles = []; |
|
| 61 | - public $pcdata = []; |
|
| 55 | + public $macros = []; |
|
| 56 | + public $elements = []; |
|
| 57 | + public $peres = []; |
|
| 58 | + public $attributs = []; |
|
| 59 | + public $entites = []; |
|
| 60 | + public $regles = []; |
|
| 61 | + public $pcdata = []; |
|
| 62 | 62 | } |
@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | case is_null($var): |
| 32 | 32 | return 'null'; |
| 33 | 33 | case is_string($var): |
| 34 | - return '"' . addcslashes($var, "\"\\\n\r/") . '"'; |
|
| 34 | + return '"'.addcslashes($var, "\"\\\n\r/").'"'; |
|
| 35 | 35 | case is_bool($var): |
| 36 | 36 | return $var ? 'true' : 'false'; |
| 37 | 37 | case is_scalar($var): |
| 38 | - return (string)$var; |
|
| 38 | + return (string) $var; |
|
| 39 | 39 | case is_object($var):// blam |
| 40 | 40 | $var = get_object_vars($var); |
| 41 | 41 | $asso = true; |
@@ -50,19 +50,19 @@ discard block |
||
| 50 | 50 | if ($asso) { |
| 51 | 51 | $ret = '{'; |
| 52 | 52 | foreach ($var as $key => $elt) { |
| 53 | - $ret .= $sep . '"' . $key . '":' . var2js($elt); |
|
| 53 | + $ret .= $sep.'"'.$key.'":'.var2js($elt); |
|
| 54 | 54 | $sep = ','; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - return $ret . '}'; |
|
| 57 | + return $ret.'}'; |
|
| 58 | 58 | } else { |
| 59 | 59 | $ret = '['; |
| 60 | 60 | foreach ($var as $elt) { |
| 61 | - $ret .= $sep . var2js($elt); |
|
| 61 | + $ret .= $sep.var2js($elt); |
|
| 62 | 62 | $sep = ','; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - return $ret . ']'; |
|
| 65 | + return $ret.']'; |
|
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | 68 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | // flag indiquant qu'on est en iframe et qu'il faut proteger nos |
| 83 | 83 | // donnees dans un <textarea> ; attention $_FILES a ete vide par array_pop |
| 84 | 84 | if (defined('FILE_UPLOAD')) { |
| 85 | - return '<textarea>' . spip_htmlspecialchars($var) . '</textarea>'; |
|
| 85 | + return '<textarea>'.spip_htmlspecialchars($var).'</textarea>'; |
|
| 86 | 86 | } else { |
| 87 | 87 | return $var; |
| 88 | 88 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | // Les fonctions de toggg pour faire du JSON |
@@ -25,63 +25,63 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | 27 | function var2js($var) { |
| 28 | - $asso = false; |
|
| 29 | - switch (true) { |
|
| 30 | - case is_null($var): |
|
| 31 | - return 'null'; |
|
| 32 | - case is_string($var): |
|
| 33 | - return '"' . addcslashes($var, "\"\\\n\r/") . '"'; |
|
| 34 | - case is_bool($var): |
|
| 35 | - return $var ? 'true' : 'false'; |
|
| 36 | - case is_scalar($var): |
|
| 37 | - return (string)$var; |
|
| 38 | - case is_object($var):// blam |
|
| 39 | - $var = get_object_vars($var); |
|
| 40 | - $asso = true; |
|
| 41 | - // $var devient un array, on continue |
|
| 42 | - case is_array($var): |
|
| 43 | - $keys = array_keys($var); |
|
| 44 | - $ikey = count($keys); |
|
| 45 | - while (!$asso && $ikey--) { |
|
| 46 | - $asso = $ikey !== $keys[$ikey]; |
|
| 47 | - } |
|
| 48 | - $sep = ''; |
|
| 49 | - if ($asso) { |
|
| 50 | - $ret = '{'; |
|
| 51 | - foreach ($var as $key => $elt) { |
|
| 52 | - $ret .= $sep . '"' . $key . '":' . var2js($elt); |
|
| 53 | - $sep = ','; |
|
| 54 | - } |
|
| 28 | + $asso = false; |
|
| 29 | + switch (true) { |
|
| 30 | + case is_null($var): |
|
| 31 | + return 'null'; |
|
| 32 | + case is_string($var): |
|
| 33 | + return '"' . addcslashes($var, "\"\\\n\r/") . '"'; |
|
| 34 | + case is_bool($var): |
|
| 35 | + return $var ? 'true' : 'false'; |
|
| 36 | + case is_scalar($var): |
|
| 37 | + return (string)$var; |
|
| 38 | + case is_object($var):// blam |
|
| 39 | + $var = get_object_vars($var); |
|
| 40 | + $asso = true; |
|
| 41 | + // $var devient un array, on continue |
|
| 42 | + case is_array($var): |
|
| 43 | + $keys = array_keys($var); |
|
| 44 | + $ikey = count($keys); |
|
| 45 | + while (!$asso && $ikey--) { |
|
| 46 | + $asso = $ikey !== $keys[$ikey]; |
|
| 47 | + } |
|
| 48 | + $sep = ''; |
|
| 49 | + if ($asso) { |
|
| 50 | + $ret = '{'; |
|
| 51 | + foreach ($var as $key => $elt) { |
|
| 52 | + $ret .= $sep . '"' . $key . '":' . var2js($elt); |
|
| 53 | + $sep = ','; |
|
| 54 | + } |
|
| 55 | 55 | |
| 56 | - return $ret . '}'; |
|
| 57 | - } else { |
|
| 58 | - $ret = '['; |
|
| 59 | - foreach ($var as $elt) { |
|
| 60 | - $ret .= $sep . var2js($elt); |
|
| 61 | - $sep = ','; |
|
| 62 | - } |
|
| 56 | + return $ret . '}'; |
|
| 57 | + } else { |
|
| 58 | + $ret = '['; |
|
| 59 | + foreach ($var as $elt) { |
|
| 60 | + $ret .= $sep . var2js($elt); |
|
| 61 | + $sep = ','; |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - return $ret . ']'; |
|
| 65 | - } |
|
| 66 | - } |
|
| 64 | + return $ret . ']'; |
|
| 65 | + } |
|
| 66 | + } |
|
| 67 | 67 | |
| 68 | - return false; |
|
| 68 | + return false; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | if (!function_exists('json_encode')) { |
| 72 | - function json_encode($v) { |
|
| 73 | - return var2js($v); |
|
| 74 | - } |
|
| 72 | + function json_encode($v) { |
|
| 73 | + return var2js($v); |
|
| 74 | + } |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | function json_export($var) { |
| 78 | - $var = json_encode($var, JSON_THROW_ON_ERROR); |
|
| 78 | + $var = json_encode($var, JSON_THROW_ON_ERROR); |
|
| 79 | 79 | |
| 80 | - // flag indiquant qu'on est en iframe et qu'il faut proteger nos |
|
| 81 | - // donnees dans un <textarea> ; attention $_FILES a ete vide par array_pop |
|
| 82 | - if (defined('FILE_UPLOAD')) { |
|
| 83 | - return '<textarea>' . spip_htmlspecialchars($var) . '</textarea>'; |
|
| 84 | - } else { |
|
| 85 | - return $var; |
|
| 86 | - } |
|
| 80 | + // flag indiquant qu'on est en iframe et qu'il faut proteger nos |
|
| 81 | + // donnees dans un <textarea> ; attention $_FILES a ete vide par array_pop |
|
| 82 | + if (defined('FILE_UPLOAD')) { |
|
| 83 | + return '<textarea>' . spip_htmlspecialchars($var) . '</textarea>'; |
|
| 84 | + } else { |
|
| 85 | + return $var; |
|
| 86 | + } |
|
| 87 | 87 | } |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | $namespace[null] = null; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - $name = strtolower((string)$obj->getName()); |
|
| 61 | - $text = trim((string)$obj); |
|
| 60 | + $name = strtolower((string) $obj->getName()); |
|
| 61 | + $text = trim((string) $obj); |
|
| 62 | 62 | if (strlen($text) <= 0) { |
| 63 | 63 | $text = null; |
| 64 | 64 | } |
@@ -71,10 +71,10 @@ discard block |
||
| 71 | 71 | // attributes |
| 72 | 72 | $objAttributes = $obj->attributes($ns, true); |
| 73 | 73 | foreach ($objAttributes as $attributeName => $attributeValue) { |
| 74 | - $attribName = strtolower(trim((string)$attributeName)); |
|
| 75 | - $attribVal = trim((string)$attributeValue); |
|
| 74 | + $attribName = strtolower(trim((string) $attributeName)); |
|
| 75 | + $attribVal = trim((string) $attributeValue); |
|
| 76 | 76 | if (!empty($ns)) { |
| 77 | - $attribName = $ns . ':' . $attribName; |
|
| 77 | + $attribName = $ns.':'.$attribName; |
|
| 78 | 78 | } |
| 79 | 79 | $attributes[$attribName] = $attribVal; |
| 80 | 80 | } |
@@ -82,9 +82,9 @@ discard block |
||
| 82 | 82 | // children |
| 83 | 83 | $objChildren = $obj->children($ns, true); |
| 84 | 84 | foreach ($objChildren as $childName => $child) { |
| 85 | - $childName = strtolower((string)$childName); |
|
| 85 | + $childName = strtolower((string) $childName); |
|
| 86 | 86 | if (!empty($ns)) { |
| 87 | - $childName = $ns . ':' . $childName; |
|
| 87 | + $childName = $ns.':'.$childName; |
|
| 88 | 88 | } |
| 89 | 89 | $children[$childName][] = xmlObjToArr($child, $namespace); |
| 90 | 90 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | \***************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 13 | - return; |
|
| 13 | + return; |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | |
@@ -22,12 +22,12 @@ discard block |
||
| 22 | 22 | * @return array |
| 23 | 23 | */ |
| 24 | 24 | function inc_simplexml_to_array_dist($u, $utiliser_namespace = false) { |
| 25 | - // decoder la chaine en SimpleXML si pas deja fait |
|
| 26 | - if (is_string($u)) { |
|
| 27 | - $u = simplexml_load_string($u); |
|
| 28 | - } |
|
| 25 | + // decoder la chaine en SimpleXML si pas deja fait |
|
| 26 | + if (is_string($u)) { |
|
| 27 | + $u = simplexml_load_string($u); |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | - return ['root' => @xmlObjToArr($u, $utiliser_namespace)]; |
|
| 30 | + return ['root' => @xmlObjToArr($u, $utiliser_namespace)]; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | |
@@ -42,67 +42,67 @@ discard block |
||
| 42 | 42 | **/ |
| 43 | 43 | function xmlObjToArr($obj, $utiliser_namespace = false) { |
| 44 | 44 | |
| 45 | - $namespace = []; |
|
| 46 | - $tableau = []; |
|
| 45 | + $namespace = []; |
|
| 46 | + $tableau = []; |
|
| 47 | 47 | |
| 48 | - // Cette fonction getDocNamespaces() est longue sur de gros xml. On permet donc |
|
| 49 | - // de l'activer ou pas suivant le contenu supposé du XML |
|
| 50 | - if (is_object($obj)) { |
|
| 51 | - if (is_array($utiliser_namespace)) { |
|
| 52 | - $namespace = $utiliser_namespace; |
|
| 53 | - } else { |
|
| 54 | - if ($utiliser_namespace) { |
|
| 55 | - $namespace = $obj->getDocNamespaces(true); |
|
| 56 | - } |
|
| 57 | - $namespace[null] = null; |
|
| 58 | - } |
|
| 48 | + // Cette fonction getDocNamespaces() est longue sur de gros xml. On permet donc |
|
| 49 | + // de l'activer ou pas suivant le contenu supposé du XML |
|
| 50 | + if (is_object($obj)) { |
|
| 51 | + if (is_array($utiliser_namespace)) { |
|
| 52 | + $namespace = $utiliser_namespace; |
|
| 53 | + } else { |
|
| 54 | + if ($utiliser_namespace) { |
|
| 55 | + $namespace = $obj->getDocNamespaces(true); |
|
| 56 | + } |
|
| 57 | + $namespace[null] = null; |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | - $name = strtolower((string)$obj->getName()); |
|
| 61 | - $text = trim((string)$obj); |
|
| 62 | - if (strlen($text) <= 0) { |
|
| 63 | - $text = null; |
|
| 64 | - } |
|
| 60 | + $name = strtolower((string)$obj->getName()); |
|
| 61 | + $text = trim((string)$obj); |
|
| 62 | + if (strlen($text) <= 0) { |
|
| 63 | + $text = null; |
|
| 64 | + } |
|
| 65 | 65 | |
| 66 | - $children = []; |
|
| 67 | - $attributes = []; |
|
| 66 | + $children = []; |
|
| 67 | + $attributes = []; |
|
| 68 | 68 | |
| 69 | - // get info for all namespaces |
|
| 70 | - foreach (array_keys($namespace) as $ns) { |
|
| 71 | - // attributes |
|
| 72 | - $objAttributes = $obj->attributes($ns, true); |
|
| 73 | - foreach ($objAttributes as $attributeName => $attributeValue) { |
|
| 74 | - $attribName = strtolower(trim((string)$attributeName)); |
|
| 75 | - $attribVal = trim((string)$attributeValue); |
|
| 76 | - if (!empty($ns)) { |
|
| 77 | - $attribName = $ns . ':' . $attribName; |
|
| 78 | - } |
|
| 79 | - $attributes[$attribName] = $attribVal; |
|
| 80 | - } |
|
| 69 | + // get info for all namespaces |
|
| 70 | + foreach (array_keys($namespace) as $ns) { |
|
| 71 | + // attributes |
|
| 72 | + $objAttributes = $obj->attributes($ns, true); |
|
| 73 | + foreach ($objAttributes as $attributeName => $attributeValue) { |
|
| 74 | + $attribName = strtolower(trim((string)$attributeName)); |
|
| 75 | + $attribVal = trim((string)$attributeValue); |
|
| 76 | + if (!empty($ns)) { |
|
| 77 | + $attribName = $ns . ':' . $attribName; |
|
| 78 | + } |
|
| 79 | + $attributes[$attribName] = $attribVal; |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | - // children |
|
| 83 | - $objChildren = $obj->children($ns, true); |
|
| 84 | - foreach ($objChildren as $childName => $child) { |
|
| 85 | - $childName = strtolower((string)$childName); |
|
| 86 | - if (!empty($ns)) { |
|
| 87 | - $childName = $ns . ':' . $childName; |
|
| 88 | - } |
|
| 89 | - $children[$childName][] = xmlObjToArr($child, $namespace); |
|
| 90 | - } |
|
| 91 | - } |
|
| 82 | + // children |
|
| 83 | + $objChildren = $obj->children($ns, true); |
|
| 84 | + foreach ($objChildren as $childName => $child) { |
|
| 85 | + $childName = strtolower((string)$childName); |
|
| 86 | + if (!empty($ns)) { |
|
| 87 | + $childName = $ns . ':' . $childName; |
|
| 88 | + } |
|
| 89 | + $children[$childName][] = xmlObjToArr($child, $namespace); |
|
| 90 | + } |
|
| 91 | + } |
|
| 92 | 92 | |
| 93 | - $tableau = [ |
|
| 94 | - 'name' => $name, |
|
| 95 | - ]; |
|
| 96 | - if ($text) { |
|
| 97 | - $tableau['text'] = $text; |
|
| 98 | - } |
|
| 99 | - if ($attributes) { |
|
| 100 | - $tableau['attributes'] = $attributes; |
|
| 101 | - } |
|
| 102 | - if ($children) { |
|
| 103 | - $tableau['children'] = $children; |
|
| 104 | - } |
|
| 105 | - } |
|
| 93 | + $tableau = [ |
|
| 94 | + 'name' => $name, |
|
| 95 | + ]; |
|
| 96 | + if ($text) { |
|
| 97 | + $tableau['text'] = $text; |
|
| 98 | + } |
|
| 99 | + if ($attributes) { |
|
| 100 | + $tableau['attributes'] = $attributes; |
|
| 101 | + } |
|
| 102 | + if ($children) { |
|
| 103 | + $tableau['children'] = $children; |
|
| 104 | + } |
|
| 105 | + } |
|
| 106 | 106 | |
| 107 | - return $tableau; |
|
| 107 | + return $tableau; |
|
| 108 | 108 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | include_spip('inc/precharger_objet'); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * Couples clés / valeurs des champs du formulaire à charger. |
| 40 | 40 | **/ |
| 41 | 41 | function inc_precharger_article_dist($id_article, $id_rubrique = 0, $lier_trad = 0) { |
| 42 | - return precharger_objet('article', $id_article, $id_rubrique, $lier_trad, 'titre'); |
|
| 42 | + return precharger_objet('article', $id_article, $id_rubrique, $lier_trad, 'titre'); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |
@@ -60,5 +60,5 @@ discard block |
||
| 60 | 60 | * Couples clés / valeurs des champs du formulaire à charger |
| 61 | 61 | **/ |
| 62 | 62 | function inc_precharger_traduction_article_dist($id_article, $id_rubrique = 0, $lier_trad = 0) { |
| 63 | - return precharger_traduction_objet('article', $id_article, $id_rubrique, $lier_trad, 'titre'); |
|
| 63 | + return precharger_traduction_objet('article', $id_article, $id_rubrique, $lier_trad, 'titre'); |
|
| 64 | 64 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | **/ |
| 22 | 22 | |
| 23 | 23 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 24 | - return; |
|
| 24 | + return; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | include_spip('base/objets'); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | include_spip('prive/objets/liste/auteurs_fonctions'); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | include_spip('prive/objets/liste/auteurs_fonctions'); |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 4 | - return; |
|
| 4 | + return; |
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | include_spip('inc/bandeau'); |