Commits

cmlenz  committed 34355ce

Detabified. Closes #932.

  • Participants
  • Parent commits 0c3172c
  • Branches trunk

Comments (0)

Files changed (2)

File trac/Wiki.py

             self.readonly = row[2] and int(row[2]) or 0
         else:
             self.version = 0
-	    self.new = 1
-	    if not self.perm.has_permission( 'WIKI_CREATE' ):
-	        self.text = 'Wiki page %s not found' % name
-	        self.readonly = 1			   
-	    else:
-		self.text = 'describe %s here' % name
-		self.readonly = 0
-		
+            self.new = 1
+            if not self.perm.has_permission( 'WIKI_CREATE' ):
+                self.text = 'Wiki page %s not found' % name
+                self.readonly = 1
+            else:
+                self.text = 'describe %s here' % name
+                self.readonly = 0
+                
         self.old_readonly = self.readonly
         self.modified = 0
 

File trac/WikiFormatter.py

             return None, None
         module = text[:sep]
         args = text[sep+1:]
-	if module in ['bug', 'ticket']:
-	    cursor = self.db.cursor ()
-	    cursor.execute('SELECT summary,status FROM ticket WHERE id=%s', args)
-	    row = cursor.fetchone ()				    
-	    if row:
-		summary = util.escape(util.shorten_line(row[0]))
-		if row[1] == 'new':
-		    return self._href.ticket(args), '%s:%s*' % (module, args), 0, 'NEW: ' +  summary
-		elif row[1] == 'closed':
-		    return self._href.ticket(args), '<del>%s:%s</del>' % (module, args), 0, 'CLOSED: ' + summary
-		else:
-		    return self._href.ticket(args), '%s:%s' % (module, args), 0, summary
-	    else:
-		return self._href.ticket(args), '%s:%s' % (module, args), 1, ''
+        if module in ['bug', 'ticket']:
+            cursor = self.db.cursor ()
+            cursor.execute('SELECT summary,status FROM ticket WHERE id=%s', args)
+            row = cursor.fetchone ()
+            if row:
+                summary = util.escape(util.shorten_line(row[0]))
+                if row[1] == 'new':
+                    return self._href.ticket(args), '%s:%s*' % (module, args), 0, 'NEW: ' +  summary
+                elif row[1] == 'closed':
+                    return self._href.ticket(args), '<del>%s:%s</del>' % (module, args), 0, 'CLOSED: ' + summary
+                else:
+                    return self._href.ticket(args), '%s:%s' % (module, args), 0, summary
+            else:
+                return self._href.ticket(args), '%s:%s' % (module, args), 1, ''
         elif module == 'wiki':
             if not self.env._wiki_pages.has_key(args):
                 return self._href.wiki(args), '%s:%s' % (module, args), 1, None
         elif module == 'report':
             return self._href.report(args), '%s:%s' % (module, args), 0, None
         elif module == 'changeset':
-	    cursor = self.db.cursor ()
-	    cursor.execute('SELECT message FROM revision WHERE rev=%s', args)
-	    row = cursor.fetchone ()
-	    if row:
-		return self._href.changeset(args), '%s:%s' % (module,args), 0,  util.escape(util.shorten_line(row[0]))
-	    else:
-		return self._href.changeset(args), '%s:%s' % (module,args), 1, ''
-	elif module == 'milestone':
+            cursor = self.db.cursor ()
+            cursor.execute('SELECT message FROM revision WHERE rev=%s', args)
+            row = cursor.fetchone ()
+            if row:
+                return self._href.changeset(args), '%s:%s' % (module,args), 0, util.escape(util.shorten_line(row[0]))
+            else:
+                return self._href.changeset(args), '%s:%s' % (module,args), 1, ''
+        elif module == 'milestone':
             return self._href.milestone(args), '%s:%s' % (module, args), 0, None
         elif module == 'search':
             return self._href.search(args), '%s:%s' % (module, args), 0, None