Commit c68eecd4 by Thimo Kraemer

Update bbexplorer.cgi

parent a6828b0e
......@@ -27,9 +27,12 @@
# Configuration
#
# Path to bbackupquery script
# Path to bbackupquery
path_bbquery = '/usr/sbin/bbackupquery'
# Path to sudo
path_sudo = '/usr/bin/sudo'
# URL to images
path_images = 'images'
......@@ -316,16 +319,16 @@ ${if content:}$
${:endif}$
</td>
<td>
${if item['attributes']:}$
<img src="${path_images}$/flag_a.gif" align="right"
title="Has attributes stored in directory record which override attributes in backup file" />
${:endif}$
${if item['directory']:}$
<a href="${script_name}$?dir=${dir}$/${item['name']}$">
${item['name']}$</a>
${:else:}$
${item['name']}$
${:endif}$
${if item['attributes']:}$
<img src="${path_images}$/flag_a.gif" align="right"
title="Has attributes stored in directory record which override attributes in backup file" />
${:endif}$
</td>
<td align="right">${item['size']}$</td>
<td align="right">${item['modified']}$</td>
......@@ -469,7 +472,7 @@ ${:endif}$
src="http://www.joonis.de/common/images/joonis_button.gif"
title="joonis new media" /></a>
<a href="http://www.joonis.de/boxbackup-explorer"
target="_blank">Box Backup Explorer 0.2.1</a>
target="_blank">Box Backup Explorer 0.2.2</a>
</div>
</body>
</html>
......@@ -482,7 +485,7 @@ ${:endif}$
def __sudo(self, *args):
'''Execute a method of class SudoAccess via sudo'''
proc = subprocess.Popen(
['sudo', script_path] + list(args),
[path_sudo, script_path] + list(args),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
......@@ -491,6 +494,7 @@ ${:endif}$
if retcode:
self.message['error'].append(
"Command '%s' failed with exit code %i: %s" % (args[0], retcode, err))
return
return out.strip()
def main(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment