From: SourceForge.net <no...@so...> - 2003-10-25 23:15:39
|
Bugs item #829535, was opened at 2003-10-24 04:50 Message generated for change (Comment added) made by guy_davis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=410239&aid=829535&group_id=34206 Category: None >Group: OPT 1.X (Max) >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Martin Vernooij (martinfst) >Assigned to: Guy Davis (guy_davis) Summary: MAX_1.2: Notification of added document has wrong URL Initial Comment: When uploading a new document and you want to notify other users, OPT sends an e-mail. The URL to the document may not be correct, depending on your settings. 1. When you installed OPT in a subdirectory, say www.site.com/OPT/, the final slash is not added between the CRM_URL variable and the path. In many other locations $CRM_URL is also used, and there a slash is inserted oke, so I didn't want to change CRM_URL. Instead, I modified the scripts. 2. These scripts had to be modified anyway, as I have OPT running on a secure server (and blocked http access to it), so the URL in the email was wrong anyway. Two scripts used for document adding/sending email notification did not check for the force_protocol variable. So I modified the scripts add_doc.inc and edit_doc.inc, both found in <install_dir>/opt/documents/Doc_List I include the diff and if Guy think it's correct, perhaps it can be added to the next release. diff add_doc.inc.org add_doc.inc 123a124,127 > $PROTOCOL=get_setting("force_protocol"); > if (!$PROTOCOL) { > $PROTOCOL="http"; > } 145c149 < "\$p_n\","$s[1] $s[2] $s[3]","$s[1] $s[3]",$description,"http://$SERVER_NAME$CRM_URL?URL=". --- > "\$p_n\","$s[1] $s[2] $s[3]","$s[1] $s[3]",$description,"$PROTOCOL://$SERVER_NAME$CRM_URL/?URL=". 338a343,346 > $PROTOCOL=get_setting("force_protocol"); > if (!$PROTOCOL) { > $PROTOCOL="http"; > } 360c368 < "\$p_n\","$s[1] $s[2] $s[3]","$s[1] $s[3]",$description,"http://$SERVER_NAME$CRM_URL?URL=". --- > "\$p_n\","$s[1] $s[2] $s[3]","$s[1] $s[3]",$description,"$PROTOCOL://$SERVER_NAME$CRM_URL/?URL=". and diff edit_doc.inc.org edit_doc.inc 209a210,213 > $PROTOCOL=get_setting("force_protocol"); > if (!$PROTOCOL) { > $PROTOCOL="http"; > } 231c235 < "\$p_n\","$s[1] $s[2] $s[3]","$s[1] $s[3]",$description,"http://$SERVER_NAME$CRM_URL?URL=". --- > "\$p_n\","$s[1] $s[2] $s[3]","$s[1] $s[3]",$description,"$PROTOCOL://$SERVER_NAME$CRM_URL/?URL=". BTW: edit_doc.inc was saved in DOS mode, I changed that too on my server. On Linux this doesn't change much, but it looks odd if one script is in dos and the other in *nix format ;-)) I did the mod on OPT_MAX_1.2 FYI. Best regards, Martin. ---------------------------------------------------------------------- >Comment By: Guy Davis (guy_davis) Date: 2003-10-25 16:15 Message: Logged In: YES user_id=22084 I agree this was a problem so I corrected the two instance you found above as well all the others I could find (~15 or so). Thanks for pointing this out. Fixes will be in the next release. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=410239&aid=829535&group_id=34206 |