Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
Dwoo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Common
Dwoo
Commits
1290d87d
Commit
1290d87d
authored
May 06, 2008
by
Seldaek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
svn://dwoo.org/dwoo/trunk@46
0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent
ecad8099
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
Dwoo.php
lib/Dwoo.php
+12
-6
Compiler.php
lib/Dwoo/Compiler.php
+1
-1
No files found.
lib/Dwoo.php
View file @
1290d87d
...
...
@@ -1507,17 +1507,23 @@ class Dwoo_Loader
* loads a plugin file
*
* @param string $class the plugin name, without the Dwoo_Plugin_ prefix
* @param bool $forceRehash if true, the class path caches will be rebuilt if the plugin is not found, in case it has just been added, defaults to true
*/
public
static
function
loadPlugin
(
$class
)
public
static
function
loadPlugin
(
$class
,
$forceRehash
=
true
)
{
// a new class was added or the include failed so we rebuild the cache
if
(
!
isset
(
self
::
$classpath
[
$class
])
||
!
include
self
::
$classpath
[
$class
])
{
self
::
rebuildClassPathCache
(
DWOO_DIRECTORY
.
'plugins'
,
DWOO_COMPILE_DIRECTORY
.
DIRECTORY_SEPARATOR
.
'classpath.cache.php'
);
foreach
(
self
::
$paths
as
$path
=>
$file
)
self
::
rebuildClassPathCache
(
$path
,
$file
);
if
(
isset
(
self
::
$classpath
[
$class
]))
include
self
::
$classpath
[
$class
];
if
(
$forceRehash
)
{
self
::
rebuildClassPathCache
(
DWOO_DIRECTORY
.
'plugins'
,
DWOO_COMPILE_DIRECTORY
.
DIRECTORY_SEPARATOR
.
'classpath.cache.php'
);
foreach
(
self
::
$paths
as
$path
=>
$file
)
self
::
rebuildClassPathCache
(
$path
,
$file
);
if
(
isset
(
self
::
$classpath
[
$class
]))
include
self
::
$classpath
[
$class
];
else
throw
new
Dwoo_Exception
(
'Plugin <em>'
.
$class
.
'</em> can not be found, maybe you forgot to bind it if it\'s a custom plugin ?'
,
E_USER_NOTICE
);
}
else
throw
new
Dwoo_Exception
(
'Plugin <em>'
.
$class
.
'</em> can not be found, maybe you forgot to bind it if it\'s a custom plugin ?'
,
E_USER_NOTICE
);
}
...
...
lib/Dwoo/Compiler.php
View file @
1290d87d
...
...
@@ -2293,7 +2293,7 @@ class Dwoo_Compiler implements Dwoo_ICompiler
if
(
$pluginType
===-
1
)
{
try
{
Dwoo_Loader
::
loadPlugin
(
$name
);
Dwoo_Loader
::
loadPlugin
(
$name
,
isset
(
$phpFunc
)
===
false
);
}
catch
(
Exception
$e
)
{
if
(
isset
(
$phpFunc
))
$pluginType
=
Dwoo
::
NATIVE_PLUGIN
;
...
...
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