implement copying of Stations for Seminary copy feature
This commit is contained in:
parent
091d014815
commit
84a3855e47
8 changed files with 166 additions and 25 deletions
|
|
@ -23,6 +23,30 @@
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* Copy a Station.
|
||||
*
|
||||
* @param int $userId ID of creating user
|
||||
* @param int $sourceStationId ID of Station to copy from
|
||||
* @param int $targetStationId ID of Station to copy to
|
||||
* @param int $seminaryMediaIds Mapping of SeminaryMedia-IDs from source Seminary to targetSeminary
|
||||
*/
|
||||
public function copyStation($userId, $sourceStationId, $targetStationId, $seminaryMediaIds)
|
||||
{
|
||||
// Copy keyword
|
||||
$this->db->query(
|
||||
'INSERT INTO stationtypes_keyword '.
|
||||
'(station_id, created_user_id, keyword_regex) '.
|
||||
'SELECT ?, ?, keyword_regex '.
|
||||
'FROM stationtypes_keyword '.
|
||||
'WHERE station_id = ?',
|
||||
'iii',
|
||||
$targetStationId, $userId,
|
||||
$sourceStationId
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the task of a keyword Station
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue