I agree that the wording is really unclear for both.
Here's the code for magic sanctuary:
<code><![CDATA[if (($mydata->Gems + 2) <= $hisdata->Gems) $mydata->Gems+= 8; if (($hisdata->Gems + 2) <= $mydata->Gems) $hisdata->Gems+= 8;]]></code>
So I think it should read something like "If enemy gems - gems is at least 2, gems + 8. If gems - enemy gems is at least 2, enemy gems + 8". Or you could say "If the difference between your gems and enemy gems is 2 or more, player with fewer gems gets gems + 8".
Here's the code for magic portal:
<code><![CDATA[if ($mode != $cardpos) { $nextcard = $mydata->Hand[$mode]; $mydata->Hand[$mode] = $this->DrawCard($mydata->Deck, $mydata->Hand, $cardpos, 'DrawCard_norare'); $mydata->NewCards[$mode] = 1; }]]></code>
I'm not familiar enough with the code base to understand exactly what this means though. My best guess is that you select a position in your hand, and the card in that position takes the place of magic portal, and is itself replaced by some new card from your hand (but not a rare). Anyone want to test this out?