Update knowledgebase_helper.rb

Reduced assignments and codeduplication.
Merge pull request #174 from CodeInsider/patch-1

Update knowledgebase_helper.rb