Intégration de la branche release-2.26.0

This commit is contained in:
Jephté Clain 2015-12-24 12:17:33 +04:00
commit d3df5079f2
3 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,7 @@
## Version 2.26.0 du 24/12/2015-12:17
d5a2cce cgilsxml.py: rajouter la variable env/query_vars
## Version 2.25.0 du 24/12/2015-11:15
6c73940 cgilsxml.py: désactiver le cache par défaut

View File

@ -1 +1 @@
2.25.0
2.26.0

View File

@ -6,7 +6,7 @@ u"""Ce script est prévu pour être utilisé dans un script CGI.
Il permet de lister le contenu d'un répertoire au format XML, et de télécharger les fichiers trouvés.
"""
import os, sys, re, shutil, mimetypes
import os, sys, re, shutil, mimetypes, urlparse
from os import path
from time import time, localtime
from types import UnicodeType, StringTypes
@ -184,7 +184,11 @@ def print_files(files, fgroups=None, select_group=None, script_name=None, query_
if script_name is not None:
ET.SubElement(xenv, "script_name").text = _u(script_name)
if query_string is not None:
ET.SubElement(xenv, "query_string").text = _u(query_string)
query_string = _u(query_string)
ET.SubElement(xenv, "query_string").text = query_string
xvars = ET.SubElement(xenv, "query_vars")
for name, value in urlparse.parse_qsl(query_string, keep_blank_values=True):
ET.SubElement(xvars, "var", name=name, value=value)
xfgroups = ET.SubElement(xresult, "fgroups")
if fgroups is not None:
for fgroup in fgroups: