Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, November 12, 2026

Diff for Metafox/db.inc.php between version 1.75 and 1.76

version 1.75, 2013/09/02 12:46:38 version 1.76, 2013/09/02 16:18:06
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/db.inc.php,v 1.74 2013-09-02 09:30:56 igor Exp $ */  /* $Platon: Metafox/db.inc.php,v 1.75 2013-09-02 12:46:38 igor Exp $ */
   
 /*  /*
  * updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002   * updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002
Line 707  function ezin_get_article_list($section_
Line 707  function ezin_get_article_list($section_
         return $array;          return $array;
 } /* }}} */  } /* }}} */
   
   function ezin_get_available_articles($lang = '') /* {{{ */
   {
           global $ezin_sys;
           global $ezin_cfg;
           global $ezin_db_handle;
           $section_id = intval($section_id);
           $limit      = intval($limit);
           $query = 'SELECT'
                   .' articles.id article_id,'
                   .' articles.atitle article_atitle,'
                   .' articles.title article_title,'
                   .' articles.status article_status,'
                   .' articles.access_key   article_access_key,'
                   .' articles.template_key article_template_key,'
                   .' UNIX_TIMESTAMP(articles.datetime) article_timestamp,'
                   .' articles.bodytext_wordcount  article_bodytext_wordcount,'
                   .' articles.bodytext_flags      article_bodytext_flags,'
                   .' articles.ghometext_wordcount article_ghometext_wordcount,'
                   .' articles.ghometext_flags     article_ghometext_flags,'
                   .' articles.ghometext           article_ghometext,'
                   .' articles.hometext_wordcount  article_hometext_wordcount,'
                   .' articles.hometext_flags      article_hometext_flags,'
                   .' articles.hometext            article_hometext,'
                   .' articles.calendar_flag       article_calendar_flag,'
                   .' articles.created_dt          article_created_dt,'
                   .' articles.changed_dt          article_changed_dt,'
                   .' sections.id article_section_id,'
                   .' sections.name article_section_name,'
                   .' sections.type article_section_type,'
                   .' sections.access_key   article_section_access_key,'
                   .' sections.template_key article_section_template_key,'
                   .' sections.link article_section_link'
                   .' FROM '.$ezin_sys['db']['tables']['articles'].' AS articles'
                   .' LEFT JOIN '.$ezin_sys['db']['tables']['sections'].' AS sections'
                   .' ON articles.section_id = sections.id';
           $query .=
                   ' WHERE articles.datetime <= SYSDATE()'
                   .' AND ( (FIND_IN_SET("articles_enabled", sections.display) > 0)'
                   .'              OR (FIND_IN_SET("articles_in_normal", sections.display) > 0)'
                   .'              OR (FIND_IN_SET("articles_in_global", sections.display) > 0)'
                   .'     )';
           if ($lang != '') {
                   $query .= ' AND (lang IS NULL OR lang = ""'
                                   .' OR lang LIKE "'.ezin_db_escape($lang).'")';
           }
           $query .= ' ORDER BY articles.datetime '
                   .($ezin_cfg['order_articles_desc'] ? 'DESC' : 'ASC')
                   .', articles.id DESC';
           if ($limit > 0) {
                   if (is_null($from)) {
                           $query .= ' LIMIT '.$limit;
                   } else {
                           $from = intval($from);
                           $query .= ' LIMIT '.$from.','.$limit;
                   }
           }
           $result = @mysql_query($query, $ezin_db_handle)
                   or ezin_db_error('ezin_get_available_articles()');
           $array = array();
           for ($k = 0; ($array[$k] = @mysql_fetch_array($result, MYSQL_ASSOC)); $k++)
                   ;
           unset($array[$k]);
           @mysql_free_result($result);
           return $array;
   } /* }}} */
   
 /*  /*
  * ezin_get_featured_articles_list()   * ezin_get_featured_articles_list()
  */   */

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.76

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top