Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Galette
Galette
Commits
9547a724
Commit
9547a724
authored
Jun 25, 2022
by
Guillaume Agniéray
Committed by
Johan Cwiklinski
Jun 25, 2022
Browse files
Fix paths following previous commit
parent
22930050
Changes
8
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
9547a724
...
...
@@ -77,7 +77,11 @@ tests/mageekguy.atoum.phar
galette/vendor/
node_modules/
galette/webroot/assets/*
galette/webroot/themes/*
# Semantic UI
semantic
!ui/semantic
# API documentation
apidocs/
...
...
bin/release
View file @
9547a724
...
...
@@ -336,9 +336,9 @@ def add_libs(rel_name, galette_archive):
#node modules are no longer needed
shutil
.
rmtree
(
os
.
path
.
join
(
npm_dir
,
'node_modules'
))
#
fomantic-ui and theme
sources are no longer needed
#
UI
sources are no longer needed
shutil
.
rmtree
(
os
.
path
.
join
(
npm_dir
,
'semantic'
))
shutil
.
rmtree
(
os
.
path
.
join
(
npm_dir
,
'
theme
'
))
shutil
.
rmtree
(
os
.
path
.
join
(
npm_dir
,
'
ui
'
))
#install php dependencies
composer_cmd
=
'composer install --no-dev'
...
...
galette/lib/Galette/Middleware/UpdateAndMaintenance.php
View file @
9547a724
...
...
@@ -138,20 +138,28 @@ class UpdateAndMaintenance
$path
.
=
'/'
;
}
$
css
_path
=
$path
.
GALETTE_THEME
;
$
theme
_path
=
$path
.
GALETTE_THEME
;
$body
=
"<!DOCTYPE html>
<html lang=
\"
"
.
$this
->
i18n
->
getAbbrev
()
.
"
\"
>
<html
class=
\"
public_page
\"
lang=
\"
"
.
$this
->
i18n
->
getAbbrev
()
.
"
\"
>
<head>
<title>"
.
_T
(
"Galette needs update!"
)
.
"</title>
<meta charset=
\"
UTF-8
\"
/>
<link rel=
\"
stylesheet
\"
type=
\"
text/css
\"
href=
\"
"
.
$css_path
.
"galette.css
\"
/>
<link rel=
\"
stylesheet
\"
type=
\"
text/css
\"
href=
\"
"
.
$theme_path
.
"../../assets/css/galette-main.bundle.min.css
\"
/>
<link rel=
\"
stylesheet
\"
type=
\"
text/css
\"
href=
\"
"
.
$theme_path
.
"ui/semantic.min.css
\"
/>
<link rel=
\"
shortcut icon
\"
href=
\"
"
.
$theme_path
.
"images/favicon.png
\"
/>
</head>
<body class=
\"
notup2date
\"
>
<p class=
\"
center
\"
>
<img src=
\"
"
.
$css_path
.
"images/galette.png
\"
alt=
\"\"
/>
</p>
<div id=
\"
errorbox
\"
>"
.
$contents
.
"</div>
<body class=
\"
notup2date pushable
\"
>
<div class=
\"
pusher
\"
>
<div id=
\"
main
\"
class=
\"
ui container
\"
>
<div class=
\"
ui basic segment
\"
>
<div class=
\"
ui basic center aligned fitted segment
\"
>
<img src=
\"
"
.
$theme_path
.
"images/galette.png
\"
alt=
\"
[ Galette ]
\"
/>
</div>
<div class=
\"
ui center aligned message
\"
>"
.
$contents
.
"</div>
</div>
</div>
</div>
</body>
</html>"
;
return
$body
;
...
...
@@ -166,7 +174,7 @@ class UpdateAndMaintenance
*/
private
function
maintenancePage
(
Request
$request
)
{
$contents
=
"<
h1
>"
.
_T
(
"Galette is currently under maintenance!"
)
.
"</
h1
>
$contents
=
"<
div class=
\"
header
\"
>"
.
_T
(
"Galette is currently under maintenance!"
)
.
"</
div
>
<p>"
.
_T
(
"The Galette instance you are requesting is currently under maintenance. Please come back later."
)
.
"</p>"
;
return
$this
->
renderPage
(
$request
,
$contents
);
}
...
...
galette/templates/default/elements/header.html.twig
View file @
9547a724
...
...
@@ -3,19 +3,17 @@
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{{
base_url
()
}}
/assets/css/galette-main.bundle.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{{
base_url
()
}}
/
assets/
ui/semantic.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
ui/semantic.min.css"
/>
{# Let's see if a local CSS exists and include it #}
{%
set
localstylesheet
=
constant
(
'_CURRENT_THEME_PATH'
)
~
"galette_local.css"
%}
{%
if
file_exists
(
localstylesheet
)
%}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
/
galette_local.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
galette_local.css"
/>
{%
endif
%}
<script
type=
"text/javascript"
src=
"
{{
base_url
()
}}
/assets/js/galette-main.bundle.min.js"
></script>
<script
type=
"text/javascript"
src=
"
{{
base_url
()
}}
/assets/ui/semantic.min.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
galette_print.css"
media=
"print"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{{
base_url
()
}}
/assets/css/galette_print.css"
media=
"print"
/>
{# Let's see if a local print CSS exists and include it #}
{%
set
localprintstylesheet
=
constant
(
'_CURRENT_THEME_PATH'
)
~
"galette_print_local.css"
%}
{%
if
file_exists
(
localprintstylesheet
)
%}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
/
galette_print_local.css"
media=
"print"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
galette_print_local.css"
media=
"print"
/>
{%
endif
%}
<link
rel=
"shortcut icon"
href=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
images/favicon.png"
/>
...
...
galette/templates/default/elements/scripts.html.twig
View file @
9547a724
<script
type=
"text/javascript"
src=
"
{{
base_url
()
}}
/assets/js/galette-main.bundle.min.js"
></script>
<script
type=
"text/javascript"
src=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
ui/semantic.min.js"
></script>
<script
type=
"text/javascript"
>
function
csrfSafeMethod
(
method
)
{
// these HTTP methods do not require CSRF protection
...
...
@@ -46,7 +48,7 @@
<script
type=
"module"
src=
"
{{
base_url
()
}}
/assets/js/galette-chartjs.bundle.min.js"
></script>
{%
endif
%}
{%
if
require_mass
%}
<script
type=
"text/javascript"
src=
"
{{
base_url
()
}}
/js/mass_changes.js"
></script>
<script
type=
"text/javascript"
src=
"
{{
base_url
()
}}
/
assets/
js/mass_changes.js"
></script>
{%
endif
%}
{%
if
html_editor
%}
<script
src=
"
{{
base_url
()
}}
/assets/js/lang/summernote-
{{
i18n.getID
()
|
replace
(
{
'_'
:
'-'
}
)
}}
.min.js"
></script>
...
...
@@ -106,5 +108,5 @@
{%
endif
%}
{%
set
localjstracking
=
constant
(
'_CURRENT_THEME_PATH'
)
~
"tracking.js"
%}
{%
if
file_exists
(
localjstracking
)
%}
<script
type=
"text/javascript"
src=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
/
tracking.js"
></script>
<script
type=
"text/javascript"
src=
"
{{
base_url
()
}}
/
{{
constant
(
'GALETTE_THEME'
)
}}
tracking.js"
></script>
{%
endif
%}
galette/webroot/compat_test.php
View file @
9547a724
...
...
@@ -46,62 +46,42 @@ $cm->doCheck(false); //do not load with translations!
<html>
<head>
<title>
Galette compatibility tests
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"themes/default/galette.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"assets/css/galette-main.bundle.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"assets/ui/semantic.min.css"
/>
<style
type=
"text/css"
>
h1
{
margin-top
:
.5em
;
text-align
:
center
;
}
h2
{
font-size
:
1.2em
;
text-align
:
center
;
}
div
{
width
:
30em
;
margin
:
0
auto
;
}
li
{
padding
:
.2em
0
;
}
.Missing
{
color
:
red
;
}
.Ok
{
color
:
green
;
}
</style>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./assets/css/galette-main.bundle.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./themes/default/ui/semantic.min.css"
/>
<link
rel=
"shortcut icon"
href=
"./themes/default/images/favicon.png"
/>
</head>
<body>
<div
class=
"container"
>
<div
class=
"ui basic center aligned fitted segment"
>
<img
class=
"icon"
src=
"themes/default/images/galette.png"
/>
</div>
<h1
class=
"ui block center aligned header"
>
Compatibility tests
</h1>
<?php
if
(
!
$phpok
||
!
$cm
->
isValid
()
)
{
echo
'<h2 class="ui red message center aligned">Something is wrong :(</h2>'
;
}
else
{
echo
'<p class="ui green message center aligned">Everything is OK :)</p>'
;
}
?>
<div>
<ul
class=
"leaders"
>
<li>
<span>
PHP
<strong
class=
"
<?php
echo
(
$phpok
)
?
'Ok'
:
'Missing'
;
?>
"
>
<?php
echo
PHP_VERSION
;
?>
</strong></span>
<span><i
class=
"ui
<?php
echo
(
$phpok
)
?
'green check'
:
'red times'
;
?>
icon"
></i></span>
</li>
<?php
echo
$cm
->
toHtml
(
false
);
?>
</ul>
</div>
<body
class=
"pushable"
>
<div
class=
"pusher"
>
<div
id=
"main"
class=
"ui container"
>
<div
class=
"ui basic segment"
>
<div
class=
"ui basic center aligned fitted segment"
>
<img
class=
"icon"
alt=
"[ Galette ]"
src=
"./themes/default/images/galette.png"
/>
</div>
<h1
class=
"ui block center aligned header"
>
Compatibility tests
</h1>
<div
class=
"ui segment"
>
<div
id=
"main"
class=
"text ui container"
>
<?php
if
(
!
$phpok
||
!
$cm
->
isValid
()
)
{
echo
'<p class="ui red center aligned message">Something is wrong :(</p>'
;
}
else
{
echo
'<p class="ui green center aligned message">Everything is OK :)</p>'
;
}
?>
<ul
class=
"leaders"
>
<li>
<span>
PHP
<strong
class=
"
<?php
echo
(
$phpok
)
?
'Ok'
:
'Missing'
;
?>
"
>
<?php
echo
PHP_VERSION
;
?>
</strong></span>
<span><i
class=
"ui
<?php
echo
(
$phpok
)
?
'green check'
:
'red times'
;
?>
icon"
></i></span>
</li>
<?php
echo
$cm
->
toHtml
(
false
);
?>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
galette/webroot/installer.php
View file @
9547a724
...
...
@@ -215,19 +215,14 @@ header('Content-Type: text/html; charset=UTF-8');
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./assets/css/galette-main.bundle.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./themes/default/ui/semantic.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./themes/default/install.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./assets/ui/semantic.min.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./themes/default/galette-ng.css"
/>
<script
type=
"text/javascript"
src=
"./assets/js/galette-main.bundle.min.js"
></script>
<script
type=
"text/javascript"
src=
"./assets/ui/semantic.min.js"
></script>
<script
type=
"text/javascript"
src=
"./js/common-ng.js"
></script>
<link
rel=
"shortcut icon"
href=
"./themes/default/images/favicon.png"
/>
</head>
<body
class=
"pushable"
>
<header
id=
"top-navbar"
class=
"ui fixed menu bgcolor"
>
<div
class=
"ui container"
>
<div
class=
"header item"
>
<!-- <img src="/logo" width="129" height="60" alt="[ Galette ]" class="logo" /> -->
<span>
<?php
echo
_T
(
"Galette installation"
)
?>
</span>
</div>
<div
class=
"language ui dropdown right item"
>
...
...
@@ -249,6 +244,12 @@ foreach ($i18n->getList() as $langue) {
<div
class=
"pusher"
>
<div
id=
"main"
class=
"ui container"
>
<div
class=
"ui basic segment"
>
<div
class=
"ui basic center aligned fitted segment"
>
<img
class=
"icon"
alt=
"[ Galette ]"
src=
"./themes/default/images/galette.png"
/>
</div>
<h1
class=
"ui block center aligned header"
>
<?php
echo
$install
->
getStepTitle
();
?>
</h1>
<?php
if
(
count
(
$error_detected
)
>
0
)
{
?>
...
...
@@ -267,9 +268,6 @@ if (count($error_detected) > 0) {
<?php
}
?>
<h1
class=
"ui block center aligned header"
>
<?php
echo
$install
->
getStepTitle
();
?>
</h1>
<?php
if
(
$install
->
isCheckStep
())
{
include_once
__DIR__
.
'/../install/steps/check.php'
;
...
...
@@ -399,6 +397,8 @@ if (!$install->isUpgrade()) {
</div>
</footer>
</div>
<script
type=
"text/javascript"
src=
"./assets/js/galette-main.bundle.min.js"
></script>
<script
type=
"text/javascript"
src=
"./themes/default/ui/semantic.min.js"
></script>
</body>
</html>
<?php
...
...
tests/Galette/Core/tests/units/Picture.php
View file @
9547a724
...
...
@@ -155,7 +155,7 @@ class Picture extends atoum
$this
->
variable
(
$url
)
->
isNotFalse
();
$this
->
variable
(
$this
->
picture
->
getMimeType
(
$url
))
->
isIdenticalTo
(
'image/png'
);
$url
=
realpath
(
GALETTE_ROOT
.
'../
galette/webroot/themes/default/image
s/test.gif'
);
$url
=
realpath
(
GALETTE_ROOT
.
'../
test
s/test.gif'
);
$this
->
variable
(
$url
)
->
isNotFalse
();
$this
->
variable
(
$this
->
picture
->
getMimeType
(
$url
))
->
isIdenticalTo
(
'image/gif'
);
...
...
Write
Preview
Supports
Markdown
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