public function execute($filterChain)
 {
     $context = $this->getContext();
     $user = $context->getUser();
     if (!$user->getAttribute(self::ENTRY_POINT_SESSION_KEY)) {
         $user->setAttribute(self::ENTRY_POINT_SESSION_KEY, PcUtils::getCurrentURL());
     }
     if (!$user->getAttribute(self::REFERRAL_SESSION_KEY) && isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'www.plancake.com/openIdWrongLogin') === FALSE) {
         // added to prevent a lot of meaningless entries
         $user->setAttribute(self::REFERRAL_SESSION_KEY, $_SERVER['HTTP_REFERER']);
     }
     $filterChain->execute();
 }
コード例 #2
0
<?php 
if (!defined('PLANCAKE_PUBLIC_RELEASE')) {
    ?>
    <div id="pc_socialWidgets">
        <ul>
                <li>Spread the love</li>
                <li>
                <script type="text/javascript" charset="utf-8">
                tweetmeme_source = 'plancake';
                tweetmeme_url = '<?php 
    echo PcUtils::getCurrentURL();
    ?>
';
                </script>
                <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
                </li>

                <li>

                      <a name="fb_share" type="box_count" href="http://www.facebook.com/sharer.php?u=<?php 
    echo PcUtils::getCurrentURL();
    ?>
">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>


                </li>
        </ul>
    </div>
<?php 
}