Changeset 14614
- Timestamp:
- Mar 20, 2016, 11:36:23 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
trac/admin/web_ui.py (modified) (2 diffs)
-
trac/env.py (modified) (1 diff)
-
trac/loader.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/1.0-stable merged: 14613
- Property svn:mergeinfo changed
-
trunk/trac/admin/web_ui.py
r14038 r14614 25 25 from trac.admin.api import IAdminPanelProvider 26 26 from trac.core import * 27 from trac.loader import get_plugin_info , get_plugins_dir27 from trac.loader import get_plugin_info 28 28 from trac.log import LOG_LEVELS 29 29 from trac.perm import PermissionSystem, IPermissionRequestor … … 599 599 data = { 600 600 'plugins': plugins, 'show': req.args.get('show'), 601 'readonly': not os.access( get_plugins_dir(self.env),601 'readonly': not os.access(self.env.get_plugins_dir(), 602 602 os.F_OK + os.W_OK), 603 603 'safe_wiki_to_html': safe_wiki_to_html, -
trunk/trac/env.py
r14448 r14614 643 643 return os.path.join(self.path, 'conf', 'trac.ini') 644 644 645 def _get_path_to_dir(self, dir): 646 path = os.path.join(self.path, dir) 647 return os.path.normcase(os.path.realpath(path)) 648 645 649 def get_templates_dir(self): 646 650 """Return absolute path to the templates directory.""" 647 return os.path.join(self.path,'templates')651 return self._get_path_to_dir('templates') 648 652 649 653 def get_htdocs_dir(self): 650 654 """Return absolute path to the htdocs directory.""" 651 return os.path.join(self.path,'htdocs')655 return self._get_path_to_dir('htdocs') 652 656 653 657 def get_log_dir(self): 654 658 """Return absolute path to the log directory.""" 655 return os.path.join(self.path, 'log') 659 return self._get_path_to_dir('log') 660 661 def get_plugins_dir(self): 662 """Return absolute path to the plugins directory.""" 663 return self._get_path_to_dir('plugins') 656 664 657 665 def setup_log(self): -
trunk/trac/loader.py
r13232 r14614 98 98 return _load_py_files 99 99 100 100 101 def get_plugins_dir(env): 101 """Return the path to the `plugins` directory of the environment.""" 102 plugins_dir = os.path.realpath(os.path.join(env.path, 'plugins')) 103 return os.path.normcase(plugins_dir) 102 """Return the path to the `plugins` directory of the environment. 103 104 :since 1.0.11: Deprecated and will be removed in 1.3.1. Use 105 Environment.get_plugins_dir() instead.""" 106 return env.get_plugins_dir() 107 104 108 105 109 def load_components(env, extra_path=None, loaders=(load_eggs('trac.plugins'), 106 110 load_py_files())): 107 111 """Load all plugin components found on the given search path.""" 108 plugins_dir = get_plugins_dir(env)112 plugins_dir = env.get_plugins_dir() 109 113 search_path = [plugins_dir] 110 114 if extra_path: … … 135 139 return dist 136 140 137 plugins_dir = get_plugins_dir(env)141 plugins_dir = env.get_plugins_dir() 138 142 plugins = {} 139 143 from trac.core import ComponentMeta
Note:
See TracChangeset
for help on using the changeset viewer.
