Skip to content

Commit c978e03

Browse files
authored
Merge pull request #16 from josaphatim/add-copy-method
Add copy script to create script from another
2 parents f06e6ef + d414315 commit c978e03

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/ManageSieve/Client.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,4 +744,20 @@ public function renameScript($oldName, $newName)
744744
}
745745
return false;
746746
}
747+
748+
/**
749+
* Creates a copy of another script
750+
*
751+
* @param string $oldName The old Script name
752+
* @param string $newName The new Script name
753+
*
754+
* @return boolean
755+
*/
756+
public function copyScript($name, $copy)
757+
{
758+
if ($content = $this->getScript($copy)) {
759+
return $this->putScript($name, $content);
760+
}
761+
return false;
762+
}
747763
}

0 commit comments

Comments
 (0)