Report any technical problems you discover and discuss solutions.

Xerte 3.3: deleting templates bug?

Plus d'informations
il y a 9 ans 6 mois #4233 par jayaich
Xerte 3.3: deleting templates bug? a été créé par jayaich
Hello,

I am just starting to look through some changes we made for our Xerte 3.0 site with the intention to update it to Xerte 3.3.

The file 'modules/decision/delete_template.php' seems to handle directory checking incorrectly. This file also seems to be duplicated at 'modules/site/delete_template.php' and 'modules/xerte/delete_template.php'.

Attached is a diff file which seems to correct the problem.


John.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 ans 6 mois #4234 par jayaich
Réponse de jayaich sur le sujet Xerte 3.3: deleting templates bug?
Okay, It seems I can't attach files to the posts. (I'm sure I had this problem before. anyway couldn't find a solution.) so here is the diff inline:
Code:
--- modules/decision/delete_template.php.orig 2015-07-29 23:17:23.000000000 +0100 +++ modules/decision/delete_template.php 2017-02-06 16:19:12.253905013 +0000 @@ -53,18 +53,16 @@ if(($f!=".")&&($f!="..")){ - if(is_dir($path . $f)){ - + $string = $path . DIRECTORY_SEPARATOR . $f; - array_push($folder_array, $path . "/" . $f); - - delete_folder_loop($path . $f); + if(is_dir($string)){ + array_push($folder_array, $string); + + delete_folder_loop($string); }else{ - $string = $path . "/" . $f; - array_push($file_array, $string); } @@ -147,4 +145,4 @@ rmdir($path); } -?> \ No newline at end of file +?>

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: ronmjultenJohnSmith
Temps de génération de la page : 0.132 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo