Loading htdocs/lib/upgrade.php +15 −3 Original line number Diff line number Diff line Loading @@ -756,15 +756,27 @@ function core_install_lastcoredata_defaults() { $now = db_format_timestamp(time()); foreach ($pages as $name) { $page = new stdClass(); $page->name = $name; $page->ctime = $now; $page->institution = 'mahara'; $page->content = get_string($name . 'defaultcontent', 'install', get_string('staticpageconfigdefault', 'install')); $page->name = $name; $page->mtime = $now; $page->mauthor = $userid; $page->content = get_string($page->name . 'defaultcontent', 'install', get_string('staticpageconfigdefault', 'install')); $page->institution = 'mahara'; insert_record('site_content', $page); } $versionedpages = site_content_version_pages(); foreach ($versionedpages as $name) { $page = new stdClass(); $page->ctime = $now; $page->institution = 'mahara'; $page->content = get_string($name . 'defaultcontent', 'install', get_string('staticpageconfigdefault', 'install')); $page->type = $name; $page->author = $userid; $page->version = '1.0'; insert_record('site_content_version', $page); } // install the default layout options install_view_layout_defaults(); Loading htdocs/lib/web.php +9 −1 Original line number Diff line number Diff line Loading @@ -3188,7 +3188,15 @@ function site_menu() { * @return array of names */ function site_content_pages() { return array('about', 'home', 'loggedouthome', 'privacy', 'termsandconditions'); return array('about', 'home', 'loggedouthome', 'termsandconditions'); } /** * Returns the list of site versioned content pages * @return array of names */ function site_content_version_pages() { return array('privacy'); } function get_site_page_content($pagename) { Loading test/behat/features/security/groups_field_injection.feature +2 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,6 @@ Scenario:Injecting sql in groups search field When I set the following fields to these values: | search_query | <script>alert(1);</script> | And I press "search_submit" And I follow "Privacy statement" And I should see "Introduction" And I follow "About" And I should see "About us" Then I go to "homepage" test/behat/features/user_content/create_page.feature +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ Scenario: Creating a page with content in it (Bug 1426983) And I press "Add" And I press "Save" # Adding profile info block And I expand "Personal info" node And I expand "Personal info" node in the "blocktype sidebar" property And I follow "Profile information" And I press "Add" And I press "Save" Loading Loading
htdocs/lib/upgrade.php +15 −3 Original line number Diff line number Diff line Loading @@ -756,15 +756,27 @@ function core_install_lastcoredata_defaults() { $now = db_format_timestamp(time()); foreach ($pages as $name) { $page = new stdClass(); $page->name = $name; $page->ctime = $now; $page->institution = 'mahara'; $page->content = get_string($name . 'defaultcontent', 'install', get_string('staticpageconfigdefault', 'install')); $page->name = $name; $page->mtime = $now; $page->mauthor = $userid; $page->content = get_string($page->name . 'defaultcontent', 'install', get_string('staticpageconfigdefault', 'install')); $page->institution = 'mahara'; insert_record('site_content', $page); } $versionedpages = site_content_version_pages(); foreach ($versionedpages as $name) { $page = new stdClass(); $page->ctime = $now; $page->institution = 'mahara'; $page->content = get_string($name . 'defaultcontent', 'install', get_string('staticpageconfigdefault', 'install')); $page->type = $name; $page->author = $userid; $page->version = '1.0'; insert_record('site_content_version', $page); } // install the default layout options install_view_layout_defaults(); Loading
htdocs/lib/web.php +9 −1 Original line number Diff line number Diff line Loading @@ -3188,7 +3188,15 @@ function site_menu() { * @return array of names */ function site_content_pages() { return array('about', 'home', 'loggedouthome', 'privacy', 'termsandconditions'); return array('about', 'home', 'loggedouthome', 'termsandconditions'); } /** * Returns the list of site versioned content pages * @return array of names */ function site_content_version_pages() { return array('privacy'); } function get_site_page_content($pagename) { Loading
test/behat/features/security/groups_field_injection.feature +2 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,6 @@ Scenario:Injecting sql in groups search field When I set the following fields to these values: | search_query | <script>alert(1);</script> | And I press "search_submit" And I follow "Privacy statement" And I should see "Introduction" And I follow "About" And I should see "About us" Then I go to "homepage"
test/behat/features/user_content/create_page.feature +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ Scenario: Creating a page with content in it (Bug 1426983) And I press "Add" And I press "Save" # Adding profile info block And I expand "Personal info" node And I expand "Personal info" node in the "blocktype sidebar" property And I follow "Profile information" And I press "Add" And I press "Save" Loading