Mercurial > traipse_dev
comparison orpg/mapper/miniatures_handler.py @ 12:c056e967907a traipse_dev
I said, 'let the users have freedom' and it was it writ in code
No more stagnant directorys inside webfiles. Make your own!
**webfiles is for security**
author | sirebral |
---|---|
date | Fri, 17 Jul 2009 09:03:41 -0500 |
parents | 292e064396e4 |
children | 0b8b7e3ed78d |
comparison
equal
deleted
inserted
replaced
11:292e064396e4 | 12:c056e967907a |
---|---|
163 else: | 163 else: |
164 try: | 164 try: |
165 min_url = open_rpg.get_component("cherrypy") + filename | 165 min_url = open_rpg.get_component("cherrypy") + filename |
166 except: | 166 except: |
167 return | 167 return |
168 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep +' Textures': | 168 min_url = dlg.GetDirectory().replace(orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep, open_rpg.get_component("cherrypy")) + '/' + filename |
169 min_url = open_rpg.get_component("cherrypy") + 'Textures/' + filename | |
170 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep + 'Maps': | |
171 min_url = open_rpg.get_component("cherrypy") + 'Maps/' + filename | |
172 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep + 'Miniatures': | |
173 min_url = open_rpg.get_component("cherrypy") + 'Miniatures/' + filename | |
174 | |
175 # build url | 169 # build url |
176 if min_url == "" or min_url == "http://": | 170 if min_url == "" or min_url == "http://": |
177 return | 171 return |
178 if min_url[:7] != "http://" : | 172 if min_url[:7] != "http://" : |
179 min_url = "http://" + min_url | 173 min_url = "http://" + min_url |