This file bundles most of the functions needed for mutual exclusion to prevent lost update problems. More...
Go to the source code of this file.
Functions | |
getTableRowLock ($tableName, $whereColumn, $whereValue) | |
unlockTableRow ($tableName, $whereColumn, $whereValue) | |
lockTableRow ($tableName, $whereColumn, $whereValue, $lockUntil) | |
getTableNameForEditSection ($secId) | |
isSponsorEditSectionLocked ($secId, $sponsorId) | |
lockSponsorEditSection ($secId, $sponsorId) | |
unlockSponsorEditSection ($secId, $sponsorId) | |
renewSponsorEditSectionLock ($secId, $sponsorId) | |
isProductionFacilityLocked ($id) | |
lockProductionFacility ($id) | |
unlockProductionFacility ($id) | |
renewProductionFacilityLock ($id) | |
isStatusLocked ($id) | |
lockStatus ($id) | |
unlockStatus ($id) | |
renewStatusLock ($id) | |
isCategoryLocked ($id) | |
lockCategory ($id) | |
unlockCategory ($id) | |
renewCategoryLock ($id) | |
isCarLocked ($id) | |
lockCar ($id) | |
unlockCar ($id) | |
renewCarLock ($id) | |
This file bundles most of the functions needed for mutual exclusion to prevent lost update problems.
This file bundles most of the functions needed for mutual exclusive working on shared datasets to prevent lost update problems and similar problems.
This file is linked with the other funcions via the inc/common.php.
Definition in file functions_locks.php.
getTableNameForEditSection | ( | $secId) |
Gets the table name corresponding to the edit section (used in lock functions)
integer | $secId | id of the edit section |
Definition at line 126 of file functions_locks.php.
References $db.
Referenced by isSponsorEditSectionLocked(), lockSponsorEditSection(), renewSponsorEditSectionLock(), and unlockSponsorEditSection().
getTableRowLock | ( | $tableName, | |
$whereColumn, | |||
$whereValue | |||
) |
Gets the lock state of a table row
string | $tableName | name of the table in the database |
string | $whereColumn | column of the table row to compare |
integer | $whereValue | required value in the column |
Definition at line 32 of file functions_locks.php.
Referenced by isCarLocked(), isCategoryLocked(), isProductionFacilityLocked(), isSponsorEditSectionLocked(), isStatusLocked(), renewCarLock(), renewCategoryLock(), renewProductionFacilityLock(), renewSponsorEditSectionLock(), renewStatusLock(), and unlockTableRow().
isCarLocked | ( | $id) |
Checks if the car is locked (dropdown fields)
integer | $id | of the status |
Definition at line 399 of file functions_locks.php.
References $db, and getTableRowLock().
isCategoryLocked | ( | $id) |
Checks if the category is locked (dropdown fields)
integer | $id | of the status |
Definition at line 345 of file functions_locks.php.
References $db, and getTableRowLock().
isProductionFacilityLocked | ( | $id) |
Checks if the production facility is locked (dropdown fields)
integer | $id | of the production facility |
Definition at line 237 of file functions_locks.php.
References $db, and getTableRowLock().
isSponsorEditSectionLocked | ( | $secId, | |
$sponsorId | |||
) |
Checks if a sponsor edit section is locked
integer | $secId | id of the edit section |
integer | $sponsorId | id of the current edited sponsor |
Definition at line 153 of file functions_locks.php.
References getTableNameForEditSection(), and getTableRowLock().
Referenced by deleteSponsor().
isStatusLocked | ( | $id) |
Checks if the status is locked (dropdown fields)
integer | $id | of the status |
Definition at line 291 of file functions_locks.php.
References $db, and getTableRowLock().
lockCar | ( | $id) |
Locks the car (dropdown fields)
integer | $id | of the car |
Definition at line 415 of file functions_locks.php.
References $db, EDIT_SECTION_LOCK_DURATION, and lockTableRow().
Referenced by renewCarLock().
lockCategory | ( | $id) |
Locks the category (dropdown fields)
integer | $id | of the category |
Definition at line 361 of file functions_locks.php.
References $db, EDIT_SECTION_LOCK_DURATION, and lockTableRow().
Referenced by renewCategoryLock().
lockProductionFacility | ( | $id) |
Locks the production facility (dropdown fields)
integer | $id | of the production facility |
Definition at line 253 of file functions_locks.php.
References $db, EDIT_SECTION_LOCK_DURATION, and lockTableRow().
Referenced by renewProductionFacilityLock().
lockSponsorEditSection | ( | $secId, | |
$sponsorId | |||
) |
Locks a sponsor edit section
integer | $secId | id of the edit section |
integer | $sponsorId | id of the current edited sponsor |
Definition at line 179 of file functions_locks.php.
References EDIT_SECTION_LOCK_DURATION, getTableNameForEditSection(), and lockTableRow().
Referenced by deleteSponsor().
lockStatus | ( | $id) |
Locks the status (dropdown fields)
integer | $id | of the status |
Definition at line 307 of file functions_locks.php.
References $db, EDIT_SECTION_LOCK_DURATION, and lockTableRow().
Referenced by renewStatusLock().
lockTableRow | ( | $tableName, | |
$whereColumn, | |||
$whereValue, | |||
$lockUntil | |||
) |
Locks a table row in the database by adding a lock time and the lock user id
string | $tableName | name of the table in the database |
string | $whereColumn | column of the table row to compare |
integer | $whereValue | required value in the column |
integer | $lockUntil | until this time the entry is locked |
Definition at line 107 of file functions_locks.php.
Referenced by lockCar(), lockCategory(), lockProductionFacility(), lockSponsorEditSection(), lockStatus(), and renewSponsorEditSectionLock().
renewCarLock | ( | $id) |
Renews the the lock time of the car (dropdown fields)
integer | $id | of the car |
Definition at line 439 of file functions_locks.php.
References $db, getTableRowLock(), and lockCar().
renewCategoryLock | ( | $id) |
Renews the the lock time of the category (dropdown fields)
integer | $id | of the category |
Definition at line 385 of file functions_locks.php.
References $db, getTableRowLock(), and lockCategory().
renewProductionFacilityLock | ( | $id) |
Renews the the lock time of the production facility (dropdown fields)
integer | $id | of the production facility |
Definition at line 277 of file functions_locks.php.
References $db, getTableRowLock(), and lockProductionFacility().
renewSponsorEditSectionLock | ( | $secId, | |
$sponsorId | |||
) |
Renews the the lock time of a sponsor edit section
integer | $secId | id of the edit section |
integer | $sponsorId | id of the current edited sponsor |
Definition at line 215 of file functions_locks.php.
References EDIT_SECTION_LOCK_DURATION, getTableNameForEditSection(), getTableRowLock(), and lockTableRow().
renewStatusLock | ( | $id) |
Renews the the lock time of the status (dropdown fields)
integer | $id | of the status |
Definition at line 331 of file functions_locks.php.
References $db, getTableRowLock(), and lockStatus().
unlockCar | ( | $id) |
Unlocks the car (dropdown fields)
integer | $id | of the car |
Definition at line 428 of file functions_locks.php.
References $db, and unlockTableRow().
unlockCategory | ( | $id) |
Unlock the category (dropdown fields)
integer | $id | of the category |
Definition at line 374 of file functions_locks.php.
References $db, and unlockTableRow().
unlockProductionFacility | ( | $id) |
Unlocks the production facility (dropdown fields)
integer | $id | of the production facility |
Definition at line 266 of file functions_locks.php.
References $db, and unlockTableRow().
unlockSponsorEditSection | ( | $secId, | |
$sponsorId | |||
) |
Unlocks a sponsor edit section
integer | $secId | id of the edit section |
integer | $sponsorId | id of the current edited sponsor |
Definition at line 198 of file functions_locks.php.
References getTableNameForEditSection(), and unlockTableRow().
Referenced by deleteSponsor().
unlockStatus | ( | $id) |
Unlock the status (dropdown fields)
integer | $id | of the status |
Definition at line 320 of file functions_locks.php.
References $db, and unlockTableRow().
unlockTableRow | ( | $tableName, | |
$whereColumn, | |||
$whereValue | |||
) |
Unlocks a table row in the database by removing the lock time and the lock user id
string | $tableName | name of the table in the database |
string | $whereColumn | column of the table row to compare |
integer | $whereValue | required value in the column |
Definition at line 76 of file functions_locks.php.
References $mysqli, and getTableRowLock().
Referenced by unlockCar(), unlockCategory(), unlockProductionFacility(), unlockSponsorEditSection(), and unlockStatus().