summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-16 13:43:47 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-16 13:43:47 +0100
commit80e5e4ba2faea909753fcae960e752797e912dc0 (patch)
treea8cb3a8bc0881cc4e8d15112b9211c77d2bc9251
parent5d332df4b29a25124fa4f67a0915e7f65b0edd1d (diff)
downloadliberty-80e5e4ba2faea909753fcae960e752797e912dc0.tar.gz
liberty-80e5e4ba2faea909753fcae960e752797e912dc0.tar.bz2
liberty-80e5e4ba2faea909753fcae960e752797e912dc0.zip
Move plugins to correct namespace
-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$