add some string operations on url creation
This commit is contained in:
parent
eb07c5cf73
commit
e5efd76e66
1 changed files with 7 additions and 0 deletions
|
@ -194,6 +194,13 @@ class CRM_TwingleCampaign_BAO_TwingleCampaign {
|
||||||
*/
|
*/
|
||||||
private
|
private
|
||||||
function createUrl() {
|
function createUrl() {
|
||||||
|
// Trim parent_project_url
|
||||||
|
$this->values['parent_project_url'] = trim($this->values['parent_project_url']);
|
||||||
|
// If url ends with a '/', remove it
|
||||||
|
if (substr($this->values['parent_project_url'], -1) == '/') {
|
||||||
|
$this->values['parent_project_url'] =
|
||||||
|
substr_replace($this->values['parent_project_url'], '', -1);
|
||||||
|
}
|
||||||
$this->values['url'] =
|
$this->values['url'] =
|
||||||
$this->values['parent_project_url'] . '?tw_cid=' . $this->values['cid'];
|
$this->values['parent_project_url'] . '?tw_cid=' . $this->values['cid'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue