[#2304] replaced code with refactored functions
[#2304] replaced code with refactored functions

hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare