This file contains hidden or 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
image: brettt89/silverstripe-web:7.1-platform | |
pipelines: | |
default: | |
- step: | |
services: | |
- mysql | |
caches: | |
- composer | |
script: | |
- echo -e 'SS_ENVIRONMENT_TYPE="dev"\nSS_DATABASE_CLASS="MySQLDatabase"\nSS_DATABASE_USERNAME="root"\nSS_DATABASE_PASSWORD="password"\nSS_DATABASE_SERVER="127.0.0.1"\nSS_DATABASE_NAME="pipelines"' > .env |
This file contains hidden or 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 | |
namespace App\Project\Model; | |
use SilverStripe\Core\ClassInfo; | |
use SilverStripe\CMS\Model\SiteTree; | |
use App\Project\Control\PageController; | |
class Page extends SiteTree | |
{ |
This file contains hidden or 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
SET @old='https://www.production.com'; | |
SET @new='http://local.dev'; | |
UPDATE wp_options SET option_value = replace(option_value, @old, @new) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, @old, @new); | |
UPDATE wp_posts SET post_content = replace(post_content, @old, @new); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,@old,@new); |
This file contains hidden or 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
declare @qry nvarchar(max); | |
select @qry = ( | |
select 'IF EXISTS(SELECT * FROM sys.indexes WHERE name='''+ i.name +''' AND object_id = OBJECT_ID(''['+s.name+'].['+o.name+']'')) drop index ['+i.name+'] ON ['+s.name+'].['+o.name+']; ' | |
from sys.indexes i | |
inner join sys.objects o on i.object_id=o.object_id | |
inner join sys.schemas s on o.schema_id = s.schema_id | |
where o.type<>'S' and is_primary_key<>1 and index_id>0 | |
and s.name!='sys' and s.name!='sys' and is_unique_constraint=0 | |
for xml path('')); |
This file contains hidden or 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/model/connect/Database.php b/model/connect/Database.php | |
index cfdd628..53b236f 100644 | |
--- a/model/connect/Database.php | |
+++ b/model/connect/Database.php | |
@@ -132,7 +132,8 @@ abstract class SS_Database { | |
$sql, | |
function($sql) use($connector, $parameters, $errorLevel) { | |
return $connector->preparedQuery($sql, $parameters, $errorLevel); | |
- } | |
+ }, |
This file contains hidden or 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/security/Member.php b/security/Member.php | |
index 6fe8278..05f5d14 100644 | |
--- a/security/Member.php | |
+++ b/security/Member.php | |
@@ -163,6 +163,9 @@ class Member extends DataObject implements TemplateGlobalProvider { | |
*/ | |
private static $session_regenerate_id = true; | |
+ private static $_cached_current_member_id; | |
+ private static $_cached_current_member; |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<?xml-stylesheet type='text/xsl' href='{$BaseHref}googlesitemaps/templates/xml-sitemap.xsl'?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"> | |
<% loop $Items %> | |
<url> | |
<loc>$AbsoluteLink</loc><% if Localisations %><% loop Localisations %> | |
<xhtml:link rel="alternate" hreflang="$PlaceHolderForLocale" href="$AbsoluteLink" /><% end_loop %><% end_if %> | |
<% if $LastEdited %><lastmod>$LastEdited.Format(c)</lastmod><% end_if %> | |
<% if $ChangeFrequency %><changefreq>$ChangeFrequency</changefreq><% end_if %> | |
<% if $GooglePriority %><priority>$GooglePriority</priority><% end_if %> |
This file contains hidden or 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/code/model/UserDefinedForm.php b/code/model/UserDefinedForm.php | |
index 9f96dd7..58e91d6 100755 | |
--- a/code/model/UserDefinedForm.php | |
+++ b/code/model/UserDefinedForm.php | |
@@ -1055,6 +1055,8 @@ JS | |
} | |
} | |
+ Session::set('LastSubmissionFor'. $this->ID, serialize($submittedForm)); | |
+ |
This file contains hidden or 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 -r "echo '<pre>'; print_r(unserialize(file_get_contents('silverstripe-cache/apache/templatemanifest/cache_manifest')));" |