Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
bba52b0c
Commit
bba52b0c
authored
Dec 06, 2006
by
Richard Mansfield
Browse files
Function to get a list of quoted js strings
parent
1b0f768d
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/web.php
View file @
bba52b0c
...
...
@@ -148,6 +148,11 @@ function &smarty($javascript = array(), $headers = array(), $strings = array())
return
$smarty
;
}
/**
* Returns the lists of strings used in the .js files
* @return array
*/
function
jsstrings
()
{
return
array
(
'mahara'
=>
array
(
...
...
@@ -167,6 +172,20 @@ function jsstrings() {
);
}
/**
* Takes an array of string identifiers and returns an array of the
* corresponding strings, quoted for use in inline javascript here
* docs.
*/
function
quotestrings
(
$stringids
,
$section
=
'mahara'
)
{
$getstring
=
array
();
foreach
(
$stringids
as
$string
)
{
$getstring
[
$string
]
=
"'"
.
get_string
(
$string
,
$section
)
.
"'"
;
}
return
$getstring
;
}
/**
* This function sets up and caches info about the current selected theme
* contains inheritance path (used for locating images) and template dirs
...
...
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