Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Yehor Tsyba
/
cooking-website
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
05934bbd
authored
Apr 22, 2020
by
Yehor Tsyba
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
=Moved session library higher to remove warning
parent
e4f836f9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
application/controllers/Pages.php
application/controllers/User.php
application/controllers/Pages.php
View file @
05934bbd
...
...
@@ -10,6 +10,8 @@ class Pages extends CI_Controller {
// Whoops, we don't have a page for that!
show_404
();
}
$this
->
load
->
library
(
'session'
);
if
(
!
$this
->
session
->
userdata
(
'logged_in'
)
&&
in_array
(
$page
,
$this
->
private_pages
))
{
redirect
(
'pages/view/home'
);
}
else
if
(
$this
->
session
->
userdata
(
'logged_in'
)
&&
in_array
(
$page
,
$this
->
restrict_pages
))
{
...
...
@@ -17,7 +19,6 @@ class Pages extends CI_Controller {
}
$data
[
'title'
]
=
ucfirst
(
$page
);
// Capitalize the first letter
$data
[
'db'
]
=
$this
->
load
->
database
();
$this
->
load
->
library
(
'session'
);
$this
->
load
->
view
(
'templates/header'
,
$data
);
$this
->
load
->
view
(
'pages/'
.
$page
,
$data
);
$this
->
load
->
view
(
'templates/footer'
,
$data
);
...
...
application/controllers/User.php
View file @
05934bbd
...
...
@@ -10,7 +10,6 @@
$this
->
load
->
view
(
'pages/view/profile'
);
return
;
}
$this
->
load
->
library
(
'form_validation'
);
$this
->
load
->
library
(
'session'
);
...
...
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