mirror of
https://github.com/processwire/processwire.git
synced 2025-08-07 23:38:29 +02:00
Fix processwire-issues#5 - variations link in image field in repeater
This commit is contained in:
@@ -597,7 +597,7 @@ class ProcessPageEditImageSelect extends Process implements ConfigurableModule {
|
|||||||
* - crop_h (int): Predefined crop height
|
* - crop_h (int): Predefined crop height
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
* @throws Exception|WireException
|
* @throws \Exception|WireException
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function ___executeEdit() {
|
public function ___executeEdit() {
|
||||||
@@ -1202,8 +1202,8 @@ class ProcessPageEditImageSelect extends Process implements ConfigurableModule {
|
|||||||
$pageimage = $this->getPageimage();
|
$pageimage = $this->getPageimage();
|
||||||
|
|
||||||
if(!$this->page || !$pageimage) throw new WireException("No file provided");
|
if(!$this->page || !$pageimage) throw new WireException("No file provided");
|
||||||
if(!$this->page->editable()) throw new WireException("Page is not editable");
|
if(!$this->masterPage->editable()) throw new WireException($this->labels['noAccess']);
|
||||||
$hasEditPermission = $this->wire('user')->hasPermission('page-edit-images', $this->page);
|
$hasEditPermission = $this->wire('user')->hasPermission('page-edit-images', $this->masterPage);
|
||||||
|
|
||||||
$variations = $pageimage->getVariations(array('info' => true));
|
$variations = $pageimage->getVariations(array('info' => true));
|
||||||
$cnt = count($variations);
|
$cnt = count($variations);
|
||||||
|
Reference in New Issue
Block a user