[Sites plugin] Bug when import CSV file
I have installed Fog 1.5.8 with the Sites plugin.
I have detected an error when I try to import a CSV hosts file. Most of the time the server gives a 500 error code when the file is imported, and when it doesn’t give an error the site is not assigned correctly.
I was able to solve the error editing the file /var/www/html/fog/lib/plugins/site/hooks/addsitehost.hook.php decreasing the value assigned to the insertIndex variable in lines 372 and 374 by 1 and modifying lines 372 and 374 by this code:
self::getClass('SiteHostAssociation') ->set('hostID', $arguments['Host']->get('id'))
@iteixido I will fix it as soon as possible