Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
Conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Mar 14, 2013
1 parent 8a92633 commit 0629aca
Show file tree
Hide file tree
Showing 188 changed files with 1,039 additions and 1,039 deletions.
2 changes: 1 addition & 1 deletion classes/admin/form/SiteSettingsForm.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function SiteSettingsForm() {
* Display the form.
*/
function display() {
$conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
$conferenceDao = DAORegistry::getDAO('ConferenceDAO');
$conferences =& $conferenceDao->getNames();
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('redirectOptions', $conferences);
Expand Down
4 changes: 2 additions & 2 deletions classes/announcement/AnnouncementDAO.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function &getAnnouncementsNotExpiredByConferenceId($conferenceId, $schedConfId =

$conferenceArgs = array(ASSOC_TYPE_CONFERENCE, $conferenceId);
if($schedConfId == -1) {
$schedConfDao =& DAORegistry::getDAO('SchedConfDAO');
$schedConfDao = DAORegistry::getDAO('SchedConfDAO');
$schedConfs = $schedConfDao->getAll(false, $conferenceId);
$schedConfArgs = array();
while (!$schedConfs->eof()) {
Expand Down Expand Up @@ -78,7 +78,7 @@ function &getAnnouncementsNotExpiredByConferenceId($conferenceId, $schedConfId =
function &getNumAnnouncementsNotExpiredByConferenceId($conferenceId, $schedConfId = 0, $numAnnouncements, $rangeInfo = null) {
$conferenceArgs = array(ASSOC_TYPE_CONFERENCE, $conferenceId);
if($schedConfId == -1) {
$schedConfDao =& DAORegistry::getDAO('SchedConfDAO');
$schedConfDao = DAORegistry::getDAO('SchedConfDAO');
$schedConfs = $schedConfDao->getAll(false, $conferenceId);
$schedConfArgs = array();
while (!$schedConfs->eof()) {
Expand Down
8 changes: 4 additions & 4 deletions classes/author/form/submit/AuthorSubmitForm.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function display() {
$templateMgr->assign('helpTopicId', $helpTopicId);

$schedConf =& Request::getSchedConf();
$settingsDao =& DAORegistry::getDAO('SchedConfSettingsDAO');
$settingsDao = DAORegistry::getDAO('SchedConfSettingsDAO');

// Determine which submission steps should be shown

Expand Down Expand Up @@ -112,7 +112,7 @@ function confirmSubmission(&$paper, &$user, &$schedConf, &$conference, $mailTemp
if (!empty($copyAddress)) $mail->addBcc($copyAddress);
}

$editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
$editAssignmentDao = DAORegistry::getDAO('EditAssignmentDAO');
$editAssignments =& $editAssignmentDao->getEditAssignmentsByPaperId($paper->getId());
while ($editAssignment =& $editAssignments->next()) {
$mail->addBcc($editAssignment->getDirectorEmail(), $editAssignment->getDirectorFullName());
Expand All @@ -139,8 +139,8 @@ function assignDirectors(&$paper) {
$trackId = $paper->getTrackId();
$schedConf =& Request::getSchedConf();

$trackDirectorsDao =& DAORegistry::getDAO('TrackDirectorsDAO');
$editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
$trackDirectorsDao = DAORegistry::getDAO('TrackDirectorsDAO');
$editAssignmentDao = DAORegistry::getDAO('EditAssignmentDAO');

$trackDirectors =& $trackDirectorsDao->getDirectorsByTrackId($schedConf->getId(), $trackId);

Expand Down
10 changes: 5 additions & 5 deletions classes/author/form/submit/AuthorSubmitStep1Form.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ function display() {
$templateMgr =& TemplateManager::getManager();

// Get tracks for this conference
$trackDao =& DAORegistry::getDAO('TrackDAO');
$trackDao = DAORegistry::getDAO('TrackDAO');

// If this user is a track director or a director, they are
// allowed to submit to tracks flagged as "director-only" for
// submissions. Otherwise, display only tracks they are allowed
// to submit to.
$roleDao =& DAORegistry::getDAO('RoleDAO');
$roleDao = DAORegistry::getDAO('RoleDAO');
$isDirector = $roleDao->userHasRole($conference->getId(), $schedConf->getId(), $user->getId(), ROLE_ID_DIRECTOR) ||
$roleDao->userHasRole($conference->getId(), $schedConf->getId(), $user->getId(), ROLE_ID_TRACK_DIRECTOR) ||
$roleDao->userHasRole($conference->getId(), 0, $user->getId(), ROLE_ID_DIRECTOR) ||
$roleDao->userHasRole($conference->getId(), 0, $user->getId(), ROLE_ID_TRACK_DIRECTOR);

$templateMgr->assign('trackOptions', array('0' => __('author.submit.selectTrack')) + $trackDao->getTrackTitles($schedConf->getId(), !$isDirector));

$paperTypeDao =& DAORegistry::getDAO('PaperTypeDAO');
$paperTypeDao = DAORegistry::getDAO('PaperTypeDAO');
$sessionTypes = $paperTypeDao->getPaperTypes($schedConf->getId());
$templateMgr->assign('sessionTypes', $sessionTypes->toArray());

Expand Down Expand Up @@ -129,7 +129,7 @@ function readInputData() {
* @return int the paper ID
*/
function execute() {
$paperDao =& DAORegistry::getDAO('PaperDAO');
$paperDao = DAORegistry::getDAO('PaperDAO');

if (isset($this->paper)) {
$reviewMode = $this->paper->getReviewMode();
Expand Down Expand Up @@ -184,7 +184,7 @@ function execute() {
$this->paperId = $this->paper->getPaperId();

// Set user to initial author
$authorDao =& DAORegistry::getDAO('AuthorDAO'); /* @var $authorDao AuthorDAO */
$authorDao = DAORegistry::getDAO('AuthorDAO'); /* @var $authorDao AuthorDAO */
$user =& Request::getUser();
$author = new Author();
$author->setSubmissionId($this->paperId);
Expand Down
6 changes: 3 additions & 3 deletions classes/author/form/submit/AuthorSubmitStep2Form.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function display() {
$templateMgr =& TemplateManager::getManager();

// Get supplementary files for this paper
$paperFileDao =& DAORegistry::getDAO('PaperFileDAO');
$paperFileDao = DAORegistry::getDAO('PaperFileDAO');
if ($this->paper->getSubmissionFileId() != null) {
$templateMgr->assign_by_ref('submissionFile', $paperFileDao->getPaperFile($this->paper->getSubmissionFileId()));
}
Expand All @@ -69,7 +69,7 @@ function uploadSubmissionFile($fileName) {
import('classes.file.PaperFileManager');

$paperFileManager = new PaperFileManager($this->paperId);
$paperDao =& DAORegistry::getDAO('PaperDAO');
$paperDao = DAORegistry::getDAO('PaperDAO');

if ($paperFileManager->uploadError($fileName)) return false;

Expand All @@ -93,7 +93,7 @@ function uploadSubmissionFile($fileName) {
*/
function execute() {
// Update paper
$paperDao =& DAORegistry::getDAO('PaperDAO');
$paperDao = DAORegistry::getDAO('PaperDAO');
$paper =& $this->paper;

if ($paper->getSubmissionProgress() <= $this->step) {
Expand Down
12 changes: 6 additions & 6 deletions classes/author/form/submit/AuthorSubmitStep3Form.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function AuthorSubmitStep3Form($paper) {
if ($reviewMode != REVIEW_MODE_PRESENTATIONS_ALONE) {
$this->addCheck(new FormValidatorLocale($this, 'abstract', 'required', 'author.submit.form.abstractRequired'));

$trackDao =& DAORegistry::getDAO('TrackDAO');
$trackDao = DAORegistry::getDAO('TrackDAO');
$track = $trackDao->getTrack($paper->getTrackId());
$abstractWordCount = $track->getAbstractWordCount();
if (isset($abstractWordCount) && $abstractWordCount > 0) {
Expand All @@ -47,7 +47,7 @@ function AuthorSubmitStep3Form($paper) {
* Initialize form data from current paper.
*/
function initData() {
$trackDao =& DAORegistry::getDAO('TrackDAO');
$trackDao = DAORegistry::getDAO('TrackDAO');

if (isset($this->paper)) {
$paper =& $this->paper;
Expand Down Expand Up @@ -121,7 +121,7 @@ function readInputData() {

// Load the track. This is used in the step 2 form to
// determine whether or not to display indexing options.
$trackDao =& DAORegistry::getDAO('TrackDAO');
$trackDao = DAORegistry::getDAO('TrackDAO');
$this->_data['track'] =& $trackDao->getTrack($this->paper->getTrackId());
}

Expand All @@ -145,7 +145,7 @@ function getLocaleFieldNames() {
function display() {
$templateMgr =& TemplateManager::getManager();

$countryDao =& DAORegistry::getDAO('CountryDAO');
$countryDao = DAORegistry::getDAO('CountryDAO');
$countries =& $countryDao->getCountries();
$templateMgr->assign_by_ref('countries', $countries);

Expand All @@ -164,8 +164,8 @@ function display() {
* @return int the paper ID
*/
function execute() {
$paperDao =& DAORegistry::getDAO('PaperDAO');
$authorDao =& DAORegistry::getDAO('AuthorDAO');
$paperDao = DAORegistry::getDAO('PaperDAO');
$authorDao = DAORegistry::getDAO('AuthorDAO');
$paper =& $this->paper;
$conference =& Request::getConference();
$schedConf =& Request::getSchedConf();
Expand Down
4 changes: 2 additions & 2 deletions classes/author/form/submit/AuthorSubmitStep4Form.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function display() {
$templateMgr =& TemplateManager::getManager();

// Get supplementary files for this paper
$suppFileDao =& DAORegistry::getDAO('SuppFileDAO');
$suppFileDao = DAORegistry::getDAO('SuppFileDAO');
$templateMgr->assign_by_ref('suppFiles', $suppFileDao->getSuppFilesByPaper($this->paperId));

parent::display();
Expand All @@ -45,7 +45,7 @@ function display() {
* Save changes to paper.
*/
function execute() {
$paperDao =& DAORegistry::getDAO('PaperDAO');
$paperDao = DAORegistry::getDAO('PaperDAO');

// Update paper
$paper =& $this->paper;
Expand Down
8 changes: 4 additions & 4 deletions classes/author/form/submit/AuthorSubmitStep5Form.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function display() {
$templateMgr =& TemplateManager::getManager();

// Get paper file for this paper
$paperFileDao =& DAORegistry::getDAO('PaperFileDAO');
$paperFileDao = DAORegistry::getDAO('PaperFileDAO');
$paperFiles =& $paperFileDao->getPaperFilesByPaper($this->paperId);

$templateMgr->assign_by_ref('files', $paperFiles);
Expand All @@ -44,8 +44,8 @@ function display() {
* Save changes to paper.
*/
function execute() {
$paperDao =& DAORegistry::getDAO('PaperDAO');
$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
$paperDao = DAORegistry::getDAO('PaperDAO');
$reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');

$conference = Request::getConference();
$schedConf = Request::getSchedConf();
Expand All @@ -64,7 +64,7 @@ function execute() {
$paperDao->updatePaper($paper);

// Designate this as the review version by default.
$authorSubmissionDao =& DAORegistry::getDAO('AuthorSubmissionDAO');
$authorSubmissionDao = DAORegistry::getDAO('AuthorSubmissionDAO');
$authorSubmission =& $authorSubmissionDao->getAuthorSubmission($paper->getId());
AuthorAction::designateReviewVersion($authorSubmission);
unset($authorSubmission);
Expand Down
8 changes: 4 additions & 4 deletions classes/author/form/submit/AuthorSubmitSuppFileForm.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function AuthorSubmitSuppFileForm($paper, $suppFileId = null) {
$this->paperId = $paper->getId();

if (isset($suppFileId) && !empty($suppFileId)) {
$suppFileDao =& DAORegistry::getDAO('SuppFileDAO');
$suppFileDao = DAORegistry::getDAO('SuppFileDAO');
$this->suppFile =& $suppFileDao->getSuppFile($suppFileId, $paper->getId());
if (isset($this->suppFile)) {
$this->suppFileId = $suppFileId;
Expand All @@ -55,7 +55,7 @@ function AuthorSubmitSuppFileForm($paper, $suppFileId = null) {
* @return array
*/
function getLocaleFieldNames() {
$suppFileDao =& DAORegistry::getDAO('SuppFileDAO');
$suppFileDao = DAORegistry::getDAO('SuppFileDAO');
return $suppFileDao->getLocaleFieldNames();
}

Expand Down Expand Up @@ -153,7 +153,7 @@ function readInputData() {
function execute() {
import('classes.file.PaperFileManager');
$paperFileManager = new PaperFileManager($this->paperId);
$suppFileDao =& DAORegistry::getDAO('SuppFileDAO');
$suppFileDao = DAORegistry::getDAO('SuppFileDAO');

$fileName = 'uploadSuppFile';

Expand All @@ -163,7 +163,7 @@ function execute() {

// Remove old file and upload new, if file is selected.
if ($paperFileManager->uploadedFileExists($fileName)) {
$paperFileDao =& DAORegistry::getDAO('PaperFileDAO');
$paperFileDao = DAORegistry::getDAO('PaperFileDAO');
$suppFileId = $paperFileManager->uploadSuppFile($fileName, $suppFile->getFileId(), true);
$suppFile->setFileId($suppFileId);
}
Expand Down
6 changes: 3 additions & 3 deletions classes/comment/form/CommentForm.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function CommentForm($commentId, $paperId, $galleyId, $parentId = null) {

$this->paperId = $paperId;

$commentDao =& DAORegistry::getDAO('CommentDAO');
$commentDao = DAORegistry::getDAO('CommentDAO');
$this->comment =& $commentDao->getById($commentId, $paperId);

$this->captchaEnabled = Config::getVar('captcha', 'captcha_on_comments') && Config::getVar('captcha', 'recaptcha');
Expand Down Expand Up @@ -81,7 +81,7 @@ function initData() {
'posterEmail' => $comment->getPosterEmail()
);
} else {
$commentDao =& DAORegistry::getDAO('CommentDAO');
$commentDao = DAORegistry::getDAO('CommentDAO');
$comment =& $commentDao->getById($this->parentId, $this->paperId);
$this->_data = array();
$user = Request::getUser();
Expand Down Expand Up @@ -166,7 +166,7 @@ function execute() {
$commentsRequireRegistration = $conference->getSetting('commentsRequireRegistration');
$commentsAllowAnonymous = $conference->getSetting('commentsAllowAnonymous');

$commentDao =& DAORegistry::getDAO('CommentDAO');
$commentDao = DAORegistry::getDAO('CommentDAO');

$comment = $this->comment;
if (!isset($comment)) {
Expand Down
20 changes: 10 additions & 10 deletions classes/conference/ConferenceDAO.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,34 +95,34 @@ function updateObject(&$conference) {
* @param $conferenceId int
*/
function deleteById($conferenceId) {
$conferenceSettingsDao =& DAORegistry::getDAO('ConferenceSettingsDAO');
$conferenceSettingsDao = DAORegistry::getDAO('ConferenceSettingsDAO');
$conferenceSettingsDao->deleteById($conferenceId);

$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
$emailTemplateDao = DAORegistry::getDAO('EmailTemplateDAO');
$emailTemplateDao->deleteEmailTemplatesByConference($conferenceId);

$rtDao =& DAORegistry::getDAO('RTDAO');
$rtDao = DAORegistry::getDAO('RTDAO');
$rtDao->deleteVersionsByConference($conferenceId);

$roleDao =& DAORegistry::getDAO('RoleDAO');
$roleDao = DAORegistry::getDAO('RoleDAO');
$roleDao->deleteRoleByConferenceId($conferenceId);

$groupDao =& DAORegistry::getDAO('GroupDAO');
$groupDao = DAORegistry::getDAO('GroupDAO');
$groupDao->deleteGroupsByAssocId(ASSOC_TYPE_CONFERENCE, $conferenceId);

$pluginSettingsDao =& DAORegistry::getDAO('PluginSettingsDAO');
$pluginSettingsDao = DAORegistry::getDAO('PluginSettingsDAO');
$pluginSettingsDao->deleteSettingsByConferenceId($conferenceId);

$reviewFormDao =& DAORegistry::getDAO('ReviewFormDAO');
$reviewFormDao = DAORegistry::getDAO('ReviewFormDAO');
$reviewFormDao->deleteByAssoc(ASSOC_TYPE_CONFERENCE, $conferenceId);

$announcementDao =& DAORegistry::getDAO('AnnouncementDAO');
$announcementDao = DAORegistry::getDAO('AnnouncementDAO');
$announcementDao->deleteByAssoc(ASSOC_TYPE_CONFERENCE, $conferenceId);

$announcementTypeDao =& DAORegistry::getDAO('AnnouncementTypeDAO');
$announcementTypeDao = DAORegistry::getDAO('AnnouncementTypeDAO');
$announcementTypeDao->deleteByAssoc(ASSOC_TYPE_CONFERENCE, $conferenceId);

$schedConfDao =& DAORegistry::getDAO('SchedConfDAO');
$schedConfDao = DAORegistry::getDAO('SchedConfDAO');
$schedConfDao->deleteByConferenceId($conferenceId);

parent::deleteById($conferenceId);
Expand Down
6 changes: 3 additions & 3 deletions classes/conference/TrackDAO.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,16 @@ function deleteTrack(&$track) {
* @param $schedConfId int optional
*/
function deleteTrackById($trackId, $schedConfId = null) {
$trackDirectorsDao =& DAORegistry::getDAO('TrackDirectorsDAO');
$trackDirectorsDao = DAORegistry::getDAO('TrackDirectorsDAO');
$trackDirectorsDao->deleteDirectorsByTrackId($trackId, $schedConfId);

// Remove papers from this track
$paperDao =& DAORegistry::getDAO('PaperDAO');
$paperDao = DAORegistry::getDAO('PaperDAO');
$paperDao->removePapersFromTrack($trackId);

// Delete published paper entries from this track -- they must
// be re-published.
$publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');
$publishedPaperDao = DAORegistry::getDAO('PublishedPaperDAO');
$publishedPaperDao->deletePublishedPapersByTrackId($trackId);

if (isset($schedConfId) && !$this->trackExists($trackId, $schedConfId)) return false;
Expand Down
6 changes: 3 additions & 3 deletions classes/conference/TrackDirectorsDAO.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function deleteDirector($schedConfId, $trackId, $userId) {
function &getTracksByUserId($schedConfId, $userId) {
$tracks = array();

$trackDao =& DAORegistry::getDAO('TrackDAO');
$trackDao = DAORegistry::getDAO('TrackDAO');

$result =& $this->retrieve(
'SELECT t.* FROM tracks t, track_directors td WHERE t.track_id = td.track_id AND t.sched_conf_id = ? AND td.user_id = ?',
Expand All @@ -87,7 +87,7 @@ function &getTracksByUserId($schedConfId, $userId) {
function &getDirectorsByTrackId($schedConfId, $trackId) {
$users = array();

$userDao =& DAORegistry::getDAO('UserDAO');
$userDao = DAORegistry::getDAO('UserDAO');

$result =& $this->retrieve(
'SELECT u.* FROM users AS u, track_directors AS e WHERE u.user_id = e.user_id AND e.sched_conf_id = ? AND e.track_id = ? ORDER BY last_name, first_name',
Expand All @@ -114,7 +114,7 @@ function &getDirectorsByTrackId($schedConfId, $trackId) {
function &getDirectorsNotInTrack($schedConfId, $trackId) {
$users = array();

$userDao =& DAORegistry::getDAO('UserDAO');
$userDao = DAORegistry::getDAO('UserDAO');

$result =& $this->retrieve(
'SELECT u.*
Expand Down
4 changes: 2 additions & 2 deletions classes/conference/log/ConferenceEventLogEntry.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ function getEventTitle() {
* @return string
*/
function getUserFullName() {
$userDao =& DAORegistry::getDAO('UserDAO');
$userDao = DAORegistry::getDAO('UserDAO');
return $userDao->getUserFullName($this->getUserId(), true);
}

Expand All @@ -347,7 +347,7 @@ function getUserFullName() {
* @return string
*/
function getUserEmail() {
$userDao =& DAORegistry::getDAO('UserDAO');
$userDao = DAORegistry::getDAO('UserDAO');
return $userDao->getUserEmail($this->getUserId(), true);
}

Expand Down
Loading

0 comments on commit 0629aca

Please sign in to comment.