/** * Returns an array containing names of views that changed during last update. * * @return array the names of all changed views */ function getChangedViewNames($changedSizes = array(), $updateExif = false, $updateOriginalFolder = false) { //get all the views that changed during the last update $changedViewNames = $this->_getChangedExpCompElements('views'); //go through all views and check whether anything relevant to the view changed (e.g. the size of images //used inside the view) and an update of the view is necessary even if it didn't change itself. foreach ($this->getViewNames() as $currentViewName) { //if it is already in the list we don't have to check it if (!in_array($currentViewName, $changedViewNames)) { //freeform views -> establish list of tags that make a change necessary, check whether view contains one of these if ($this->getValue($currentViewName . 'View-type') == 'freeform' && PhotoQHelper::containsAnyOfTheseShorttags(stripslashes(html_entity_decode($this->getValue($currentViewName . 'View-freeform'))), $this->_buildListOfRelevantTags($changedSizes, $updateExif, $updateOriginalFolder))) { $changedViewNames[] = $currentViewName; } elseif ($this->getValue($currentViewName . 'View-type') == 'single' && in_array($this->getValue($currentViewName . 'View-singleSize'), $changedSizes)) { //check single sizes -> did corresp. size change? $changedViewNames[] = $currentViewName; } elseif ($this->getValue($currentViewName . 'View-type') == 'imgLink' && (in_array($this->getValue($currentViewName . 'View-imgLinkSize'), $changedSizes) || in_array($this->getValue($currentViewName . 'View-imgLinkTargetSize'), $changedSizes))) { //check img links -> did corresp. sizes change? $changedViewNames[] = $currentViewName; } elseif ($currentViewName == 'content' && $updateExif && $this->getValue('inlineExif')) { //finally if we have inlined exif and it changed we may need to update the content view $changedViewNames[] = $currentViewName; } } } return array_unique($changedViewNames); }