diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-03 12:40:19 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-03 12:40:19 +0100 |
| commit | 8d619e1fd9f31373b750135901f54240a155953f (patch) | |
| tree | 4847ca23176b2308ee1079e2c5589579fc485936 /includes | |
| parent | 505aee3fe652577cd7fd2a62e3563446228133af (diff) | |
| download | stock-8d619e1fd9f31373b750135901f54240a155953f.tar.gz stock-8d619e1fd9f31373b750135901f54240a155953f.tar.bz2 stock-8d619e1fd9f31373b750135901f54240a155953f.zip | |
stock: override getEditUrl() on all concrete content classes
LibertyContent::getEditUrl() always builds edit.php; StockAssembly and
StockMovement now return their correct entry points (edit_assembly.php,
edit_movement.php). StockComponent already had this override.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes')
| -rwxr-xr-x | includes/classes/StockAssembly.php | 7 | ||||
| -rw-r--r-- | includes/classes/StockMovement.php | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/includes/classes/StockAssembly.php b/includes/classes/StockAssembly.php index c7891e3..762c89b 100755 --- a/includes/classes/StockAssembly.php +++ b/includes/classes/StockAssembly.php @@ -595,6 +595,13 @@ class StockAssembly extends StockBase { * @param array pAssemblyId id of gallery to link * @return string the url to display the gallery. */ + public function getEditUrl( $pContentId = null, $pMixed = null ): string { + if( $this->verifyId( $this->mContentId ) ) { + return STOCK_PKG_URL.'edit_assembly.php?content_id='.$this->mContentId; + } + return STOCK_PKG_URL.'edit_assembly.php'; + } + public static function getDisplayUrlFromHash( &$pParamHash ) { $ret = ''; global $gBitSystem; diff --git a/includes/classes/StockMovement.php b/includes/classes/StockMovement.php index 9118ccd..5ee4aae 100644 --- a/includes/classes/StockMovement.php +++ b/includes/classes/StockMovement.php @@ -287,6 +287,13 @@ class StockMovement extends LibertyContent { return static::getDisplayUrlFromHash( $this->mInfo ); } + public function getEditUrl( $pContentId = null, $pMixed = null ): string { + if( $this->verifyId( $this->mContentId ) ) { + return STOCK_PKG_URL.'edit_movement.php?content_id='.$this->mContentId; + } + return STOCK_PKG_URL.'edit_movement.php'; + } + public static function getServiceKey(): string { return 'stock'; } |
