Пример #1
0
 if (!$s->is_cached('status.index.tpl', $status_id)) {
     $tweet = $td->getTweet($status_id);
     $u = new Utils();
     $id = new InstanceDAO($db);
     $i = $id->getByUsername($tweet->author_username);
     if (isset($i)) {
         $s->assign('likely_orphans', $td->getLikelyOrphansForParent($tweet->pub_date, $i->twitter_user_id, $tweet->author_username, 15));
         $s->assign('all_tweets', $td->getAllTweets($i->twitter_user_id, 15));
     }
     $cfg = new Config($i->twitter_username, $i->twitter_user_id);
     // instantiate data access objects
     $ud = new UserDAO($db);
     $all_replies = $td->getRepliesToTweet($status_id);
     $all_replies_count = count($all_replies);
     $all_retweets = $td->getRetweetsOfTweet($status_id);
     $retweet_reach = $td->getTweetReachViaRetweets($status_id);
     $public_replies = $td->getPublicRepliesToTweet($status_id);
     $public_replies_count = count($public_replies);
     $private_replies_count = $all_replies_count - $public_replies_count;
     $tweet = $td->getTweet($status_id);
     $s->assign('tweet', $tweet);
     $s->assign('replies', $all_replies);
     $s->assign('retweets', $all_retweets);
     $s->assign('retweet_reach', $retweet_reach);
     $s->assign('public_reply_count', $public_replies_count);
     $s->assign('private_reply_count', $private_replies_count);
     $s->assign('reply_count', $all_replies_count);
     $s->assign('cfg', $cfg);
     $s->assign('instance', $i);
 }
 # clean up