Fix bug.
This commit is contained in:
parent
c490f060ff
commit
7616e05258
|
@ -852,18 +852,18 @@ class Admin::PersonalPluginFieldsController < OrbitMemberController
|
|||
return new_text
|
||||
end
|
||||
def include_key(text,key)
|
||||
return text.include?(key) || text.include?(key.classify)
|
||||
return text.include?(key) || text.include?(key.camelize)
|
||||
end
|
||||
def gsub_text_by_key_value(text,k,v)
|
||||
@blank_texts = []
|
||||
if !@parse_again_mode
|
||||
text.gsub(/\n(\s+)[^\n]*(#{k}|#{k.classify})/m) {|ff| @blank_texts << $1.gsub(/(\r\n|\n)/,'')}
|
||||
text.gsub(/\n(\s+)[^\n]*(#{k}|#{k.camelize})/m) {|ff| @blank_texts << $1.gsub(/(\r\n|\n)/,'')}
|
||||
end
|
||||
i = 0
|
||||
text = text.gsub(k + "s"){|ff| v.pluralize.gsub("\n","\n#{@blank_texts[i]}")}
|
||||
text = text.gsub(k ){|ff| v.gsub("\n","\n#{@blank_texts[i]}")}
|
||||
text = text.gsub(k.classify + "s"){|ff| v.classify.pluralize.gsub("\n","\n#{@blank_texts[i]}")}
|
||||
text = text.gsub(k.classify){|ff| v.classify.gsub("\n","\n#{@blank_texts[i]}")}
|
||||
text = text.gsub(k.camelize + "s"){|ff| v.camelize.pluralize.gsub("\n","\n#{@blank_texts[i]}")}
|
||||
text = text.gsub(k.camelize){|ff| v.camelize.gsub("\n","\n#{@blank_texts[i]}")}
|
||||
end
|
||||
def get_all_gem_plugins
|
||||
extention_files = ["downloaded_extensions.rb","built_in_extensions.rb"]
|
||||
|
|
Loading…
Reference in New Issue