Open Journal Systems  2.4.8
 All Classes Namespaces Functions Variables Groups Pages
IssueDAO.inc.php
1 <?php
2 
17 import ('classes.issue.Issue');
18 
19 class IssueDAO extends DAO {
20  var $caches;
21 
22  function _cacheMiss(&$cache, $id) {
23  if ($cache->getCacheId() === 'current') {
24  $issue =& $this->getCurrentIssue($id, false);
25  } else {
26  $issue =& $this->getIssueByBestIssueId($id, null, false);
27  }
28  $cache->setCache($id, $issue);
29  return $issue;
30  }
31 
32  function &_getCache($cacheId) {
33  if (!isset($this->caches)) $this->caches = array();
34  if (!isset($this->caches[$cacheId])) {
35  $cacheManager =& CacheManager::getManager();
36  $this->caches[$cacheId] =& $cacheManager->getObjectCache('issues', $cacheId, array(&$this, '_cacheMiss'));
37  }
38  return $this->caches[$cacheId];
39  }
40 
48  function &getIssueById($issueId, $journalId = null, $useCache = false) {
49  if ($useCache) {
50  $cache =& $this->_getCache('issues');
51  $returner = $cache->get($issueId);
52  if ($returner && $journalId != null && $journalId != $returner->getJournalId()) $returner = null;
53  return $returner;
54  }
55 
56  if (isset($journalId)) {
57  $result =& $this->retrieve(
58  'SELECT i.* FROM issues i WHERE issue_id = ? AND journal_id = ?',
59  array((int) $issueId, (int) $journalId)
60  );
61  } else {
62  $result =& $this->retrieve(
63  'SELECT i.* FROM issues i WHERE issue_id = ?', (int) $issueId
64  );
65  }
66 
67  $issue = null;
68  if ($result->RecordCount() != 0) {
69  $issue =& $this->_returnIssueFromRow($result->GetRowAssoc(false));
70  }
71 
72  $result->Close();
73  unset($result);
74 
75  return $issue;
76  }
77 
88  function &getIssueByPubId($pubIdType, $pubId, $journalId = null, $useCache = false) {
89  if ($useCache && $pubIdType == 'publisher-id') {
90  $cache =& $this->_getCache('issues');
91  $returner = $cache->get($pubId);
92  if ($returner && $journalId != null && $journalId != $returner->getJournalId()) $returner = null;
93  return $returner;
94  }
95 
96  $issues =& $this->getIssuesBySetting('pub-id::'.$pubIdType, $pubId, $journalId);
97  if (empty($issues)) {
98  $issue = null;
99  } else {
100  assert(count($issues) == 1);
101  $issue =& $issues[0];
102  }
103 
104  return $issue;
105  }
106 
114  function &getIssuesBySetting($settingName, $settingValue, $journalId = null) {
115  $params = array($settingName);
116  $sql = 'SELECT i.*
117  FROM issues i ';
118  if (is_null($settingValue)) {
119  $sql .= 'LEFT JOIN issue_settings ist ON i.issue_id = ist.issue_id AND ist.setting_name = ?
120  WHERE (ist.setting_value IS NULL OR ist.setting_value = \'\')';
121  } else {
122  $params[] = $settingValue;
123  $sql .= 'INNER JOIN issue_settings ist ON i.issue_id = ist.issue_id
124  WHERE ist.setting_name = ? AND ist.setting_value = ?';
125  }
126  if ($journalId) {
127  $params[] = (int) $journalId;
128  $sql .= ' AND i.journal_id = ?';
129  }
130  $sql .= ' ORDER BY i.issue_id';
131  $result =& $this->retrieve($sql, $params);
132 
133  $issues = array();
134  while (!$result->EOF) {
135  $issues[] =& $this->_returnIssueFromRow($result->GetRowAssoc(false));
136  $result->moveNext();
137  }
138  $result->Close();
139 
140  return $issues;
141  }
142 
151  function &getPublishedIssuesByNumber($journalId, $volume = null, $number = null, $year = null) {
152  $sql = 'SELECT i.* FROM issues i WHERE i.published = 1 AND i.journal_id = ?';
153  $params = array((int) $journalId);
154 
155  if ($volume !== null) {
156  $sql .= ' AND i.volume = ?';
157  $params[] = (int) $volume;
158  }
159  if ($number !== null) {
160  $sql .= ' AND i.number = ?';
161  $params[] = $number;
162  }
163  if ($year !== null) {
164  $sql .= ' AND i.year = ?';
165  $params[] = (int) $year;
166  }
167 
168  $result =& $this->retrieve($sql, $params);
169  $returner = new DAOResultFactory($result, $this, '_returnIssueFromRow');
170  return $returner;
171  }
172 
181  function &getIssueByBestIssueId($issueId, $journalId = null, $useCache = false) {
182  $issue =& $this->getIssueByPubId('publisher-id', $issueId, $journalId, $useCache);
183  if (!isset($issue) && ctype_digit("$issueId")) $issue =& $this->getIssueById((int) $issueId, $journalId, $useCache);
184  return $issue;
185  }
186 
192  function &getLastCreatedIssue($journalId) {
193  $result =& $this->retrieveLimit(
194  'SELECT i.* FROM issues i WHERE journal_id = ? ORDER BY year DESC, volume DESC, number DESC',
195  (int) $journalId,
196  1
197  );
198 
199  $issue = null;
200  if ($result->RecordCount() != 0) {
201  $issue =& $this->_returnIssueFromRow($result->GetRowAssoc(false));
202  }
203 
204  $result->Close();
205  unset($result);
206 
207  return $issue;
208  }
209 
216  function &getCurrentIssue($journalId, $useCache = false) {
217  if ($useCache) {
218  $cache =& $this->_getCache('current');
219  $returner = $cache->get($journalId);
220  return $returner;
221  }
222 
223  $result =& $this->retrieve(
224  'SELECT i.* FROM issues i WHERE journal_id = ? AND current = 1',
225  (int) $journalId
226  );
227 
228  $issue = null;
229  if ($result->RecordCount() != 0) {
230  $issue =& $this->_returnIssueFromRow($result->GetRowAssoc(false));
231  }
232 
233  $result->Close();
234  unset($result);
235 
236  return $issue;
237  }
238 
243  function updateCurrentIssue($journalId, $issue = null) {
244  $this->update(
245  'UPDATE issues SET current = 0 WHERE journal_id = ? AND current = 1',
246  (int) $journalId
247  );
248  if ($issue) $this->updateIssue($issue);
249 
250  $this->flushCache();
251  }
252 
253 
262  function changePubId($issueId, $pubIdType, $pubId) {
263  $idFields = array(
264  'issue_id', 'locale', 'setting_name'
265  );
266  $updateArray = array(
267  'issue_id' => $issueId,
268  'locale' => '',
269  'setting_name' => 'pub-id::'.$pubIdType,
270  'setting_type' => 'string',
271  'setting_value' => (string)$pubId
272  );
273  $this->replace('issue_settings', $updateArray, $idFields);
274  $this->flushCache();
275  }
276 
282  function &_returnIssueFromRow($row) {
283  $issue = new Issue();
284  $issue->setId($row['issue_id']);
285  $issue->setJournalId($row['journal_id']);
286  $issue->setVolume($row['volume']);
287  $issue->setNumber($row['number']);
288  $issue->setYear($row['year']);
289  $issue->setPublished($row['published']);
290  $issue->setCurrent($row['current']);
291  $issue->setDatePublished($this->datetimeFromDB($row['date_published']));
292  $issue->setDateNotified($this->datetimeFromDB($row['date_notified']));
293  $issue->setLastModified($this->datetimeFromDB($row['last_modified']));
294  $issue->setAccessStatus($row['access_status']);
295  $issue->setOpenAccessDate($this->datetimeFromDB($row['open_access_date']));
296  $issue->setShowVolume($row['show_volume']);
297  $issue->setShowNumber($row['show_number']);
298  $issue->setShowYear($row['show_year']);
299  $issue->setShowTitle($row['show_title']);
300  $issue->setStyleFileName($row['style_file_name']);
301  $issue->setOriginalStyleFileName($row['original_style_file_name']);
302 
303  $this->getDataObjectSettings('issue_settings', 'issue_id', $row['issue_id'], $issue);
304 
305  HookRegistry::call('IssueDAO::_returnIssueFromRow', array(&$issue, &$row));
306 
307  return $issue;
308  }
309 
314  function getLocaleFieldNames() {
315  return array('title', 'coverPageDescription', 'coverPageAltText', 'showCoverPage', 'hideCoverPageArchives', 'hideCoverPageCover', 'originalFileName', 'fileName', 'width', 'height', 'description');
316  }
317 
324  $additionalFields = parent::getAdditionalFieldNames();
325  // FIXME: Move this to a PID plug-in.
326  $additionalFields[] = 'pub-id::publisher-id';
327  return $additionalFields;
328  }
329 
334  function updateLocaleFields(&$issue) {
335  $this->updateDataObjectSettings('issue_settings', $issue, array(
336  'issue_id' => $issue->getId()
337  ));
338  }
339 
345  function insertIssue(&$issue) {
346  $this->update(
347  sprintf('INSERT INTO issues
348  (journal_id, volume, number, year, published, current, date_published, date_notified, last_modified, access_status, open_access_date, show_volume, show_number, show_year, show_title, style_file_name, original_style_file_name)
349  VALUES
350  (?, ?, ?, ?, ?, ?, %s, %s, %s, ?, %s, ?, ?, ?, ?, ?, ?)',
351  $this->datetimeToDB($issue->getDatePublished()), $this->datetimeToDB($issue->getDateNotified()), $this->datetimeToDB($issue->getLastModified()), $this->datetimeToDB($issue->getOpenAccessDate())),
352  array(
353  (int) $issue->getJournalId(),
354  $issue->getVolume(),
355  $issue->getNumber(),
356  $issue->getYear(),
357  $issue->getPublished(),
358  $issue->getCurrent(),
359  (int) $issue->getAccessStatus(),
360  (int) $issue->getShowVolume(),
361  (int) $issue->getShowNumber(),
362  (int) $issue->getShowYear(),
363  (int) $issue->getShowTitle(),
364  $issue->getStyleFileName(),
365  $issue->getOriginalStyleFileName()
366  )
367  );
368 
369  $issue->setId($this->getInsertIssueId());
370 
371  $this->updateLocaleFields($issue);
372 
373  if ($this->customIssueOrderingExists($issue->getJournalId())) {
374  $this->resequenceCustomIssueOrders($issue->getJournalId());
375  }
376 
377  return $issue->getId();
378  }
379 
384  function getInsertIssueId() {
385  return $this->getInsertId('issues', 'issue_id');
386  }
387 
396  function issueExists($journalId, $volume, $number, $year, $issueId) {
397  $result =& $this->retrieve(
398  'SELECT i.* FROM issues i WHERE journal_id = ? AND volume = ? AND number = ? AND year = ? AND issue_id <> ?',
399  array((int) $journalId, (int) $volume, $number, (int) $year, (int) $issueId)
400  );
401  $returner = $result->RecordCount() != 0 ? true : false;
402 
403  $result->Close();
404  unset($result);
405 
406  return $returner;
407  }
408 
413  function updateIssue($issue) {
414  $issue->stampModified();
415  $this->update(
416  sprintf('UPDATE issues
417  SET
418  journal_id = ?,
419  volume = ?,
420  number = ?,
421  year = ?,
422  published = ?,
423  current = ?,
424  date_published = %s,
425  date_notified = %s,
426  last_modified = %s,
427  open_access_date = %s,
428  access_status = ?,
429  show_volume = ?,
430  show_number = ?,
431  show_year = ?,
432  show_title = ?,
433  style_file_name = ?,
434  original_style_file_name = ?
435  WHERE issue_id = ?',
436  $this->datetimeToDB($issue->getDatePublished()), $this->datetimeToDB($issue->getDateNotified()), $this->datetimeToDB($issue->getLastModified()), $this->datetimeToDB($issue->getOpenAccessDate())),
437  array(
438  (int) $issue->getJournalId(),
439  (int) $issue->getVolume(),
440  $issue->getNumber(),
441  (int) $issue->getYear(),
442  (int) $issue->getPublished(),
443  (int) $issue->getCurrent(),
444  (int) $issue->getAccessStatus(),
445  (int) $issue->getShowVolume(),
446  (int) $issue->getShowNumber(),
447  (int) $issue->getShowYear(),
448  (int) $issue->getShowTitle(),
449  $issue->getStyleFileName(),
450  $issue->getOriginalStyleFileName(),
451  (int) $issue->getId()
452  )
453  );
454 
455  $this->updateLocaleFields($issue);
456 
457  if ($this->customIssueOrderingExists($issue->getJournalId())) {
458  $this->resequenceCustomIssueOrders($issue->getJournalId());
459  }
460 
461  $this->flushCache();
462  }
463 
468  function deleteIssue(&$issue) {
469  import('classes.file.PublicFileManager');
470  $publicFileManager = new PublicFileManager();
471 
472  if (is_array($issue->getFileName(null))) foreach ($issue->getFileName(null) as $fileName) {
473  if ($fileName != '') {
474  $publicFileManager->removeJournalFile($issue->getJournalId(), $fileName);
475  }
476  }
477  if (($fileName = $issue->getStyleFileName()) != '') {
478  $publicFileManager->removeJournalFile($issue->getJournalId(), $fileName);
479  }
480 
481  $issueId = $issue->getId();
482 
483  // Delete issue-specific ordering if it exists.
484  $sectionDao =& DAORegistry::getDAO('SectionDAO');
485  $sectionDao->deleteCustomSectionOrdering($issueId);
486 
487  // Delete published issue galleys and issue files
488  $issueGalleyDao =& DAORegistry::getDAO('IssueGalleyDAO');
489  $issueGalleyDao->deleteGalleysByIssue($issueId);
490 
491  $issueFileDao =& DAORegistry::getDAO('IssueFileDAO');
492  $issueFileDao->deleteIssueFiles($issueId);
493 
494  import('classes.file.IssueFileManager');
495  $issueFileManager = new IssueFileManager($issueId);
496  $issueFileManager->deleteIssueTree();
497 
498  // Delete published articles
499  $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
500  $publishedArticleDao->deletePublishedArticlesByIssueId($issueId);
501 
502  // Delete issue settings and issue
503  $this->update('DELETE FROM issue_settings WHERE issue_id = ?', (int) $issueId);
504  $this->update('DELETE FROM issues WHERE issue_id = ?', (int) $issueId);
505  $this->update('DELETE FROM custom_issue_orders WHERE issue_id = ?', (int) $issueId);
506  $this->resequenceCustomIssueOrders($issue->getJournalId());
507 
508  $this->flushCache();
509  }
510 
515  function deleteIssuesByJournal($journalId) {
516  $issues =& $this->getIssues($journalId);
517  while (($issue =& $issues->next())) {
518  $this->deleteIssue($issue);
519  unset($issue);
520  }
521  }
522 
529  function issueIdExists($issueId, $journalId) {
530  $result =& $this->retrieve(
531  'SELECT COUNT(*) FROM issues WHERE issue_id = ? AND journal_id = ?',
532  array((int) $issueId, (int) $journalId)
533  );
534  return $result->fields[0] ? true : false;
535  }
536 
548  function pubIdExists($pubIdType, $pubId, $issueId, $journalId) {
549  $result =& $this->retrieve(
550  'SELECT COUNT(*)
551  FROM issue_settings ist
552  INNER JOIN issues i ON ist.issue_id = i.issue_id
553  WHERE ist.setting_name = ? AND ist.setting_value = ? AND i.issue_id <> ? AND i.journal_id = ?',
554  array(
555  'pub-id::'.$pubIdType,
556  $pubId,
557  (int) $issueId,
558  (int) $journalId
559  )
560  );
561  $returner = $result->fields[0] ? true : false;
562  $result->Close();
563  return $returner;
564  }
565 
572  function &getIssueByArticleId($articleId, $journalId = null) {
573  $params = array((int) $articleId);
574  $sql = 'SELECT i.*
575  FROM issues i,
576  published_articles pa,
577  articles a
578  WHERE i.issue_id = pa.issue_id AND
579  pa.article_id = ? AND
580  pa.article_id = a.article_id';
581  if ($journalId !== null) {
582  $sql .= ' AND i.journal_id = ? AND a.journal_id = i.journal_id';
583  $params[] = (int) $journalId;
584  }
585 
586  $result =& $this->retrieve($sql, $params);
587 
588  $issue = null;
589  if ($result->RecordCount() != 0) {
590  $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
591  $issue =& $this->_returnIssueFromRow($result->GetRowAssoc(false));
592  }
593 
594  $result->Close();
595  unset($result);
596 
597  return $issue;
598  }
599 
606  function &getIssues($journalId, $rangeInfo = null) {
607  $result =& $this->retrieveRange(
608  'SELECT i.* FROM issues i WHERE journal_id = ? ORDER BY current DESC, date_published DESC',
609  (int) $journalId,
610  $rangeInfo
611  );
612 
613  $returner = new DAOResultFactory($result, $this, '_returnIssueFromRow');
614  return $returner;
615  }
616 
623  function &getPublishedIssues($journalId, $rangeInfo = null) {
624  $result =& $this->retrieveRange(
625  'SELECT i.* FROM issues i LEFT JOIN custom_issue_orders o ON (o.issue_id = i.issue_id) WHERE i.journal_id = ? AND i.published = 1 ORDER BY o.seq ASC, i.current DESC, i.date_published DESC',
626  (int) $journalId, $rangeInfo
627  );
628 
629  $returner = new DAOResultFactory($result, $this, '_returnIssueFromRow');
630  return $returner;
631  }
632 
639  function &getUnpublishedIssues($journalId, $rangeInfo = null) {
640  $result =& $this->retrieveRange(
641  'SELECT i.* FROM issues i WHERE journal_id = ? AND published = 0 ORDER BY year ASC, volume ASC, number ASC',
642  (int) $journalId, $rangeInfo
643  );
644 
645  $returner = new DAOResultFactory($result, $this, '_returnIssueFromRow');
646  return $returner;
647  }
648 
654  function getNumArticles($issueId) {
655  $result =& $this->retrieve('SELECT COUNT(*) FROM published_articles WHERE issue_id = ?', (int) $issueId);
656  $returner = isset($result->fields[0]) ? $result->fields[0] : 0;
657 
658  $result->Close();
659  unset($result);
660 
661  return $returner;
662  }
663 
668  function deleteCustomIssueOrdering($journalId) {
669  return $this->update(
670  'DELETE FROM custom_issue_orders WHERE journal_id = ?', (int) $journalId
671  );
672  }
673 
678  function resequenceCustomIssueOrders($journalId) {
679  $result =& $this->retrieve(
680  'SELECT i.issue_id FROM issues i LEFT JOIN custom_issue_orders o ON (o.issue_id = i.issue_id) WHERE i.journal_id = ? ORDER BY o.seq',
681  (int) $journalId
682  );
683 
684  for ($i=1; !$result->EOF; $i++) {
685  list($issueId) = $result->fields;
686  $resultB =& $this->retrieve('SELECT issue_id FROM custom_issue_orders WHERE journal_id=? AND issue_id=?', array((int) $journalId, (int) $issueId));
687  if (!$resultB->EOF) {
688  $this->update(
689  'UPDATE custom_issue_orders SET seq = ? WHERE issue_id = ? AND journal_id = ?',
690  array($i, (int) $issueId, (int) $journalId)
691  );
692  } else {
693  // This entry is missing. Create it.
694  $this->insertCustomIssueOrder($journalId, $issueId, $i);
695  }
696  $resultB->Close();
697  unset($resultB);
698  $result->moveNext();
699  }
700 
701  $result->close();
702  unset($result);
703  }
704 
710  function customIssueOrderingExists($journalId) {
711  $result =& $this->retrieve(
712  'SELECT COUNT(*) FROM custom_issue_orders WHERE journal_id = ?',
713  (int) $journalId
714  );
715  $returner = isset($result->fields[0]) && $result->fields[0] == 0 ? false : true;
716 
717  $result->Close();
718  unset($result);
719 
720  return $returner;
721  }
722 
729  function getCustomIssueOrder($journalId, $issueId) {
730  $result =& $this->retrieve(
731  'SELECT seq FROM custom_issue_orders WHERE journal_id = ? AND issue_id = ?',
732  array((int) $journalId, (int) $issueId)
733  );
734 
735  $returner = null;
736  if (!$result->EOF) {
737  list($returner) = $result->fields;
738  }
739  $result->Close();
740  unset($result);
741 
742  return $returner;
743  }
744 
750  function setDefaultCustomIssueOrders($journalId) {
751  $publishedIssues =& $this->getPublishedIssues($journalId);
752  $i=1;
753  while ($issue =& $publishedIssues->next()) {
754  $this->insertCustomIssueOrder($journalId, $issue->getId(), $i);
755  unset($issue);
756  $i++;
757  }
758  }
759 
766  function insertCustomIssueOrder($journalId, $issueId, $seq) {
767  $this->update(
768  'INSERT INTO custom_issue_orders (issue_id, journal_id, seq) VALUES (?, ?, ?)',
769  array(
770  $issueId,
771  $journalId,
772  $seq
773  )
774  );
775  }
776 
783  function moveCustomIssueOrder($journalId, $issueId, $newPos) {
784  $result =& $this->retrieve('SELECT issue_id FROM custom_issue_orders WHERE journal_id=? AND issue_id=?', array((int) $journalId, (int) $issueId));
785  if (!$result->EOF) {
786  $this->update(
787  'UPDATE custom_issue_orders SET seq = ? WHERE journal_id = ? AND issue_id = ?',
788  array($newPos, (int) $journalId, (int) $issueId)
789  );
790  } else {
791  // This entry is missing. Create it.
792  $this->insertCustomIssueOrder($journalId, $issueId, $newPos);
793  }
794  $result->Close();
795  unset($result);
796  $this->resequenceCustomIssueOrders($journalId);
797  }
798 
806  function deleteAllPubIds($journalId, $pubIdType) {
807  $journalId = (int) $journalId;
808  $settingName = 'pub-id::'.$pubIdType;
809 
810  // issues
811  $issues =& $this->getIssues($journalId);
812  while ($issue =& $issues->next()) {
813  $this->update(
814  'DELETE FROM issue_settings WHERE setting_name = ? AND issue_id = ?',
815  array(
816  $settingName,
817  (int)$issue->getId()
818  )
819  );
820  unset($issue);
821  }
822  $this->flushCache();
823  }
824 
832  function deletePubId($issueId, $pubIdType) {
833  $settingName = 'pub-id::'.$pubIdType;
834  $this->update(
835  'DELETE FROM issue_settings WHERE setting_name = ? AND issue_id = ?',
836  array(
837  $settingName,
838  (int)$issueId
839  )
840  );
841  $this->flushCache();
842  }
843 
847  function flushCache() {
848  $cache =& $this->_getCache('issues');
849  $cache->flush();
850  unset($cache);
851  $cache =& $this->_getCache('current');
852  $cache->flush();
853  }
854 }
855 
856 ?>
& getUnpublishedIssues($journalId, $rangeInfo=null)
& _returnIssueFromRow($row)
Operations for retrieving and modifying objects from a database.
Definition: DAO.inc.php:29
deleteAllPubIds($journalId, $pubIdType)
deletePubId($issueId, $pubIdType)
& retrieveLimit($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
Definition: DAO.inc.php:147
Wrapper class for uploading files to a site/journal&#39;s public directory.
& retrieve($sql, $params=false, $callHooks=true)
Definition: DAO.inc.php:83
updateCurrentIssue($journalId, $issue=null)
insertCustomIssueOrder($journalId, $issueId, $seq)
getNumArticles($issueId)
& getLastCreatedIssue($journalId)
getInsertId($table= '', $id= '', $callHooks=true)
Definition: DAO.inc.php:252
resequenceCustomIssueOrders($journalId)
updateIssue($issue)
& getIssuesBySetting($settingName, $settingValue, $journalId=null)
& getPublishedIssues($journalId, $rangeInfo=null)
getAdditionalFieldNames()
updateDataObjectSettings($tableName, &$dataObject, $idArray)
Definition: DAO.inc.php:460
& getPublishedIssuesByNumber($journalId, $volume=null, $number=null, $year=null)
Class defining operations for issue file management.
& retrieveRange($sql, $params=false, $dbResultRange=null, $callHooks=true)
Definition: DAO.inc.php:176
& getIssueById($issueId, $journalId=null, $useCache=false)
getCustomIssueOrder($journalId, $issueId)
Operations for retrieving and modifying Issue objects.
deleteCustomIssueOrdering($journalId)
& getIssueByPubId($pubIdType, $pubId, $journalId=null, $useCache=false)
datetimeFromDB($dt)
Definition: DAO.inc.php:316
setDefaultCustomIssueOrders($journalId)
deleteIssue(&$issue)
insertIssue(&$issue)
Wrapper around ADORecordSet providing &quot;factory&quot; features for generating objects from DAOs...
issueIdExists($issueId, $journalId)
Class for Issue.
Definition: Issue.inc.php:24
& getIssues($journalId, $rangeInfo=null)
& getCurrentIssue($journalId, $useCache=false)
& getDAO($name, $dbconn=null)
issueExists($journalId, $volume, $number, $year, $issueId)
getInsertIssueId()
pubIdExists($pubIdType, $pubId, $issueId, $journalId)
& getIssueByArticleId($articleId, $journalId=null)
updateLocaleFields(&$issue)
customIssueOrderingExists($journalId)
moveCustomIssueOrder($journalId, $issueId, $newPos)
& getIssueByBestIssueId($issueId, $journalId=null, $useCache=false)
call($hookName, $args=null)
getLocaleFieldNames()
replace($table, $arrFields, $keyCols)
Definition: DAO.inc.php:240
datetimeToDB($dt)
Definition: DAO.inc.php:296
update($sql, $params=false, $callHooks=true, $dieOnError=true)
Definition: DAO.inc.php:211
deleteIssuesByJournal($journalId)
changePubId($issueId, $pubIdType, $pubId)