Merge pull request #6798 from eileenmcnaughton/master
[civicrm-core.git] / CRM / Utils / Token.php
index 0ebcc5f3b20e0bde0802d211c007a59d5eb43eaa..192fc5b97bcb4fdb999631dd5b15b61e12fa7cf8 100644 (file)
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id: $
- *
  */
 
 /**
- * Class to abstract token replacement
+ * Class to abstract token replacement.
  */
 class CRM_Utils_Token {
   static $_requiredTokens = NULL;
@@ -486,19 +484,15 @@ class CRM_Utils_Token {
         break;
 
       case 'editUrl':
+      case 'scheduleUrl':
+        // Note: editUrl and scheduleUrl used to be different, but now there's
+        // one screen which can adapt based on permissions (in workflow mode).
         $value = CRM_Utils_System::url('civicrm/mailing/send',
           "reset=1&mid={$mailing->id}&continue=true",
           TRUE, NULL, FALSE, TRUE
         );
         break;
 
-      case 'scheduleUrl':
-        $value = CRM_Utils_System::url('civicrm/mailing/schedule',
-          "reset=1&mid={$mailing->id}",
-          TRUE, NULL, FALSE, TRUE
-        );
-        break;
-
       case 'html':
         $page = new CRM_Mailing_Page_View();
         $value = $page->run($mailing->id, NULL, FALSE, TRUE);
@@ -870,8 +864,6 @@ class CRM_Utils_Token {
    *  this routine will remove the extra backslashes and braces
    *
    * @param $str ref to the string that will be scanned and modified
-   * @return void
-   *   this function works directly on the string that is passed
    */
   public static function unescapeTokens(&$str) {
     $str = preg_replace('/\\\\|\{(\{\w+\.\w+\})\}/', '\\1', $str);