--- db/prgsrc/drupal/modules/chgk_db/classes/DbEditors.class.php 2010/04/24 21:45:50 1.1 +++ db/prgsrc/drupal/modules/chgk_db/classes/DbEditors.class.php 2010/05/23 09:31:39 1.2 @@ -3,15 +3,22 @@ require_once dirname(__FILE__).'/DbEdito class DbEditors { private $db; + private $years; public function __construct() { $this->db = new DbDatabase(); } - public function getAllHtml() { - $output = ''; + private function loadPeople() { + $this->people = array(); $res = $this->db->getAllEditorsRes(); while ($line = db_fetch_object($res)) { $this->people[] = DbEditor::newFromRow($line); } + } + + + public function getAllHtml() { + $output = ''; + $this->loadPeople(); foreach ($this->people as $person) { $output.= "

".$person->getLink()."

"; }