Unless you have deleted them, you should have a copy of the older packages under /var/cache/pacman/pkg. Locate the packages and versions you want to downgrade to, and then
$this->bbcode_second_pass_code('', '# pacman -U [package_list]')
With package_list being the path to the packages you want to downgrade.