forked from indymedia/epicyon
				
			Ignore case in history search
							parent
							
								
									f2707d43ac
								
							
						
					
					
						commit
						6933692348
					
				
							
								
								
									
										4
									
								
								utils.py
								
								
								
								
							
							
						
						
									
										4
									
								
								utils.py
								
								
								
								
							| 
						 | 
					@ -741,7 +741,7 @@ def searchBoxPosts(baseDir: str, nickname: str, domain: str,
 | 
				
			||||||
    if not os.path.isdir(path):
 | 
					    if not os.path.isdir(path):
 | 
				
			||||||
        print('SEARCH: directory does not exist ' + path)
 | 
					        print('SEARCH: directory does not exist ' + path)
 | 
				
			||||||
        return []
 | 
					        return []
 | 
				
			||||||
    searchStr = searchStr.strip()
 | 
					    searchStr = searchStr.lower().strip()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if '+' in searchStr:
 | 
					    if '+' in searchStr:
 | 
				
			||||||
        searchWords = searchStr.split('+')
 | 
					        searchWords = searchStr.split('+')
 | 
				
			||||||
| 
						 | 
					@ -755,7 +755,7 @@ def searchBoxPosts(baseDir: str, nickname: str, domain: str,
 | 
				
			||||||
        for fname in fnames:
 | 
					        for fname in fnames:
 | 
				
			||||||
            filePath = os.path.join(root, fname)
 | 
					            filePath = os.path.join(root, fname)
 | 
				
			||||||
            with open(filePath, 'r') as postFile:
 | 
					            with open(filePath, 'r') as postFile:
 | 
				
			||||||
                data = postFile.read()
 | 
					                data = postFile.read().lower()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                notFound = False
 | 
					                notFound = False
 | 
				
			||||||
                for keyword in searchWords:
 | 
					                for keyword in searchWords:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue