implement copying a complete Seminary (implements issue #7)
This commit is contained in:
parent
a7a4652a0e
commit
b2d00bc624
31 changed files with 2151 additions and 157 deletions
|
|
@ -123,6 +123,28 @@
|
|||
$characterId
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Copy all Character fields of a Seminary.
|
||||
*
|
||||
* @param int $userId ID of copying user
|
||||
* @param int $sourceSeminaryId ID of Seminary to copy from
|
||||
* @param int $targetSeminaryId ID of Seminary to copy to
|
||||
*/
|
||||
public function copyFieldsOfSeminary($userId, $sourceSeminaryId, $targetSeminaryId)
|
||||
{
|
||||
$this->db->query(
|
||||
'INSERT INTO seminarycharacterfields '.
|
||||
'(created_user_id, seminary_id, pos, title, url, seminarycharacterfieldtype_id, regex, required) '.
|
||||
'SELECT ?, ?, pos, title, url, seminarycharacterfieldtype_id, regex, required '.
|
||||
'FROM seminarycharacterfields '.
|
||||
'WHERE seminary_id = ?',
|
||||
'iii',
|
||||
$userId, $targetSeminaryId,
|
||||
$sourceSeminaryId
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue