Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
ea39b3f0
Commit
ea39b3f0
authored
May 05, 2011
by
Francois Marier
Committed by
Gerrit Code Review
May 05, 2011
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Replace DIRECTORY_SEPERATOR with / for windows compatability"
parents
1f8a5580
8b0737fd
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
10 deletions
+10
-10
htdocs/artefact/blog/import/leap/lib.php
htdocs/artefact/blog/import/leap/lib.php
+1
-1
htdocs/artefact/file/import/leap/lib.php
htdocs/artefact/file/import/leap/lib.php
+1
-1
htdocs/auth/saml/init.php
htdocs/auth/saml/init.php
+1
-1
htdocs/import/leap/lib.php
htdocs/import/leap/lib.php
+1
-1
htdocs/init.php
htdocs/init.php
+1
-1
htdocs/lib/file.php
htdocs/lib/file.php
+1
-1
htdocs/lib/function.dirsize.php
htdocs/lib/function.dirsize.php
+3
-3
htdocs/lib/web.php
htdocs/lib/web.php
+1
-1
No files found.
htdocs/artefact/blog/import/leap/lib.php
View file @
ea39b3f0
...
...
@@ -231,7 +231,7 @@ class LeapImportBlog extends LeapImportArtefactPlugin {
$importer
->
trace
(
$blogpostlink
);
$pathname
=
urldecode
((
string
)
$blogpostlink
[
'href'
]);
$dir
=
dirname
(
$importer
->
get
(
'filename'
));
$pathname
=
$dir
.
DIRECTORY_SEPARATOR
.
$pathname
;
$pathname
=
$dir
.
'/'
.
$pathname
;
if
(
!
file_exists
(
$pathname
))
{
return
false
;
}
...
...
htdocs/artefact/file/import/leap/lib.php
View file @
ea39b3f0
...
...
@@ -276,7 +276,7 @@ class LeapImportFile extends LeapImportArtefactPlugin {
$data
->
parent
=
$parent
;
}
$pathname
=
$dir
.
DIRECTORY_SEPARATOR
.
$pathname
;
$pathname
=
$dir
.
'/'
.
$pathname
;
// This API sucks, but that's not my problem
if
(
!
$id
=
ArtefactTypeFile
::
save_file
(
$pathname
,
$data
,
$importer
->
get
(
'usrobj'
),
true
))
{
...
...
htdocs/auth/saml/init.php
View file @
ea39b3f0
...
...
@@ -69,7 +69,7 @@ $CFG = (object)array_merge((array)$cfg, (array)$CFG);
// Fix up paths in $CFG
foreach
(
array
(
'docroot'
,
'dataroot'
)
as
$path
)
{
$CFG
->
{
$path
}
=
(
substr
(
$CFG
->
{
$path
},
-
1
)
!=
DIRECTORY_SEPARATOR
)
?
$CFG
->
{
$path
}
.
DIRECTORY_SEPARATOR
:
$CFG
->
{
$path
};
$CFG
->
{
$path
}
=
(
substr
(
$CFG
->
{
$path
},
-
1
)
!=
'/'
)
?
$CFG
->
{
$path
}
.
'/'
:
$CFG
->
{
$path
};
}
// xmldb stuff
...
...
htdocs/import/leap/lib.php
View file @
ea39b3f0
...
...
@@ -1364,7 +1364,7 @@ class PluginImportLeap extends PluginImport {
$this
->
trace
(
$link
);
$pathname
=
urldecode
((
string
)
$link
[
'href'
]);
$dir
=
dirname
(
$this
->
get
(
'filename'
));
$pathname
=
$dir
.
DIRECTORY_SEPARATOR
.
$pathname
;
$pathname
=
$dir
.
'/'
.
$pathname
;
if
(
!
file_exists
(
$pathname
))
{
return
false
;
}
...
...
htdocs/init.php
View file @
ea39b3f0
...
...
@@ -65,7 +65,7 @@ $CFG = (object)array_merge((array)$cfg, (array)$CFG);
// Fix up paths in $CFG
foreach
(
array
(
'docroot'
,
'dataroot'
)
as
$path
)
{
$CFG
->
{
$path
}
=
(
substr
(
$CFG
->
{
$path
},
-
1
)
!=
DIRECTORY_SEPARATOR
)
?
$CFG
->
{
$path
}
.
DIRECTORY_SEPARATOR
:
$CFG
->
{
$path
};
$CFG
->
{
$path
}
=
(
substr
(
$CFG
->
{
$path
},
-
1
)
!=
'/'
)
?
$CFG
->
{
$path
}
.
'/'
:
$CFG
->
{
$path
};
}
// xmldb stuff
...
...
htdocs/lib/file.php
View file @
ea39b3f0
...
...
@@ -720,7 +720,7 @@ function rmdirr($dirname)
}
// Recurse
rmdirr
(
$dirname
.
DIRECTORY_SEPARATOR
.
$entry
);
rmdirr
(
$dirname
.
'/'
.
$entry
);
}
// Clean up
...
...
htdocs/lib/function.dirsize.php
View file @
ea39b3f0
...
...
@@ -15,8 +15,8 @@ function dirsize($path)
$size
=
0
;
// Trailing slash
if
(
substr
(
$path
,
-
1
,
1
)
!==
DIRECTORY_SEPARATOR
)
{
$path
.
=
DIRECTORY_SEPARATOR
;
if
(
substr
(
$path
,
-
1
,
1
)
!==
'/'
)
{
$path
.
=
'/'
;
}
// Sanity check
...
...
@@ -43,7 +43,7 @@ function dirsize($path)
// Get list of directories or filesizes
$path
=
$queue
[
$i
]
.
$entry
;
if
(
is_dir
(
$path
))
{
$path
.
=
DIRECTORY_SEPARATOR
;
$path
.
=
'/'
;
$subdirs
[]
=
$path
;
}
elseif
(
is_file
(
$path
))
{
$size
+=
filesize
(
$path
);
...
...
htdocs/lib/web.php
View file @
ea39b3f0
...
...
@@ -726,7 +726,7 @@ class Theme {
private
function
_get_path
(
$filename
,
$all
,
$plugindirectory
,
$returnprefix
)
{
$list
=
array
();
$plugindirectory
=
(
$plugindirectory
&&
substr
(
$plugindirectory
,
-
1
)
!=
DIRECTORY_SEPARATOR
)
?
$plugindirectory
.
DIRECTORY_SEPARATOR
:
$plugindirectory
;
$plugindirectory
=
(
$plugindirectory
&&
substr
(
$plugindirectory
,
-
1
)
!=
'/'
)
?
$plugindirectory
.
'/'
:
$plugindirectory
;
foreach
(
$this
->
inheritance
as
$themedir
)
{
if
(
is_readable
(
get_config
(
'docroot'
)
.
$plugindirectory
.
'theme/'
.
$themedir
.
'/static/'
.
$filename
))
{
...
...
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