Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
forena
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
forena
Commits
61b510e2
Commit
61b510e2
authored
Feb 2, 2014
by
David Metzler
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug in translations.
parent
66a5b76a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
FrxEditor.inc
+8
-0
8 additions, 0 deletions
FrxEditor.inc
forena.admin.inc
+7
-5
7 additions, 5 deletions
forena.admin.inc
with
15 additions
and
5 deletions
FrxEditor.inc
+
8
−
0
View file @
61b510e2
...
...
@@ -49,6 +49,14 @@ class FrxEditor {
return
$dom
->
saveXML
();
}
// Renames session storage.
public
function
rename
(
$name
)
{
$old_name
=
$this
->
report_name
;
$this
->
report_name
=
$name
;
unset
(
$_SESSION
[
'forena_report_editor'
][
$old_name
]);
$this
->
update
();
}
/**
* Save data away in the session state.
*/
...
...
This diff is collapsed.
Click to expand it.
forena.admin.inc
+
7
−
5
View file @
61b510e2
...
...
@@ -834,7 +834,7 @@ function forena_create_trans_form_submit($form, &$form_state) {
$filename
=
$desc
[
'filename'
];
$report_name
=
$desc
[
'name'
];
$r
=
Frx
::
Editor
(
$
values
[
'report
_name
'
]
);
$r
=
Frx
::
Editor
(
$
base
_name
);
// Title and category
$r
->
setTitle
(
$values
[
'title'
]);
...
...
@@ -845,13 +845,15 @@ function forena_create_trans_form_submit($form, &$form_state) {
drupal_set_message
(
t
(
'Report %s already exists'
,
array
(
'%s'
=>
$new_name
)),
'error'
);
return
;
}
$r
->
update
(
);
else
{
$r
->
rename
(
$new_name
);
drupal_set_message
(
t
(
'Translation, %s has been created. Switch languages to translate.'
,
array
(
'%s'
=>
$values
[
'title'
])));
//if this is a new report then redirect to data blocks
$form_state
[
'redirect'
]
=
array
(
$desc
[
'i_link'
]
.
'/edit/layout'
);
}
//if this is a new report then redirect to data blocks
}
/*
...
...
@@ -1965,7 +1967,7 @@ function forena_report_translations($name_in='') {
foreach
(
$languages
as
$key
=>
$language
)
{
$i_name
=
(
$key
==
'en'
)
?
$name
:
$key
.
'/'
.
$name
;
$i_link
=
$key
.
'.'
.
$name
;
if
(
Frx
::
File
()
->
exists
(
$report_path
.
'/'
.
$i_name
.
'.frx'
))
{
if
(
Frx
::
File
()
->
exists
(
$i_name
.
'.frx'
))
{
$modified
=
format_date
(
filemtime
(
Frx
::
File
()
->
path
(
$i_name
.
'.frx'
)));
$r
=
Frx
::
Editor
(
$i_name
);
$title
=
$r
->
title
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment