From 1599a338e5afcc9cb54d4158d62339bfdf8e852e Mon Sep 17 00:00:00 2001
From: genuineparts
Date: Sun, 22 Jun 2025 22:26:19 +0200
Subject: [PATCH] Updates and cleanup
---
core/init_core.inc.php | 2 +-
inc/cache.class.php | 26 ++++++++++++----------
inc/config.inc.php | 4 ----
inc/core.class.php | 2 +-
inc/datacache.class.php | 10 ++++-----
inc/lang.class.php | 17 ++++++++-------
inc/sessions.class.php | 12 +++++-----
modules/contact/contact.output.php | 2 +-
modules/news/news.plugins.php | 2 +-
modules/text/text.ajax.php | 2 +-
modules/text/text.output.php | 2 +-
nav_modules/nav_ads.php | 2 +-
nav_modules/nav_lastpost.php | 2 +-
nav_modules/nav_login.php | 2 +-
nav_modules/nav_search.php | 2 +-
nav_modules/nav_stats.php | 2 +-
nav_modules/nav_twitter.php | 27 -----------------------
themes/default/footer.tpl | 2 +-
themes/default/header.tpl | 35 +++++++++++++++---------------
19 files changed, 65 insertions(+), 90 deletions(-)
delete mode 100644 nav_modules/nav_twitter.php
diff --git a/core/init_core.inc.php b/core/init_core.inc.php
index d0e56cf..e421c88 100644
--- a/core/init_core.inc.php
+++ b/core/init_core.inc.php
@@ -25,7 +25,7 @@
* @version $Id$
*/
-const in_astat = true;
+const INBCWE = true;
function getTime(): string
{
diff --git a/inc/cache.class.php b/inc/cache.class.php
index 0a2c7e1..b601fdb 100644
--- a/inc/cache.class.php
+++ b/inc/cache.class.php
@@ -1,6 +1,8 @@
- * @package beFramed Core
+ * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
-*/
+ */
/*
Already defined by PHP. I'll leave it here for Info
define("LOG_EMERG", 0);
@@ -34,8 +36,7 @@ define("LOG_WARNING", 4);
define("LOG_INFO", 6);
define("LOG_DEBUG", 7);
*/
-$module["cache"]["name"]="Cache Class";
-$module["cache"]["ver"]="0.9.10";
+
class cache {
var $server;
var $prefix;
@@ -85,12 +86,15 @@ class cache {
$this->obj->quit();
}
- function set($key,$var,$expiration=null){
- if($expriation=null){
- $expriation=$this->exp;
+ function set($key,$var,$exp=null): void
+ {
+ if($exp==null){
+ $expiration = $this->exp;
+ }else{
+ $expiration = $exp;
}
$this->obj->set($this->prefix.$key,$var,$expiration);
- }
+ }
function get($key){
diff --git a/inc/config.inc.php b/inc/config.inc.php
index 630a073..8cb6477 100644
--- a/inc/config.inc.php
+++ b/inc/config.inc.php
@@ -33,10 +33,6 @@ $config["db"] = "bcWe";
$config["prefix"]="bcwe_";
// your Database Sytem
$config["db_class"]="mysqli";
-$config['MEMCACHE_SERVER'] = '127.0.0.1';
-$config['MEMCACHE_PORT'] = '11211';
-$config['MEMCACHE_PREFIX'] = 'bcWe';
-$config['MEMCACHE_EXPIRATION'] = '50000';
define('INSTALLED', FALSE);
define("CHARSET", "UTF-8");
diff --git a/inc/core.class.php b/inc/core.class.php
index 9a8174d..85249e2 100644
--- a/inc/core.class.php
+++ b/inc/core.class.php
@@ -26,7 +26,7 @@
*/
$module['core']['name']='Core Class';
-$module['core']['ver']='0.9.9';
+$module['core']['ver']='1.0.0';
class Core{
diff --git a/inc/datacache.class.php b/inc/datacache.class.php
index 0d1ea7f..ff4a3d2 100644
--- a/inc/datacache.class.php
+++ b/inc/datacache.class.php
@@ -2,7 +2,7 @@
$module["datacache"]["name"]="Datacache Module";
$module["datacache"]["ver"]="0.1.0";
/**
- * Project: astat - simple site engine
+ * Project: BeCast WebEngine - simple site engine
* File: /inc/datacache.class.php
*
* This library is free software; you can redistribute it and/or
@@ -19,13 +19,13 @@ $module["datacache"]["ver"]="0.1.0";
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * @link http://www.astat.org SVN: $URL$
- * @copyright 2010 becast.at
+ * @link http://www.becast.at
+ * @copyright 2009-2025 becast.at
* @author Bernhard Jaud
- * @package astat core
+ * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
-*/
+ */
class datacache {
var $data = array();
diff --git a/inc/lang.class.php b/inc/lang.class.php
index ed285b8..8929a00 100644
--- a/inc/lang.class.php
+++ b/inc/lang.class.php
@@ -1,7 +1,9 @@
- * @package astat core
+ * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
-*/
-$module["lang"]["name"]="Language Class";
-$module["lang"]["ver"]="0.1.1";
+ */
+
class lang{
var $langname=array('de'=>'Deutsch','en'=>'English');
diff --git a/inc/sessions.class.php b/inc/sessions.class.php
index 5007e58..9fa2ff2 100644
--- a/inc/sessions.class.php
+++ b/inc/sessions.class.php
@@ -1,8 +1,8 @@
- * @package astat core
+ * @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
-*/
+ */
class session {
var $sid = 0;
diff --git a/modules/contact/contact.output.php b/modules/contact/contact.output.php
index c38d328..f3c1f82 100644
--- a/modules/contact/contact.output.php
+++ b/modules/contact/contact.output.php
@@ -24,7 +24,7 @@
* @version $Id$
*/
-If (!defined("in_astat")) {
+If (!defined(INBCWE)) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("Contactform", FALSE);
diff --git a/modules/news/news.plugins.php b/modules/news/news.plugins.php
index 527b95e..fdd364b 100644
--- a/modules/news/news.plugins.php
+++ b/modules/news/news.plugins.php
@@ -1,5 +1,5 @@
assign('navtitle', "Suche");
diff --git a/nav_modules/nav_stats.php b/nav_modules/nav_stats.php
index 8e5d1f0..c17e181 100644
--- a/nav_modules/nav_stats.php
+++ b/nav_modules/nav_stats.php
@@ -1,5 +1,5 @@
load(Twitter::ME,5);
-foreach ($channel as $status){
- $stat['screenname'] = $status->user->screen_name;
- $stat['image'] = htmlspecialchars($status->user->profile_image_url);
- $stat['user'] = htmlspecialchars($status->user->name);
- $stat['text'] = Twitter::clickable($status);
- $stat['date'] = date("d.m.Y H:i",strtotime($status->created_at));
- $stats[]=$stat;
-}
-
-}catch(Exception $e){
- $stats="Twitter down :,(";
-}
-
-$navtpl-> assign("status",$stats);
-
-$navrow .= $navtpl->fetch('nav_twitter.tpl');
-
-?>
diff --git a/themes/default/footer.tpl b/themes/default/footer.tpl
index 87a64c6..4dba07d 100644
--- a/themes/default/footer.tpl
+++ b/themes/default/footer.tpl
@@ -1,4 +1,4 @@
-
+
{literal}
-

-
-
-
diff --git a/themes/default/header.tpl b/themes/default/header.tpl
index 72853b9..9767c5c 100644
--- a/themes/default/header.tpl
+++ b/themes/default/header.tpl
@@ -1,15 +1,15 @@
-
-
-