CMS  Version 3.9
clear_content_properties.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("section", "field_renderers");
3 Fakoli::usingFeature("auto_form");
4 
5 Fakoli::assertRole("admin");
6 $ids = checkNumeric($_GET["section_content_id"]);
7 
8 // Reset each of the supplied section content records to default.
9 
11 $sectionContent->filter = new InclusionFilter("section_content_id", "template", "role", "use_SSL");
12 
13 foreach($ids as $id)
14 {
15  $sectionContent->section_content_id = $id;
16  $sectionContent->template = "";
17  $sectionContent->role = "";
18  $sectionContent->use_SSL = false;
19  $sectionContent->save();
20 }
21 
22 Fakoli::end("OK");
23 ?>
static usingFeature()
Uses the specified framework feature(s).
Definition: core.inc:388
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
static end($message="")
Use this method to terminate execution of a script instead of using the php keywords exit() or die().
Definition: core.inc:1149
static assertRole($role, $redirect="", $message="")
Assert that the user has one of the specified roles.
Definition: core.inc:297