summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xedit_book.php5
-rwxr-xr-xincludes/plugins_lib.php11
-rwxr-xr-xpage_history.php2
-rwxr-xr-xtemplates/page_history.tpl2
4 files changed, 11 insertions, 9 deletions
diff --git a/edit_book.php b/edit_book.php
index 081f8bf..945e9cf 100755
--- a/edit_book.php
+++ b/edit_book.php
@@ -15,6 +15,7 @@
*/
require_once '../kernel/includes/setup_inc.php';
use \Bitweaver\BitBase;
+use \Bitweaver\KernelTools;
use \Bitweaver\Liberty\LibertyStructure;
use \Bitweaver\Wiki\BitBook;
use \Bitweaver\Wiki\BitPage;
@@ -70,7 +71,7 @@ if( $gContent->isValid() ){
if( isset($_REQUEST["createstructure"]) ) {
if ((empty($_REQUEST['name']))) {
- $gBitSmarty->assign('msg', tra("You must specify a name."));
+ $gBitSmarty->assign('msg', KernelTools::tra"You must specify a name."));
$gBitSystem->display( 'error.tpl' , null, array( 'display_mode' => 'edit' ));
die;
}
@@ -94,7 +95,7 @@ if( isset($_REQUEST["createstructure"]) ) {
$structure_id = $gStructure->storeNode( $structureHash );
//Cannot create a structure if a structure already exists
if (!isset($structure_id)) {
- $gBitSmarty->assign('msg', $_REQUEST['name'] . " " . tra("page not added (Exists)"));
+ $gBitSmarty->assign('msg', $_REQUEST['name'] . " " . KernelTools::tra"page not added (Exists)"));
$gBitSystem->display( 'error.tpl' , null, array( 'display_mode' => 'edit' ));
die;
}
diff --git a/includes/plugins_lib.php b/includes/plugins_lib.php
index cc8eafe..12fde9f 100755
--- a/includes/plugins_lib.php
+++ b/includes/plugins_lib.php
@@ -29,7 +29,8 @@
*/
namespace Bitweaver\Wiki;
-
+ use Bitweaver\KernelTools;
+
class PluginsLib extends \Bitweaver\BitBase {
public $_errors;
public $_data;
@@ -115,7 +116,7 @@
* @return string
*/
function getVersion() {
- return tra("No version indicated");
+ return KernelTools::tra("No version indicated");
//return preg_replace("/[Revision: $]/", '',
// "\$Revision$");
}
@@ -140,7 +141,7 @@
return $this->error("PluginsLib::run: pure virtual function. Don't be so lazy!");
}
function error ($message) {
- return "~np~<span class='warn'>Plugin ".$this->getName()." ".tra("failed")." : ".tra($message)."</span>~/np~";
+ return "~np~<span class='warn'>Plugin ".$this->getName()." ".KernelTools::tra("failed")." : ".tra($message)."</span>~/np~";
}
function getErrorDetail() {
return $this->_errors;
@@ -181,9 +182,9 @@
$iNumCol=count($aInfo)+1;
$sStyle=" style='width:".(floor(100/$iNumCol))."%' ";
// Header for info
- $sOutput .= "<table class='normal'><tr><td class='heading' $sStyle>".tra($aPrincipalField["name"])."</td>";
+ $sOutput .= "<table class='normal'><tr><td class='heading' $sStyle>".KernelTools::tra($aPrincipalField["name"])."</td>";
foreach($aInfo as $iInfo => $sHeader) {
- $sOutput .= "<td class='heading' $sStyle >".tra($sHeader)."</td>";
+ $sOutput .= "<td class='heading' $sStyle >".KernelTools::tra($sHeader)."</td>";
}
$sOutput .= "</tr>";
}
diff --git a/page_history.php b/page_history.php
index add60d5..1fc012a 100755
--- a/page_history.php
+++ b/page_history.php
@@ -55,5 +55,5 @@ $gBitSmarty->assign( 'listInfo', $history['listInfo'] );
// Display the template
$gBitSmarty->assign( 'gContent', $gContent );
-$gBitSystem->display( 'bitpackage:wiki/page_history.tpl' , null, array( 'display_mode' => 'display' ));
+$gBitSystem->display( 'bitpackage:wiki/page_history.tpl' , null, [ 'display_mode' => 'display' ]);
diff --git a/templates/page_history.tpl b/templates/page_history.tpl
index 8590e25..ee3a480 100755
--- a/templates/page_history.tpl
+++ b/templates/page_history.tpl
@@ -9,7 +9,7 @@
<h2>{tr}Version{/tr} {$version}</h2>
{/if}
- {if $smarty.request.preview}
+ {if $smarty.request.preview ?? false}
{include file="bitpackage:wiki/show_page.tpl"}
{/if}