Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-qtype_stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
7bb0e61d
Commit
7bb0e61d
authored
1 year ago
by
Anupama Sarjoshi
Browse files
Options
Downloads
Patches
Plain Diff
Add trim to fix filename path returned by zip::getNameIndex function
parent
ea3c6edd
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
stack/cas/connector.server.class.php
+2
-1
2 additions, 1 deletion
stack/cas/connector.server.class.php
stack/cas/connector.server_proxy.class.php
+2
-1
2 additions, 1 deletion
stack/cas/connector.server_proxy.class.php
with
4 additions
and
2 deletions
stack/cas/connector.server.class.php
+
2
−
1
View file @
7bb0e61d
...
@@ -74,7 +74,8 @@ class stack_cas_connection_server extends stack_cas_connection_base {
...
@@ -74,7 +74,8 @@ class stack_cas_connection_server extends stack_cas_connection_base {
$zip
=
new
ZipArchive
();
$zip
=
new
ZipArchive
();
$zip
->
open
(
$ziptemp
);
$zip
->
open
(
$ziptemp
);
for
(
$i
=
0
;
$i
<
$zip
->
numFiles
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
$zip
->
numFiles
;
$i
++
)
{
$filenameinzip
=
$zip
->
getNameIndex
(
$i
);
// In some PHP versions, zip::getNameIndex returns filename with leading '/', hence trim.
$filenameinzip
=
trim
(
$zip
->
getNameIndex
(
$i
),
'/'
);
if
(
$filenameinzip
===
'OUTPUT'
)
{
if
(
$filenameinzip
===
'OUTPUT'
)
{
// This one contains the output from maxima.
// This one contains the output from maxima.
...
...
This diff is collapsed.
Click to expand it.
stack/cas/connector.server_proxy.class.php
+
2
−
1
View file @
7bb0e61d
...
@@ -99,7 +99,8 @@ class stack_cas_connection_server_proxy extends stack_cas_connection_base {
...
@@ -99,7 +99,8 @@ class stack_cas_connection_server_proxy extends stack_cas_connection_base {
$zip
=
new
ZipArchive
();
$zip
=
new
ZipArchive
();
$zip
->
open
(
$ziptemp
);
$zip
->
open
(
$ziptemp
);
for
(
$i
=
0
;
$i
<
$zip
->
numFiles
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
$zip
->
numFiles
;
$i
++
)
{
$filenameinzip
=
$zip
->
getNameIndex
(
$i
);
// In some PHP versions, zip::getNameIndex returns filename with leading '/', hence trim.
$filenameinzip
=
trim
(
$zip
->
getNameIndex
(
$i
),
'/'
);
if
(
$filenameinzip
===
'OUTPUT'
)
{
if
(
$filenameinzip
===
'OUTPUT'
)
{
// This one contains the output from maxima.
// This one contains the output from maxima.
...
...
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