mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 18:24:57 +02:00
Update per processwire/processwire-issues#648
This commit is contained in:
@@ -109,6 +109,19 @@ class PagesNames extends Wire {
|
||||
return $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the given page have a modified “name” during this request?
|
||||
*
|
||||
* @param Page $page
|
||||
* @param bool|null $set Specify boolean true or false to set whether or not it has an adjusted name, or omit just to get
|
||||
* @return bool
|
||||
*
|
||||
*/
|
||||
public function hasAdjustedName(Page $page, $set = null) {
|
||||
if(is_bool($set)) $page->setQuietly('_hasAdjustedName', $set);
|
||||
return $page->get('_hasAdjustedName') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is given page name an untitled page name?
|
||||
*
|
||||
|
Reference in New Issue
Block a user