diff --git a/ICLA/code/interfaces/web/TeamInvitationConfirmation_Controller.php b/ICLA/code/interfaces/web/TeamInvitationConfirmation_Controller.php index 1f28129..42bcc2a 100644 --- a/ICLA/code/interfaces/web/TeamInvitationConfirmation_Controller.php +++ b/ICLA/code/interfaces/web/TeamInvitationConfirmation_Controller.php @@ -67,7 +67,7 @@ final class TeamInvitationConfirmation_Controller extends AbstractController { try{ $current_member = Member::currentUser(); if(is_null($current_member)) - return Director::redirect("Security/login?BackURL=" . urlencode($_SERVER['REQUEST_URI'])); + return Controller::curr()->redirect("Security/login?BackURL=" . urlencode($_SERVER['REQUEST_URI'])); $team = $this->team_manager->confirmInvitation($token, $current_member); return $this->renderWith( array('TeamInvitationConfirmation_successfull','Page') , array('TeamName' => $team->getName() , 'CompanyName' => $team->getCompany()->Name ) ); } diff --git a/elections/code/infrastructure/active_records/FoundationMember.php b/elections/code/infrastructure/active_records/FoundationMember.php index 00c9166..e1f68f6 100644 --- a/elections/code/infrastructure/active_records/FoundationMember.php +++ b/elections/code/infrastructure/active_records/FoundationMember.php @@ -18,7 +18,7 @@ final class FoundationMember extends DataExtension implements IFoundationMember, ICommunityMember { - static $has_many = array( + private static $has_many = array( 'RevocationNotifications' => 'FoundationMemberRevocationNotification', 'Votes' => 'Vote' ); diff --git a/jobs/code/infrastructure/active_records/JobPage.php b/jobs/code/infrastructure/active_records/JobPage.php index 3e313d6..3793045 100644 --- a/jobs/code/infrastructure/active_records/JobPage.php +++ b/jobs/code/infrastructure/active_records/JobPage.php @@ -107,7 +107,6 @@ class JobPage $fields->addFieldToTab('Root.Main', $JobPostedDate, 'Content'); $fields->addFieldToTab('Root.Main', new DateField_Disabled('ExpirationDate','Expiration Date'), 'Content'); - //$fields->addFieldToTab('Root.Content.Main', new TextField('JobLocation','Job Location'), 'Content'); $fields->addFieldToTab('Root.Main', new TextField('JobMoreInfoLink','More Information About This Job (URL)'), 'Content'); $fields->addFieldToTab('Root.Main', new TextField('JobCompany','Company'), 'Content'); $fields->addFieldToTab('Root.Main', new HtmlEditorField('JobInstructions2Apply','Job Instructions to Apply'), 'Content'); diff --git a/marketplace/code/model/consultants/ISpokenLanguage.php b/marketplace/code/model/consultants/ISpokenLanguage.php index 286e3b2..0724da2 100644 --- a/marketplace/code/model/consultants/ISpokenLanguage.php +++ b/marketplace/code/model/consultants/ISpokenLanguage.php @@ -1,5 +1,6 @@ -push(new FormAction('saveNewsArticle', 'Save')); // Create validators $validator = new ConditionalAndValidationRule(array(new RequiredFields('headline','summary','tags','date'))); - $validator->setJavascriptValidationHandler('none'); - $this->addExtraClass('news-registration-form'); + $this->addExtraClass('news-registration-form'); parent::__construct($controller, $name, $fields, $actions, $validator); } diff --git a/news/code/ui/frontend/NewsRequestPage.php b/news/code/ui/frontend/NewsRequestPage.php index 331332a..f7b56d1 100644 --- a/news/code/ui/frontend/NewsRequestPage.php +++ b/news/code/ui/frontend/NewsRequestPage.php @@ -97,12 +97,12 @@ final class NewsRequestPage_Controller extends Page_Controller { if ($data["Image"]["size"] > 1000000) { $form->addErrorMessage("Image", 'The image you have attached is too big. It must be less than 1MB in size.', "bad"); Session::set("FormInfo.Form_NewsRequestForm.data", $data); - return Director::redirect('/news-add/?error=1'); + return Controller::curr()->redirect('/news-add/?error=1'); } if ($data["Document"]["size"] > 1000000) { $form->addErrorMessage("Image", 'The image you have attached is too big. It must be less than 1MB in size.', "bad"); Session::set("FormInfo.Form_NewsRequestForm.data", $data); - return Director::redirect('/news-add/?error=1'); + return Controller::curr()->redirect('/news-add/?error=1'); } try{ @@ -113,7 +113,7 @@ final class NewsRequestPage_Controller extends Page_Controller { } Session::clear("FormInfo.Form_NewsRequestForm.data"); - return Director::redirect('/news-add/?saved=1'); + return Controller::curr()->redirect('/news-add/?saved=1'); } catch(EntityValidationException $ex1){ $messages = $ex1->getMessages(); diff --git a/openstack/code/OpenstackUser.php b/openstack/code/OpenstackUser.php index ea35ae7..23391b7 100644 --- a/openstack/code/OpenstackUser.php +++ b/openstack/code/OpenstackUser.php @@ -106,7 +106,7 @@ class OpenstackUser extends Page { // // Hide unneeded tabs and rename the main tab // - $fields->removeFieldsFromTab('Root.Content', + $fields->removeFieldsFromTab('Root', array( 'GoogleSitemap' ) diff --git a/openstack/code/Page.php b/openstack/code/Page.php index af9dc6d..7fd9b05 100644 --- a/openstack/code/Page.php +++ b/openstack/code/Page.php @@ -40,15 +40,15 @@ class Page extends SiteTree { $fields = parent::getCMSFields(); - $fields->addFieldToTab('Root.Content.Settings', new TextField ('PageCSS','Custom CSS File For This Page (must be in CSS directory)')); + $fields->addFieldToTab('Root.Settings', new TextField ('PageCSS','Custom CSS File For This Page (must be in CSS directory)')); - $fields->addFieldToTab('Root.Content.Settings', new CheckboxField ('IncludeJquery','Include JQuery In This Page')); + $fields->addFieldToTab('Root.Settings', new CheckboxField ('IncludeJquery','Include JQuery In This Page')); - $fields->addFieldToTab('Root.Content.Settings', new CheckboxField ('IncludeShadowBox','Include ShadowBox Javascript and CSS')); + $fields->addFieldToTab('Root.Settings', new CheckboxField ('IncludeShadowBox','Include ShadowBox Javascript and CSS')); - $fields->addFieldToTab('Root.Content.Settings', new TextareaField ('PageJavaScript','Custom JavaScript For This Page')); + $fields->addFieldToTab('Root.Settings', new TextareaField ('PageJavaScript','Custom JavaScript For This Page')); - $fields->addFieldToTab('Root.Content.Settings', new CheckboxField ('BootstrapConverted','Converted To Bootstrap')); + $fields->addFieldToTab('Root.Settings', new CheckboxField ('BootstrapConverted','Converted To Bootstrap')); return $fields; } diff --git a/openstack/code/Presentation.php b/openstack/code/Presentation.php index 400cec8..38a7b4e 100644 --- a/openstack/code/Presentation.php +++ b/openstack/code/Presentation.php @@ -126,7 +126,7 @@ class Presentation extends DataObject if (!$this->PresentationCategoryPageID) { $SummitPageID = 0; - $SummitRedirector = DataObject::get_by_id('RedirectorPage', 154); + $SummitRedirector = RedirectorPage::get()->byID(154); If ($SummitRedirector) { $SummitPageID = $SummitRedirector->LinkToID; $VideoPage = DataObject::get_one('PresentationCategoryPage', '`ParentID` = ' . $SummitPageID); @@ -173,7 +173,7 @@ class Presentation extends DataObject function PopulateFromSchedEvent($SchedEventID) { - $SchedEvent = DataObject::get_by_id('SchedEvent', $SchedEventID); + $SchedEvent = SchedEvent::get()->byID($SchedEventID); $this->Name = $SchedEvent->eventtitle; $this->DisplayOnSite = TRUE; diff --git a/openstack/code/PresentationCategoryPage.php b/openstack/code/PresentationCategoryPage.php index 942611f..8b73527 100644 --- a/openstack/code/PresentationCategoryPage.php +++ b/openstack/code/PresentationCategoryPage.php @@ -18,17 +18,18 @@ */ class PresentationCategoryPage extends Page { - static $db = array( + private static $db = array( 'StillUploading' => 'Boolean' ); - static $has_one = array(); - static $has_many = array( + private static $has_one = array(); + + private static $has_many = array( 'Presentations' => 'Presentation', 'FeaturedVideos' => 'FeaturedVideo' ); - static $allowed_children = array('PresentationCategoryPage'); + private static $allowed_children = array('PresentationCategoryPage'); /** static $icon = "icon/path"; */ @@ -37,7 +38,7 @@ class PresentationCategoryPage extends Page $fields = parent::getCMSFields(); $presentationsTable = new GridField('Presentations', 'Presentations', $this->Presentations(),GridFieldConfig_RecordEditor::create(10)); - $fields->addFieldToTab('Root.Content.Presentations', $presentationsTable); + $fields->addFieldToTab('Root.Presentations', $presentationsTable); // Summit Videos $VideosUploadingField = new OptionSetField('StillUploading', 'Are videos still being uploaded?', array( @@ -45,10 +46,10 @@ class PresentationCategoryPage extends Page '0' => 'No' )); - $fields->addFieldToTab("Root.Content.Main", $VideosUploadingField, 'Content'); + $fields->addFieldToTab("Root.Main", $VideosUploadingField, 'Content'); $featuredVideos = new GridField('FeaturedVideos', 'FeaturedVideos', $this->FeaturedVideos(),GridFieldConfig_RecordEditor::create(10)); - $fields->addFieldToTab('Root.Content.FeaturedVideos', $featuredVideos); + $fields->addFieldToTab('Root.FeaturedVideos', $featuredVideos); return $fields; @@ -82,7 +83,7 @@ class PresentationCategoryPage_Controller extends Page_Controller Session::set('Day', 1); } - if (Director::urlParam("OtherID") != "presentation") Session::set('Autoplay', TRUE); + if ($this->getRequest()->getVar("OtherID") != "presentation") Session::set('Autoplay', TRUE); } //Show the Presentation detail page using the PresentationCategoryPage_presentation.ss template diff --git a/openstack/code/deployment-survey/CountryCodes.php b/openstack/code/deployment-survey/CountryCodes.php index a0034e7..d67fd53 100644 --- a/openstack/code/deployment-survey/CountryCodes.php +++ b/openstack/code/deployment-survey/CountryCodes.php @@ -269,7 +269,7 @@ class CountryCodes { public static function asObject(){ $country_array = CountryCodes::$iso_3166_countryCodes; - $list = new DataObjectSet(); + $list = new ArrayList(); foreach($country_array as $k => $v){ $do = new DataObject(); $do->Code = $k; diff --git a/openstack/code/deployment-survey/Deployment.php b/openstack/code/deployment-survey/Deployment.php index ee5bd28..d176f8a 100644 --- a/openstack/code/deployment-survey/Deployment.php +++ b/openstack/code/deployment-survey/Deployment.php @@ -90,7 +90,7 @@ class Deployment extends DataObject { - $fields = new FieldSet( + $fields = new FieldList( $rootTab = new TabSet("Root", $tabContent = new TabSet('Content', new Tab('Main'), @@ -98,7 +98,7 @@ class Deployment extends DataObject )) ); - $fields->addFieldsToTab('Root.Content.Main', + $fields->addFieldsToTab('Root.Main', array( new TextField('Label', 'Deployment Name'), new OptionSetField( @@ -128,7 +128,7 @@ class Deployment extends DataObject 'Other workloads or applications running in your Openstack environment. (optional)'), )); - $fields->addFieldsToTab('Root.Content.Details', + $fields->addFieldsToTab('Root.Details', array( new LiteralField('Break', '
The information below will help us better understand diff --git a/openstack/code/deployment-survey/DeploymentAdmin.php b/openstack/code/deployment-survey/DeploymentAdmin.php index 8a8d3bb..8092eea 100644 --- a/openstack/code/deployment-survey/DeploymentAdmin.php +++ b/openstack/code/deployment-survey/DeploymentAdmin.php @@ -22,8 +22,8 @@ final class DeploymentAdmin extends ModelAdmin { ); public $showImportForm = false; - static $url_segment = 'deployments'; - static $menu_title = 'Deployments'; + private static $url_segment = 'deployments'; + private static $menu_title = 'Deployments'; /** * @param string $collection_controller_class Override for controller class diff --git a/openstack/code/deployment-survey/DeploymentSurveyPage.php b/openstack/code/deployment-survey/DeploymentSurveyPage.php index dbd0399..c38314f 100644 --- a/openstack/code/deployment-survey/DeploymentSurveyPage.php +++ b/openstack/code/deployment-survey/DeploymentSurveyPage.php @@ -31,13 +31,13 @@ class DeploymentSurveyPage extends Page { $fields = parent::getCMSFields(); //login page content - $fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageTitle','Page Main Title',10)); - $fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageContent','Content')); - $fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageSlide1Content','Slide #1 Content',20)); - $fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageSlide2Content','Slide #2 Content',20)); - $fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageSlide3Content','Slide #3 Content',20)); + $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageTitle','Page Main Title',10)); + $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageContent','Content')); + $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageSlide1Content','Slide #1 Content',20)); + $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageSlide2Content','Slide #2 Content',20)); + $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageSlide3Content','Slide #3 Content',20)); //thank u content - $fields->addFieldToTab('Root.Content.Thank You', new HtmlEditorField('ThankYouContent','Content')); + $fields->addFieldToTab('Root.Thank You', new HtmlEditorField('ThankYouContent','Content')); return $fields; } diff --git a/openstack/code/summit/Summit.php b/openstack/code/summit/Summit.php index 6380d83..ee59f34 100644 --- a/openstack/code/summit/Summit.php +++ b/openstack/code/summit/Summit.php @@ -59,7 +59,7 @@ class Summit extends DataObject { } public function CurrentSummit() { - return DataObject::get_by_id('Summit',$this->CurrentSummitID()); + return Summit::get()->byID($this->CurrentSummitID()); } } \ No newline at end of file diff --git a/openstack/code/summit/SummitAdmin.php b/openstack/code/summit/SummitAdmin.php index b30f41f..a0be109 100644 --- a/openstack/code/summit/SummitAdmin.php +++ b/openstack/code/summit/SummitAdmin.php @@ -18,6 +18,6 @@ class SummitAdmin extends ModelAdmin { 'SummitCategory' ); - static $url_segment = 'summits'; - static $menu_title = 'Summits'; + private static $url_segment = 'summits'; + private static $menu_title = 'Summits'; } \ No newline at end of file diff --git a/themes/openstack/templates/Layout/Includes/VideoThumbnails.ss b/themes/openstack/templates/Layout/Includes/VideoThumbnails.ss index c2e9fa7..fd1bd0a 100644 --- a/themes/openstack/templates/Layout/Includes/VideoThumbnails.ss +++ b/themes/openstack/templates/Layout/Includes/VideoThumbnails.ss @@ -1,6 +1,6 @@