Пример #1
0
 function save_logs($on)
 {
     if ($on && $this->_save_logs === false) {
         $this->_save_logs = array();
     } else {
         if (!$on && $this->_save_logs !== false) {
             $qs = [];
             foreach ($this->_save_logs as $cid_text => $pids) {
                 $pos = strpos($cid_text, "|");
                 $qs[] = self::format_log_query(substr($cid_text, $pos + 1), substr($cid_text, 0, $pos), array_keys($pids));
             }
             $mresult = Dbl::multi_q_raw(join(";", $qs));
             while ($result = $mresult->next()) {
                 Dbl::free($result);
             }
             $this->_save_logs = false;
         }
     }
 }