Improved global variables definition in php files.
This commit is contained in:
parent
ece2374328
commit
4996dd014a
3 changed files with 11 additions and 11 deletions
|
@ -9,16 +9,16 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'csrfToken' : <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'availableProviders': <?php echo json_encode($available_providers); ?>,
|
||||
'availableServices' : <?php echo json_encode($available_services); ?>,
|
||||
'dateFormat' : <?php echo json_encode($date_format); ?>,
|
||||
'baseUrl' : <?php echo '"' . $base_url . '"'; ?>,
|
||||
'baseUrl' : <?php echo json_encode($base_url); ?>,
|
||||
'customers' : <?php echo json_encode($customers); ?>,
|
||||
'user' : {
|
||||
'id' : <?php echo $user_id; ?>,
|
||||
'email' : <?php echo '"' . $user_email . '"'; ?>,
|
||||
'role_slug' : <?php echo '"' . $role_slug . '"'; ?>,
|
||||
'email' : <?php echo json_encode($user_email); ?>,
|
||||
'role_slug' : <?php echo json_encode($role_slug); ?>,
|
||||
'privileges': <?php echo json_encode($privileges); ?>
|
||||
}
|
||||
};
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken' : <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'baseUrl' : <?php echo '"' . $base_url . '"'; ?>,
|
||||
'baseUrl' : <?php echo json_encode($base_url); ?>,
|
||||
'dateFormat' : <?php echo json_encode($date_format); ?>,
|
||||
'services' : <?php echo json_encode($services); ?>,
|
||||
'categories' : <?php echo json_encode($categories); ?>,
|
||||
'user' : {
|
||||
'id' : <?php echo $user_id; ?>,
|
||||
'email' : <?php echo '"' . $user_email . '"'; ?>,
|
||||
'role_slug' : <?php echo '"' . $role_slug . '"'; ?>,
|
||||
'email' : <?php echo json_encode($user_email); ?>,
|
||||
'role_slug' : <?php echo json_encode($role_slug); ?>,
|
||||
'privileges': <?php echo json_encode($privileges); ?>
|
||||
}
|
||||
};
|
||||
|
|
|
@ -14,17 +14,17 @@
|
|||
<script type="text/javascript">
|
||||
var GlobalVariables = {
|
||||
'csrfToken' : <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
||||
'baseUrl' : <?php echo '"' . $base_url . '"'; ?>,
|
||||
'baseUrl' : <?php echo json_encode($base_url); ?>,
|
||||
'dateFormat' : <?php echo json_encode($date_format); ?>,
|
||||
'userSlug' : <?php echo '"' . $role_slug . '"'; ?>,
|
||||
'userSlug' : <?php echo json_encode($role_slug); ?>,
|
||||
'settings' : {
|
||||
'system' : <?php echo json_encode($system_settings); ?>,
|
||||
'user' : <?php echo json_encode($user_settings); ?>
|
||||
},
|
||||
'user' : {
|
||||
'id' : <?php echo $user_id; ?>,
|
||||
'email' : <?php echo '"' . $user_email . '"'; ?>,
|
||||
'role_slug' : <?php echo '"' . $role_slug . '"'; ?>,
|
||||
'email' : <?php echo json_encode($user_email); ?>,
|
||||
'role_slug' : <?php echo json_encode($role_slug); ?>,
|
||||
'privileges': <?php echo json_encode($privileges); ?>
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue