--- db/prgsrc/drupal/modules/chgk_db/classes/DbPackage.class.php 2010/03/08 16:19:22 1.2 +++ db/prgsrc/drupal/modules/chgk_db/classes/DbPackage.class.php 2010/03/20 17:23:42 1.4 @@ -68,4 +68,32 @@ class DbPackage { public function getLongTitle() { return $this->getTitle(); } + public function getInfo() { + $info = $this->tour->Info; + $info = preg_replace('/(\s+)-+(\s+)/','\1—$2', $info); + + return $info; + } + public function hasEditor() { + return $this->tour->Editors?TRUE:FALSE; + } + public function hasInfo() { + return $this->tour->Info?TRUE:FALSE; + } + + public function getEditor() { + return $this->tour->Editors; + } + + public function getEditorHtml() { + $ed = $this->tour->Editors; + $ed = preg_replace('/(\s+)-+(\s+)/','\1—$2', $ed); + + if (preg_match('/\,/', $ed)) { + $ob = 'Редакторы: '; + } else { + $ob = 'Редактор: '; + } + return $ob.$ed; + } }