Exemplo n.º 1
0
 /**
  * Fetches a raw single-locale resultset
  *
  * @author Art <*****@*****.**>
  *
  * @param array  $pages  pages to fetch
  * @param string $locale Locale to fetch
  */
 protected function fetchOne(array $pages, $locale)
 {
     $params = [':first' => $locale];
     $sql = 'SELECT `key`,' . '`value` ' . 'FROM `alo_locale` ' . 'WHERE `lang`=:first';
     if (!ALO_LOCALE_FETCH_ALL) {
         $sql .= ' AND `page` IN (';
         foreach ($pages as $i => $p) {
             $sql .= ':p' . $i . ',';
             $params[':p' . $i] = $p;
         }
         $sql = rtrim($sql, ',') . ')';
     }
     $sql .= ' ORDER BY NULL';
     $this->raw = $this->db->prepQuery($sql, $params, self::$querySettings);
 }