Skip to content
GitLab
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
f74aa0b8
Commit
f74aa0b8
authored
Mar 04, 2019
by
Cecilia Vela Gurovic
Committed by
Gerrit Code Review
Mar 04, 2019
Browse files
Merge "Bug 1816840: Adjustments to dwoo library to fix unserialize problem"
parents
86cdf511
9d554c02
Changes
4
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/dwoo/README.Mahara
View file @
f74aa0b8
...
...
@@ -38,3 +38,9 @@ composer dump-autoload -o
Then remove the hashes from the auto-generated /vendor files: E.g.
ComposerAutoloaderInit26e38f1cfb40040c9ff6097c09aee6d7::getLoader();
becomes ComposerAutoloaderInit::getLoader();
Additional changes:
The Dwoo plugin is being unmaintained again so we need also make any
changes committed to their master branch
https://github.com/dwoo-project/dwoo/compare/1.3.7...master
htdocs/lib/dwoo/dwoo/Dwoo/Loader.php
View file @
f74aa0b8
...
...
@@ -71,7 +71,7 @@ class Loader implements ILoader
if
(
file_exists
(
$cacheFile
))
{
$chachedClassPath
=
unserialize
(
file_get_contents
(
$cacheFile
));
$chachedClassPath
=
@
unserialize
(
file_get_contents
(
$cacheFile
));
if
(
is_array
(
$chachedClassPath
))
{
$this
->
classPath
=
$chachedClassPath
+
$this
->
classPath
;
...
...
@@ -180,9 +180,15 @@ class Loader implements ILoader
$cacheFile
=
$this
->
cacheDir
.
'classpath-'
.
substr
(
strtr
(
$pluginDir
,
'/\\:'
.
PATH_SEPARATOR
,
'----'
),
strlen
(
$pluginDir
)
>
80
?
-
80
:
0
)
.
'.d'
.
Core
::
RELEASE_TAG
.
'.php'
;
$this
->
paths
[
$pluginDir
]
=
$cacheFile
;
$chachedClassPath
=
null
;
if
(
file_exists
(
$cacheFile
))
{
$classpath
=
file_get_contents
(
$cacheFile
);
$this
->
classPath
=
unserialize
(
$classpath
)
+
$this
->
classPath
;
$chachedClassPath
=
@
unserialize
(
file_get_contents
(
$cacheFile
));
}
if
(
is_array
(
$chachedClassPath
))
{
$this
->
classPath
=
$chachedClassPath
+
$this
->
classPath
;
}
else
{
$this
->
rebuildClassPathCache
(
$pluginDir
,
$cacheFile
);
}
...
...
htdocs/lib/dwoo/dwoo/Dwoo/Plugins/Blocks/PluginIf.php
View file @
f74aa0b8
...
...
@@ -60,8 +60,7 @@ class PluginIf extends BlockPlugin implements ICompilableBlock, IElseable
{
$p
=
array
();
reset
(
$params
);
while
(
list
(
$k
,
$v
)
=
each
(
$params
))
{
foreach
(
$params
as
$k
=>
$v
)
{
$v
=
(
string
)
$v
;
if
(
substr
(
$v
,
0
,
1
)
===
'"'
||
substr
(
$v
,
0
,
1
)
===
'\''
)
{
$vmod
=
strtolower
(
substr
(
$v
,
1
,
-
1
));
...
...
htdocs/lib/dwoo/dwoo/Dwoo/Plugins/Blocks/PluginTextformat.php
View file @
f74aa0b8
...
...
@@ -92,7 +92,7 @@ class PluginTextformat extends BlockPlugin
"
\r
"
),
"
\n
"
,
$this
->
buffer
));
while
(
list
(
$i
)
=
each
(
$pgs
)
)
{
foreach
(
$pgs
as
$i
=>
$v
)
{
if
(
empty
(
$pgs
[
$i
]))
{
continue
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment