Commit 5559cb8af574803ad4a6dc66d2b009d8df47d385

Authored by michael
1 parent 9e103a9d

update notify web master method to mail website details and publication request comment


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1526 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/documentmanagement/Document.inc
... ... @@ -939,14 +939,17 @@ class Document {
939 939 }
940 940  
941 941 /**
942   - * Notify the web master when a document is awaiting publishing
943   - *
944   - */
945   - function notifyWebMaster($iDocumentID) {
  942 + * Notify the web master when a document is awaiting publishing
  943 + *
  944 + * @param integer the docoument to publish
  945 + * @param string comment to the web master from the publisher
  946 + */
  947 + function notifyWebMaster($iDocumentID, $sComment) {
946 948 global $default;
947   - $sQuery = "SELECT WS.web_master_id " .
948   - "FROM $default->owl_web_sites_table AS WS INNER JOIN $default->owl_web_documents_table AS WD ON WS.id = WD.web_site_id " .
949   - "WHERE WD.document_id = $iDocumentID";
  949 + $sQuery = "SELECT WS.web_master_id, WS.web_site_name, WS.web_site_url " .
  950 + "FROM $default->owl_web_sites_table AS WS " .
  951 + "INNER JOIN $default->owl_web_documents_table AS WD ON WS.id = WD.web_site_id " .
  952 + "WHERE WD.document_id = $iDocumentID";
950 953  
951 954 $sql = $default->db;
952 955 $sql->query($sQuery);
... ... @@ -956,10 +959,10 @@ class Document {
956 959 if ($oUser->getEmailNotification()) {
957 960 $oDocument = Document::get($iDocumentID);
958 961 $sBody = $oUser->getUserName() . ", the document, '" . generateControllerLink("viewDocument", "fDocumentID=" . $oDocument->iId, $oDocument->getName()) . "' " .
959   - "is pending web publishing";
  962 + "is pending web publishing to " . $sql->f("web_site_name") . " (" . $sql->f("web_site_url") . ").\n\n The publisher had these additional comments to make:\n$sComment" ;
960 963  
961 964 $oEmail = & new Email();
962   - $oEmail->send($oUser->getEmail(), "Document collaboration role active", $sBody);
  965 + $oEmail->send($oUser->getEmail(), "Document for Web Publishing", $sBody);
963 966 }
964 967 }
965 968  
... ...