This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Marcus Nyeholt <marcus@silverstripe.com.au> | |
*/ | |
class FacebookService { | |
static $api_urls = array( | |
'object' => 'https://graph.facebook.com/%s', | |
'auth' => 'https://graph.facebook.com/oauth/access_token?client_id=%s&client_secret=%s&grant_type=client_credentials', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function fakeplastictrees() { | |
$fields = array( | |
'ID', 'Title', 'MenuTitle', 'URLSegment', 'ParentID', 'CanViewType' | |
); | |
$query = new SQLQuery($fields, 'SiteTree'); | |
$query = $query->setOrderBy('ParentID', 'ASC'); | |
$query->addWhere('"CanViewType" NOT IN (\'LoggedInUsers\', \'OnlyTheseUsers\')'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author marcus@silverstripe.com.au | |
* @license BSD License http://silverstripe.org/bsd-license/ | |
*/ | |
class FilesystemPublishingJob extends AbstractQueuedJob { | |
public function __construct($object = null) { | |
if ($object) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/Config.php b/core/Config.php | |
index e1db5f4..6bc413b 100644 | |
--- a/core/Config.php | |
+++ b/core/Config.php | |
@@ -118,7 +118,7 @@ class Config { | |
* @return Config | |
*/ | |
static public function inst() { | |
- if (!self::$instance) self::$instance = singleton('Config'); | |
+ if (!self::$instance) self::$instance = new Config(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% require javascript(js/galleriffic-2.0/js/jquery.history.js) %> | |
<% require javascript(js/galleriffic-2.0/js/jquery.galleriffic.js) %> | |
<% require javascript(js/galleriffic-2.0/js/jquery.opacityrollover.js) %> | |
<% require css(js/galleriffic-2.0/css/galleriffic-3.css) %> | |
<% if Images %> | |
<div id="GalleryContent"> | |
<div id="ContentLeft"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* @author Marcus Nyeholt <marcus@silverstripe.com.au> | |
* @license BSD http://silverstripe.org/BSD-license | |
*/ | |
class SimpleGalleryPage extends Page { | |
public static $has_one = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Description of MyPage | |
* | |
* @author marcus@silverstripe.com.au | |
* @license BSD License http://silverstripe.org/bsd-license/ | |
*/ | |
class MyPage extends Page { | |
public static $has_many = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Ideas on ORM interface and interactions / relationships | |
*/ | |
class Dataobject { | |
function __construct(Data $mapper, array $data = null) { | |
$this->mapper = $mapper; | |
if($data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/framework/forms/Form.php b/framework/forms/Form.php | |
index c93d1e4..d8acb64 100644 | |
--- a/framework/forms/Form.php | |
+++ b/framework/forms/Form.php | |
@@ -363,6 +363,14 @@ class Form extends RequestHandler { | |
return $this->$funcName($vars, $this, $request); | |
} elseif($field = $this->checkFieldsForAction($this->Fields(), $funcName)) { | |
return $field->$funcName($vars, $this, $request); | |
+ } else { | |
+ $action = $this->Actions()->dataFieldByName('action_' . $funcName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Capture / cache some commonly used data elements for each page | |
* | |
* @author marcus | |
*/ | |
class SiteDataService { | |
protected $items = array(); |
OlderNewer