Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template Cloning #18103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cconard96
Copy link
Contributor

Checklist before requesting a review

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

Proper implementation of what was blocked in #17775 (v10.0.17) to prevent undefined behavior.

  • Allow cloning templates -> new templates
  • Allow creating a template from a single item

@@ -226,7 +227,7 @@ public function cloneMultiple(
*
* @return false|integer The new ID of the clone (or false if fail)
*/
public function clone(array $override_input = [], bool $history = true)
public function clone(array $override_input = [], bool $history = true, bool $clone_as_template = false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add phpdoc for new param

@@ -194,15 +194,16 @@ public function prepareInputForClone($input)
public function cloneMultiple(
int $n,
array $override_input = [],
bool $history = true
bool $history = true,
bool $clone_as_template = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add phpdoc for new param

Copy link
Contributor

@trasher trasher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested UI part, API not tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants