Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
S
srlayer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sven Rhinow
srlayer
Commits
f6325277
Commit
f6325277
authored
May 14, 2014
by
Sven Rhinow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ronance.php for update srl_css_file in binary-fieldtyp, get css-filepath from binaryfield
parent
6c623e08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
2 deletions
+52
-2
ModuleSRLayer.php
ModuleSRLayer.php
+10
-2
config/runonce.php
config/runonce.php
+42
-0
No files found.
ModuleSRLayer.php
View file @
f6325277
...
...
@@ -160,8 +160,16 @@ class ModuleSRLayer extends \Module
$jsOptions
=
implode
(
', '
,
$this
->
optionsArr
);
//eigene CSS-Auszeichnungen aus CSS-Datei
if
(
$this
->
srl_css_file
)
$GLOBALS
[
'TL_CSS'
][]
=
$this
->
srl_css_file
;
else
$GLOBALS
[
'TL_CSS'
][]
=
$GLOBALS
[
'SRL_CSS'
]
.
'?'
.
time
();
$cssObjFile
=
\
FilesModel
::
findByUuid
(
$this
->
srl_css_file
);
if
(
$cssObjFile
===
null
)
{
if
(
!
Validator
::
isUuid
(
$this
->
srl_css_file
))
{
$this
->
log
(
$GLOBALS
[
'TL_LANG'
][
'ERR'
][
'version2format'
],
'ModuleSRLayer.php srl_css_file'
,
'TL_ERROR'
);
}
}
$GLOBALS
[
'TL_CSS'
][]
=
(
$cssObjFile
->
path
)
?
$cssObjFile
->
path
:
$GLOBALS
[
'SRL_CSS'
]
.
'?'
.
time
();
foreach
(
$GLOBALS
[
'SRL_JS'
][
'mootools'
]
as
$jsSource
)
{
...
...
config/runonce.php
0 → 100644
View file @
f6325277
<?php
/**
* angepasster Tipp von BugBuster
* @url: https://community.contao.org/de/showthread.php?45946-fileTree-Felder-f%FCr-Contao-3-2-migrieren-in-eigenen-Erweiterungen
*/
class
srlayerRunonceJob
extends
Controller
{
public
function
__construct
()
{
parent
::
__construct
();
$this
->
import
(
'Database'
);
}
public
function
run
()
{
//Check for update to C3.2
if
(
$this
->
Database
->
tableExists
(
'tl_module'
))
{
$arrFields
=
$this
->
Database
->
listFields
(
'tl_module'
);
$blnDone
=
false
;
//check for one table and field
foreach
(
$arrFields
as
$arrField
)
{
if
(
$arrField
[
'name'
]
==
'srl_css_file'
&&
$arrField
[
'type'
]
!=
'varchar'
)
{
$blnDone
=
true
;
}
}
// Run the version 3.2 update in two tables
if
(
$blnDone
==
false
)
{
Database\Updater
::
convertSingleField
(
'tl_module'
,
'srl_css_file'
);
}
}
}
}
$srlayerRunonceJob
=
new
srlayerRunonceJob
();
$srlayerRunonceJob
->
run
();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment