Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
mapas
MapasBR - PA
Commits
2cc36233
Commit
2cc36233
authored
Oct 06, 2020
by
Uragawa
Browse files
adiciona AldirBlancRedirects como submodule
parent
f598bdf9
Pipeline
#9823
passed with stages
in 45 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
39 deletions
+4
-39
.gitmodules
.gitmodules
+3
-0
plugins/AldirBlancRedirects
plugins/AldirBlancRedirects
+1
-0
plugins/AldirBlancRedirects/Plugin.php
plugins/AldirBlancRedirects/Plugin.php
+0
-39
No files found.
.gitmodules
View file @
2cc36233
...
@@ -4,3 +4,6 @@
...
@@ -4,3 +4,6 @@
[submodule "plugins/MultipleLocalAuth"]
[submodule "plugins/MultipleLocalAuth"]
path = plugins/MultipleLocalAuth
path = plugins/MultipleLocalAuth
url = https://github.com/mapasculturais/plugin-MultipleLocalAuth
url = https://github.com/mapasculturais/plugin-MultipleLocalAuth
[submodule "plugins/AldirBlancRedirects"]
path = plugins/AldirBlancRedirects
url = https://github.com/mapasculturais/plugin-AldirBlancRedirects
AldirBlancRedirects
@
5dfe5f8b
Subproject commit 5dfe5f8bcf0755ddad01c2afe4d7b5e0ca9a6afa
plugins/AldirBlancRedirects/Plugin.php
deleted
100644 → 0
View file @
f598bdf9
<?php
namespace
AldirBlancRedirects
;
use
MapasCulturais\App
;
class
Plugin
extends
\
MapasCulturais\Plugin
{
public
function
_init
()
{
// enqueue scripts and styles
// add hooks
}
public
function
register
()
{
$app
=
App
::
i
();
$app
->
_config
[
'routes'
][
'default_controller_id'
]
=
'aldirblanc'
;
$config
=
$this
->
config
;
$app
->
hook
(
'GET(<<*>>):before'
,
function
()
use
(
$app
,
$config
)
{
$enabled_routes
=
[
[
'site'
,
'address_by_postalcode'
]
];
if
(
in_array
([
$this
->
id
,
$this
->
action
],
$enabled_routes
))
{
return
;
}
if
(
!
in_array
(
$this
->
id
,
[
'aldirblanc'
,
'auth'
])){
if
(
!
$config
[
'condition'
]()){
$app
->
redirect
(
$app
->
createUrl
(
'aldirblanc'
,
'index'
));
}
}
});
if
(
!
isset
(
$_SESSION
[
'mapasculturais.auth.redirect_path'
])
){
$_SESSION
[
'mapasculturais.auth.redirect_path'
]
=
$app
->
createUrl
(
'aldirblanc'
,
'cadastro'
);
}
$app
->
hook
(
'controller(auth).render(<<*>>)'
,
function
()
{
$this
->
layout
=
'aldirblanc'
;
},
-
1
);
}
}
\ No newline at end of file
Everaldo Matias
@everaldo.matias
mentioned in issue
#27 (closed)
·
Oct 06, 2020
mentioned in issue
#27 (closed)
mentioned in issue #27
Toggle commit list
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