Пример #1
0
 public function update_channel($count)
 {
     $mod = new ActivityModule();
     $cha = new ChannelModule();
     $talks = $mod->get_ended_activity(RECENT_TALK_CHANNEL, $count);
     foreach ($talks as $act) {
         $cha->remove_activity(RECENT_TALK_CHANNEL, $act->id);
     }
     $acts = $mod->get_ended_activity(RECENT_ACTIVITY_CHANNEL, $count);
     foreach ($acts as $act) {
         $cha->remove_activity(RECENT_ACTIVITY_CHANNEL, $act->id);
     }
     return !(count($talks) <= 0 && count($acts) <= 0);
 }