Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher
DESCRIBE tblarticles;Index: search.php
===================================================================
RCS file: /cvs/ojs/search.php,v
retrieving revision 1.83
diff -u -r1.83 search.php
--- search.php 11 Nov 2005 18:56:46 -0000 1.83
+++ search.php 11 Nov 2005 19:19:08 -0000
@@ -273,9 +273,9 @@
dtDateHTMLGalleyCreated, dtDatePDFGalleyCreated, fkFilePDFID,
dtDatePostScriptGalleyCreated, fkFilePostScriptID,
bContentsLinkPage, fkPublishStatusID
- FROM tblarticles AS a, tblsections AS s
+ FROM tblarticles AS a INNER JOIN tblsections AS s ON fkSectionID=nSectionID
LEFT JOIN tblissues AS i ON fkIssueID=nIssueID
- WHERE fkSectionID=nSectionID AND a.bPublished='1' AND ($where)
+ WHERE a.bPublished='1' AND ($where)
ORDER BY nYear DESC, nVolume DESC, nNumber DESC, s.nRank, nOrder";
$result = $db->query($sql);
$num_results = $db->num_rows($result);
@@ -660,10 +660,12 @@
dtDateHTMLGalleyCreated, dtDatePDFGalleyCreated, fkFilePDFID,
dtDatePostScriptGalleyCreated, fkFilePostScriptID,
bContentsLinkPage, fkPublishStatusID
- FROM tblauthorstoarticles AS t, tblarticles AS a, tblsections AS s
+ FROM tblauthorstoarticles AS t
+ INNER JOIN tblarticles AS a ON fkArticleID=nArticleID
+ INNER JOIN tblsections AS s ON fkSectionID=nSectionID
LEFT JOIN tblissues AS i ON fkIssueID=nIssueID
- WHERE fkAuthorID='$author_row[fkAuthorID]' AND fkArticleID=nArticleID
- AND fkSectionID=nSectionID AND a.bPublished='1' AND bAuthorIndex='1'
+ WHERE fkAuthorID='$author_row[fkAuthorID]'
+ AND a.bPublished='1' AND bAuthorIndex='1'
ORDER BY nYear DESC, nVolume DESC, nNumber DESC, s.nRank, nOrder";
$article_result = $db->query($sql);
$num_articles = $db->num_rows($article_result);
@@ -769,10 +771,12 @@
dtDateHTMLGalleyCreated, dtDatePDFGalleyCreated, fkFilePDFID,
dtDatePostScriptGalleyCreated, fkFilePostScriptID,
bContentsLinkPage, fkPublishStatusID
- FROM tblauthorstoarticles AS t, tblarticles AS a, tblsections AS s
+ FROM tblauthorstoarticles AS t
+ INNER JOIN tblarticles AS a ON fkArticleID=nArticleID
+ INNER JOIN tblsections AS s ON fkSectionID=nSectionID
LEFT JOIN tblissues AS i ON fkIssueID=nIssueID
- WHERE fkAuthorID='$author_row[fkAuthorID]' AND fkArticleID=nArticleID
- AND fkSectionID=nSectionID AND a.bPublished='1' AND bAuthorIndex='1'
+ WHERE fkAuthorID='$author_row[fkAuthorID]'
+ AND a.bPublished='1' AND bAuthorIndex='1'
ORDER BY nYear DESC, nVolume DESC, nNumber DESC, s.nRank, nOrder";
$article_result = $db->query($sql);
$num_articles = $db->num_rows($article_result);
Index: include/validatefunc.inc.php
===================================================================
RCS file: /cvs/ojs/include/validatefunc.inc.php,v
retrieving revision 1.23
diff -u -r1.23 validatefunc.inc.php
--- include/validatefunc.inc.php 29 Jul 2004 03:15:42 -0000 1.23
+++ include/validatefunc.inc.php 11 Nov 2005 19:19:09 -0000
@@ -329,25 +329,25 @@
// Get list of submissions for this editor
- $submission_query = "SELECT " . ($count ? "COUNT(*)" : "nArticleID, dtDateSubmitted, dtDateEdDec, nSectionID, chAbbrev AS chSection, nUserID AS edUserID, chInitials") . " FROM tblarticles, tblsections LEFT JOIN tbleditors ON tblarticles.fkEditorID = nEditorID LEFT JOIN tblusers ON tblusers.fkEditorID = tblarticles.fkEditorID WHERE tblarticles.fkSectionID = nSectionID";
+ $submission_query = "SELECT " . ($count ? "COUNT(*)" : "nArticleID, dtDateSubmitted, dtDateEdDec, nSectionID, chAbbrev AS chSection, nUserID AS edUserID, chInitials") . " FROM tblarticles INNER JOIN tblsections ON tblarticles.fkSectionID = nSectionID LEFT JOIN tbleditors ON tblarticles.fkEditorID = nEditorID LEFT JOIN tblusers ON tblusers.fkEditorID = tblarticles.fkEditorID WHERE";
if($nEditorRole == 2) {
// for managing editors
if($nEdProcessType == 3 && !$show_all) {
- $submission_query .= " AND dtDateEdDec IS NOT NULL";
+ $submission_query .= " dtDateEdDec IS NOT NULL AND";
}
} else if($nEditorRole == 3) {
// for layout editors
- $submission_query .= " AND dtDateRequestGalleys IS NOT NULL AND dtDateGalleysCompleted IS NULL";
+ $submission_query .= " dtDateRequestGalleys IS NOT NULL AND dtDateGalleysCompleted IS NULL AND";
} else if($nEdProcessType == 1 || $nEditorRole == 0 || $nEditorRole == 1) {
// for undesignated/section editors
- $submission_query .= " AND (tblarticles.fkEditorID = '$editor_id' OR nSectionID IN ('" . join("', '", editorSections($editor_id)) . "'))" . ($nEdProcessType == 3 ? " AND dtDateEdDec IS NULL" : "");
+ $submission_query .= " (tblarticles.fkEditorID = '$editor_id' OR nSectionID IN ('" . join("', '", editorSections($editor_id)) . "'))" . ($nEdProcessType == 3 ? " AND dtDateEdDec IS NULL" : ""). " AND";
}
// exclude articles that have been queued for scheduling, archived, or have not been submitted
- $submission_query .= " AND bArchive = '0' AND bSchedule = '0' AND dtDateSubmitted IS NOT NULL" . (isset($sectionid) ? " AND nSectionID = '" . ((int) $sectionid) . "'" : "");
+ $submission_query .= " bArchive = '0' AND bSchedule = '0' AND dtDateSubmitted IS NOT NULL" . (isset($sectionid) ? " AND nSectionID = '" . ((int) $sectionid) . "'" : "");
return $submission_query;
}
patch --dry-run -p3 < mysqlUpgrade.patchpatch -p3 < mysqlUpgrade.patchReturn to OJS Technical Support
Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests