summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/data.attachment.php4
-rwxr-xr-xplugins/data.code.php9
-rwxr-xr-xplugins/data.creationtime.php4
-rwxr-xr-xplugins/data.div.php3
-rwxr-xr-xplugins/data.img.php4
5 files changed, 18 insertions, 6 deletions
diff --git a/plugins/data.attachment.php b/plugins/data.attachment.php
index b3fcc68..5ba05e6 100755
--- a/plugins/data.attachment.php
+++ b/plugins/data.attachment.php
@@ -1,7 +1,9 @@
<?php
-namespace Bitweaver;
+namespace Bitweaver\Liberty;
+use Bitweaver\BitBase;
+use Bitweaver\KernelTools;
use Bitweaver\Liberty\LibertyBase;
use Bitweaver\Liberty\LibertyContent;
use Bitweaver\Wiki\BitPage;
diff --git a/plugins/data.code.php b/plugins/data.code.php
index 3cf90dd..6827977 100755
--- a/plugins/data.code.php
+++ b/plugins/data.code.php
@@ -1,6 +1,8 @@
<?php
-namespace Bitweaver;
+namespace Bitweaver\Liberty;
+
+use Bitweaver\KernelTools;
/**
* @version $Revision$
@@ -261,7 +263,10 @@ function data_code( $pData, $pParams ) { // Pre-Clyde Changes
break;
}
- $code = "<pre>$code</pre>";
+ // highlight_string() already wraps in <pre><code> in PHP 8.x
+ if( strpos( $code, '<pre>' ) === false ) {
+ $code = "<pre>$code</pre>";
+ }
}
return ( !empty( $title ) ? '<p class="codetitle">'.$title.'</p>' : "" )."<div class='codelisting'>".$code."</div>";
diff --git a/plugins/data.creationtime.php b/plugins/data.creationtime.php
index ea3a848..4019888 100755
--- a/plugins/data.creationtime.php
+++ b/plugins/data.creationtime.php
@@ -1,6 +1,8 @@
<?php
-namespace Bitweaver;
+namespace Bitweaver\Liberty;
+
+use Bitweaver\KernelTools;
/**
* @version $Revision$
diff --git a/plugins/data.div.php b/plugins/data.div.php
index 5c57c67..828eecf 100755
--- a/plugins/data.div.php
+++ b/plugins/data.div.php
@@ -1,7 +1,8 @@
<?php
-namespace Bitweaver;
+namespace Bitweaver\Liberty;
+use Bitweaver\KernelTools;
use Bitweaver\Liberty\LibertyContent;
/**
diff --git a/plugins/data.img.php b/plugins/data.img.php
index 8e41af6..32008b5 100755
--- a/plugins/data.img.php
+++ b/plugins/data.img.php
@@ -1,6 +1,8 @@
<?php
-namespace Bitweaver;
+namespace Bitweaver\Liberty;
+
+use Bitweaver\KernelTools;
/**
* @version $Revision$