Пример #1
0
 /**
  * Builds the priority array for an arbitrary content type
  *
  */
 protected function set_priorities($contenttype)
 {
     $forum_priorities = $this->dbobject->query_read_slave("SELECT sourceid, prioritylevel FROM " . TABLE_PREFIX . "contentpriority WHERE contenttypeid = '{$contenttype}'");
     if (!isset($this->custom_priority[$contenttype])) {
         $this->custom_priority[$contenttype] = array();
     }
     while ($f_pri = $this->dbobject->fetch_array($forum_priorities)) {
         if (!isset($this->custom_priority[$contenttype][$f_pri['sourceid']])) {
             $this->custom_priority[$contenttype][$f_pri['sourceid']] = array();
         }
         $this->custom_priority[$contenttype][$f_pri['sourceid']]['priority'] = $f_pri['prioritylevel'];
     }
 }