コード例 #1
0
ファイル: Article.php プロジェクト: rjsmelo/tiki
 function _install()
 {
     global $prefs;
     $artlib = TikiLib::lib('art');
     $data = $this->getData();
     $this->replaceReferences($data);
     $dateConverter = new Tiki_Profile_DateConverter();
     $id = $artlib->replace_article($data['title'], $data['author'], $data['topic'], 'n', null, null, null, null, $data['heading'], $data['body'], $dateConverter->convert($data['publication_date']), $dateConverter->convert($data['expiration_date']), 'admin', 0, 0, 0, $data['type'], $data['topline'], $data['subtitle'], $data['link_to'], null, $data['language']);
     if ($prefs['geo_locate_article'] == 'y' && !empty($data['geolocation'])) {
         TikiLib::lib('geo')->set_coordinates('article', $id, $data['geolocation']);
     }
     return $id;
 }
コード例 #2
0
 function _install()
 {
     global $artlib;
     $data = $this->getData();
     $this->replaceReferences($data);
     require_once 'lib/articles/artlib.php';
     $dateConverter = new Tiki_Profile_DateConverter();
     $id = $artlib->replace_article($data['title'], $data['author'], $data['topic'], 'n', null, null, null, null, $data['heading'], $data['body'], $dateConverter->convert($data['publication_date']), $dateConverter->convert($data['expiration_date']), 'admin', 0, 0, 0, $data['type'], $data['topline'], $data['subtitle'], $data['link_to'], null, $data['language']);
     return $id;
 }