Report any technical problems you discover and discuss solutions.

Xerte 3.3: deleting templates bug?

  • jayaich
  • Onderwerp Auteur
  • Offline
  • Premium lid
  • Premium lid
Meer
9 jaren 5 maanden geleden #4233 door jayaich
Xerte 3.3: deleting templates bug? werd gestart door 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.

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

  • jayaich
  • Onderwerp Auteur
  • Offline
  • Premium lid
  • Premium lid
Meer
9 jaren 5 maanden geleden #4234 door jayaich
Beantwoord door jayaich in topic 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 +?>

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Moderators: ronmjultenJohnSmith
Tijd voor maken pagina: 0.133 seconden
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo