Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
678b9cb3
Commit
678b9cb3
authored
11 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Fixup variables for custom list properties
parent
30e7d721
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/class.dynamic_forms.php
+13
-2
13 additions, 2 deletions
include/class.dynamic_forms.php
include/class.ticket.php
+1
-1
1 addition, 1 deletion
include/class.ticket.php
with
14 additions
and
3 deletions
include/class.dynamic_forms.php
+
13
−
2
View file @
678b9cb3
...
...
@@ -765,7 +765,13 @@ class DynamicFormEntryAnswer extends VerySimpleModel {
}
function
asVar
()
{
return
$this
->
toString
();
return
(
is_object
(
$this
->
getValue
()))
?
$this
->
getValue
()
:
$this
->
toString
();
}
function
getVar
(
$tag
)
{
if
(
is_object
(
$this
->
getValue
())
&&
method_exists
(
$this
->
getValue
(),
'getVar'
))
return
$this
->
getValue
()
->
getVar
(
$tag
);
}
function
__toString
()
{
...
...
@@ -938,8 +944,9 @@ class DynamicListItem extends VerySimpleModel {
function
getVar
(
$name
)
{
$config
=
$this
->
getConfiguration
();
$name
=
mb_strtolower
(
$name
);
foreach
(
$this
->
getConfigurationForm
()
->
getFields
()
as
$field
)
{
if
(
strcasecmp
(
$field
->
get
(
'name'
)
,
$name
)
===
0
)
if
(
mb_strtolower
(
$field
->
get
(
'name'
)
)
==
$name
)
return
$config
[
$field
->
get
(
'id'
)];
}
}
...
...
@@ -948,6 +955,10 @@ class DynamicListItem extends VerySimpleModel {
return
$this
->
get
(
'value'
);
}
function
__toString
()
{
return
$this
->
toString
();
}
function
delete
()
{
# Don't really delete, just unset the list_id to un-associate it with
# the list
...
...
This diff is collapsed.
Click to expand it.
include/class.ticket.php
+
1
−
1
View file @
678b9cb3
...
...
@@ -1278,7 +1278,7 @@ class Ticket {
// The answer object is retrieved here which will
// automatically invoke the toString() method when the
// answer is coerced into text
return
(
string
)
$this
->
_answers
[
$tag
];
return
$this
->
_answers
[
$tag
];
}
return
false
;
...
...
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