Commits

Bulat Shakirzyanov committed 5d4cadd

add namespace if not in class or never been in class

Comments (0)

Files changed (1)

phpdomain/sphinxcontrib/phpdomain.py

                 modname = self.options.get(
                     'namespace', self.env.temp_data.get('php:namespace'))
 
-                if modname and 'php:in_class' in self.env.temp_data and not self.env.temp_data['php:in_class']:
+                if modname and (not 'php:in_class' in self.env.temp_data or not self.env.temp_data['php:in_class']):
                     nodetext = modname + NS
                     signode += addnodes.desc_addname(nodetext, nodetext)