Skip to content
Extraits de code Groupes Projets
Valider 14fbcbda rédigé par Christian Lefebvre's avatar Christian Lefebvre
Parcourir les fichiers

autodoc

parent c5ec123b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -20,6 +20,7 @@ if (_SPIP_LOCK_MODE==2) ...@@ -20,6 +20,7 @@ if (_SPIP_LOCK_MODE==2)
include_spip('inc/nfslock'); include_spip('inc/nfslock');
$GLOBALS['liste_verrous'] = array(); $GLOBALS['liste_verrous'] = array();
// http://doc.spip.org/@spip_fopen_lock
function spip_fopen_lock($fichier,$mode,$verrou){ function spip_fopen_lock($fichier,$mode,$verrou){
if (_SPIP_LOCK_MODE==1){ if (_SPIP_LOCK_MODE==1){
if ($fl = @fopen($fichier,$mode)) if ($fl = @fopen($fichier,$mode))
...@@ -36,6 +37,7 @@ function spip_fopen_lock($fichier,$mode,$verrou){ ...@@ -36,6 +37,7 @@ function spip_fopen_lock($fichier,$mode,$verrou){
} }
return @fopen($fichier,$mode); return @fopen($fichier,$mode);
} }
// http://doc.spip.org/@spip_fclose_unlock
function spip_fclose_unlock($handle){ function spip_fclose_unlock($handle){
if (_SPIP_LOCK_MODE==1){ if (_SPIP_LOCK_MODE==1){
@flock($handle, LOCK_UN); @flock($handle, LOCK_UN);
......
...@@ -88,6 +88,7 @@ include_spip('inc/acces'); ...@@ -88,6 +88,7 @@ include_spip('inc/acces');
define('_DEFAULT_LOCKTIME',60); define('_DEFAULT_LOCKTIME',60);
define('_NAME_LOCK','spip_nfs_lock'); define('_NAME_LOCK','spip_nfs_lock');
// http://doc.spip.org/@spip_nfslock
function spip_nfslock($fichier,$max_age=0) { function spip_nfslock($fichier,$max_age=0) {
$tries = 0; $tries = 0;
...@@ -207,6 +208,7 @@ function spip_nfslock($fichier,$max_age=0) { ...@@ -207,6 +208,7 @@ function spip_nfslock($fichier,$max_age=0) {
* *
*/ */
// http://doc.spip.org/@spip_nfsunlock
function spip_nfsunlock($fichier, $birth, $max_age=0, $test = false) { function spip_nfsunlock($fichier, $birth, $max_age=0, $test = false) {
$id = creer_uniqid(); $id = creer_uniqid();
if (!$max_age) $max_age = _DEFAULT_LOCKTIME; if (!$max_age) $max_age = _DEFAULT_LOCKTIME;
...@@ -285,6 +287,7 @@ function spip_nfsunlock($fichier, $birth, $max_age=0, $test = false) { ...@@ -285,6 +287,7 @@ function spip_nfsunlock($fichier, $birth, $max_age=0, $test = false) {
* coded separately to make things as clear as possible. * coded separately to make things as clear as possible.
*/ */
// http://doc.spip.org/@spip_nfslock_test
function spip_nfslock_test($fichier, $birth, $max_age=0) { function spip_nfslock_test($fichier, $birth, $max_age=0) {
return spip_nfsunlock($fichier, $birth, $max_age, true); return spip_nfsunlock($fichier, $birth, $max_age, true);
} }
......
...@@ -1099,6 +1099,7 @@ function fin_cadre_formulaire($return=false){ ...@@ -1099,6 +1099,7 @@ function fin_cadre_formulaire($return=false){
} }
// http://doc.spip.org/@formulaire_recherche
function formulaire_recherche($page, $complement=""){ function formulaire_recherche($page, $complement=""){
$recherche = _request('recherche'); $recherche = _request('recherche');
$recherche_aff = entites_html($recherche); $recherche_aff = entites_html($recherche);
......
...@@ -53,6 +53,7 @@ function replace_fragment($id_article, $version_min, $version_max, $id_fragment, ...@@ -53,6 +53,7 @@ function replace_fragment($id_article, $version_min, $version_max, $id_fragment,
'fragment' => $fragment); 'fragment' => $fragment);
} }
// http://doc.spip.org/@envoi_replace_fragments
function envoi_replace_fragments($replaces) { function envoi_replace_fragments($replaces) {
$desc = $GLOBALS['tables_auxiliaires']['spip_versions_fragments']; $desc = $GLOBALS['tables_auxiliaires']['spip_versions_fragments'];
foreach($replaces as $r) foreach($replaces as $r)
...@@ -60,6 +61,7 @@ function envoi_replace_fragments($replaces) { ...@@ -60,6 +61,7 @@ function envoi_replace_fragments($replaces) {
} }
// http://doc.spip.org/@envoi_delete_fragments
function envoi_delete_fragments($id_article, $deletes) { function envoi_delete_fragments($id_article, $deletes) {
if (count($deletes)) { if (count($deletes)) {
spip_query("DELETE FROM spip_versions_fragments WHERE id_article=$id_article AND ((". join(") OR (", $deletes)."))"); spip_query("DELETE FROM spip_versions_fragments WHERE id_article=$id_article AND ((". join(") OR (", $deletes)."))");
...@@ -369,6 +371,7 @@ function recuperer_version($id_article, $id_version) { ...@@ -369,6 +371,7 @@ function recuperer_version($id_article, $id_version) {
recuperer_fragments($id_article, $id_version)); recuperer_fragments($id_article, $id_version));
} }
// http://doc.spip.org/@reconstuire_version
function reconstuire_version($champs, $fragments, $res=array()) { function reconstuire_version($champs, $fragments, $res=array()) {
static $msg; static $msg;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter