mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 07:47:00 +02:00
Various minor adjustments
This commit is contained in:
@@ -247,8 +247,8 @@ $config->sessionExpireSeconds = 86400;
|
|||||||
* // if there is a session cookie, a session is likely already in use so keep it going
|
* // if there is a session cookie, a session is likely already in use so keep it going
|
||||||
* if($session->hasCookie()) return true;
|
* if($session->hasCookie()) return true;
|
||||||
*
|
*
|
||||||
* // if URL is an admin URL, allow session
|
* // if URL is an admin URL, allow session (replace /processwire/ with your admin URL)
|
||||||
* if(strpos($_SERVER['REQUEST_URI'], $session->config->urls->admin) === 0) return true;
|
* if(strpos($_SERVER['REQUEST_URI'], '/processwire/) === 0) return true;
|
||||||
*
|
*
|
||||||
* // otherwise disallow session
|
* // otherwise disallow session
|
||||||
* return false;
|
* return false;
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
function _wirePagesAPI($_apiVar, $selector) {
|
function _wirePagesAPI($_apiVar, $selector) {
|
||||||
|
|
||||||
/** @var Pages|PagesType $pages */
|
/** @var Pages|PagesType $pages */
|
||||||
$pages = wire($_apiVar);
|
$pages = is_object($_apiVar) ? $_apiVar : wire($_apiVar);
|
||||||
if(!$pages) return null;
|
if(!$pages) return null;
|
||||||
if(!$selector) return $pages;
|
if(!$selector) return $pages;
|
||||||
|
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
* Item must have a gettable/settable 'id' property for this interface as well
|
* Item must have a gettable/settable 'id' property for this interface as well
|
||||||
*
|
*
|
||||||
* @property int $id
|
* @property int $id
|
||||||
|
* @property string $name
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
interface Saveable {
|
interface Saveable {
|
||||||
|
@@ -1185,6 +1185,10 @@ class Template extends WireData implements Saveable, Exportable {
|
|||||||
public function __isset($key) {
|
public function __isset($key) {
|
||||||
return isset($this->settings[$key]) || isset($this->data[$key]);
|
return isset($this->settings[$key]) || isset($this->data[$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __debugInfo() {
|
||||||
|
return array_merge(array('settings' => $this->settings), parent::__debugInfo());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user