make_tree(0);
$tree->print_tree();
@@ -56,5 +56,5 @@
}
}
- require_once(APPLICATION_PATH . '/footer.php');
+ require_once(BASE_DIR . '/footer.php');
?>
diff --git a/bookmarks/new_bookmark.php b/bookmarks/new_bookmark.php
index c41163f..20ad39d 100644
--- a/bookmarks/new_bookmark.php
+++ b/bookmarks/new_bookmark.php
@@ -17,7 +17,7 @@
$post_childof = set_post_childof();
$post_public = set_post_bool_var('public', false);
- require_once(APPLICATION_PATH . '/folders/folder.php');
+ require_once(BASE_DIR . '/folders/folder.php');
$tree = new Folder();
$query_string = '?expand=' . implode(',', $tree->get_path_to_root($post_childof)) . '&folderid=' . $post_childof;
@@ -108,7 +108,7 @@
// since the favicon is not as important.
///////////////////////////
if ($settings['show_bookmark_icon']) {
- require_once(APPLICATION_PATH . '/favicon.php');
+ require_once(BASE_DIR . '/favicon.php');
$favicon = new Favicon($post_url);
debug_logger(variable:print_r($favicon, true), name:'favicon-object', file:__FILE__, function:__FUNCTION__);
@@ -148,5 +148,5 @@
echo '';
}
}
- require_once(APPLICATION_PATH . '/footer.php');
+ require_once(BASE_DIR . '/footer.php');
?>
\ No newline at end of file
diff --git a/change_password.php b/change_password.php
index 50d7125..ac24556 100644
--- a/change_password.php
+++ b/change_password.php
@@ -1,5 +1,5 @@
diff --git a/config/config.php b/config/config.php
index 6487a9b..bea757a 100644
--- a/config/config.php
+++ b/config/config.php
@@ -4,7 +4,7 @@
die ('No direct access allowed.');
}
- define('APPLICATION_PATH', realpath(dirname(__FILE__, 2))); // Includes the sub-directory.
+ define('BASE_DIR', realpath(dirname(__FILE__, 2))); // Includes the sub-directory.
////////////////////////
// Load Config File ////
@@ -24,8 +24,8 @@
$cfg['domain'] = 's22.us';
$cfg['debug'] = true; // Turns debug logging on or off.
- $cfg['error_log'] = APPLICATION_PATH . '/logs/php_error_log_obm';
- $cfg['debug_log'] = APPLICATION_PATH . '/logs/obm_d-bug.log';
+ $cfg['error_log'] = BASE_DIR . '/logs/php_error_log_obm';
+ $cfg['debug_log'] = BASE_DIR . '/logs/obm_d-bug.log';
$cfg['locale'] = 'en-US';
$cfg['user_agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/124.0.2478.109';
@@ -81,7 +81,7 @@
$cfg['sub_dir'] = '';
if (sub_dir_bool_check()) {
- $cfg['sub_dir'] = '/'. basename(APPLICATION_PATH);
+ $cfg['sub_dir'] = '/'. basename(BASE_DIR);
}
if ($cfg['debug']) {
diff --git a/export.php b/export.php
index 7548c69..39bc407 100644
--- a/export.php
+++ b/export.php
@@ -97,7 +97,7 @@
; height:350px; overflow:auto;">
make_tree(0);
$tree->print_tree();
@@ -127,20 +127,20 @@
tree = new Folder();
$this->tree->folders[0] = ['id' => 0, 'childof' => null, 'name' => $settings['root_folder_name']];
diff --git a/favicon.php b/favicon.php
index 230a9c8..11dc866 100644
--- a/favicon.php
+++ b/favicon.php
@@ -8,7 +8,7 @@
}
require_once(realpath(dirname(__FILE__, 1)) . '/config/config.php');
-include_once(APPLICATION_PATH . '/vendor/simplehtmldom/HtmlWeb.php');
+include_once(BASE_DIR . '/vendor/simplehtmldom/HtmlWeb.php');
use simplehtmldom\HtmlWeb;
class Favicon
@@ -33,14 +33,14 @@ function __construct($url) {
if ($this->favicon_url = $this->get_favicon_url()) {
$this->download_favicon_image();
$this->icon_name = $this->rename_favicon($url . '/'. $this->temp_icon_name);
- $favicon_url_path = APPLICATION_PATH . '/icons/'. $this->icon_name;
+ $favicon_url_path = BASE_DIR . '/icons/'. $this->icon_name;
debug_logger(name:'this->temp_icon_name', variable:$this->temp_icon_name, newline:false, file:__FILE__, function:__FUNCTION__);
debug_logger(name:'this->favicon_url', variable:$this->favicon_url, newline:false, file:__FILE__, function:__FUNCTION__);
debug_logger(name:'this->icon_name', variable:$this->icon_name, newline:false, file:__FILE__, function:__FUNCTION__);
debug_logger(name:'favicon_url_path', variable:$favicon_url_path, file:__FILE__, function:__FUNCTION__);
- $tmp_file = APPLICATION_PATH . '/tmp/'. $this->temp_icon_name;
+ $tmp_file = BASE_DIR . '/tmp/'. $this->temp_icon_name;
[$fav_ext, $ident] = $this->identify_fav($tmp_file);
debug_logger(name:'tmp_file', variable:$tmp_file, newline:false, file:__FILE__, function:__FUNCTION__);
debug_logger(name:'fav_ext', variable:$fav_ext, newline:false, file:__FILE__, function:__FUNCTION__);
@@ -86,7 +86,7 @@ function convert_favicon($tmp_file, $fav_ext, $ident) : string {
$new_name = $this->rename_favicon($this->url);
debug_logger(name:'new_name', variable:$new_name, newline:false, file:__FILE__, function:__FUNCTION__);
- $save_path_name = APPLICATION_PATH . '/icons/'. $new_name;
+ $save_path_name = BASE_DIR . '/icons/'. $new_name;
debug_logger(name:'save_path_name', variable:$save_path_name, newline:false, file:__FILE__, function:__FUNCTION__);
// if (strtolower($fav_ext) === 'svg') {
@@ -137,7 +137,7 @@ function download_favicon_image() {
curl_close($ch);
if (admin_only()) {
- $bytes = file_put_contents(APPLICATION_PATH . '/tmp/'. $this->temp_icon_name, $response);
+ $bytes = file_put_contents(BASE_DIR . '/tmp/'. $this->temp_icon_name, $response);
}
return true;
diff --git a/folders/async_folders.php b/folders/async_folders.php
index f2a6fda..55c6763 100644
--- a/folders/async_folders.php
+++ b/folders/async_folders.php
@@ -3,7 +3,7 @@
require_once(realpath(dirname(__FILE__, 2)) . '/async_header.php');
logged_in_only();
- require_once(APPLICATION_PATH .'/folders/folder.php');
+ require_once(BASE_DIR .'/folders/folder.php');
$tree = new Folder();
$tree->make_tree(0);
$tree->print_tree('index.php');
diff --git a/folders/delete_folder.php b/folders/delete_folder.php
index 2764e18..5340891 100644
--- a/folders/delete_folder.php
+++ b/folders/delete_folder.php
@@ -1,8 +1,5 @@
');
- ini_set('error_append_string', '');
require_once(realpath(dirname(__FILE__, 2)) . '/header.php');
logged_in_only();
@@ -15,7 +12,7 @@
}
elseif (!$settings['confirm_delete'] || $noconfirm) {
// Lets do the deletion if the confirm variable is set to FALSE or after confirmation.
- require_once(APPLICATION_PATH . '/folders/folder.php');
+ require_once(BASE_DIR . '/folders/folder.php');
$tree = new Folder();
$tree->get_children($folderid);
@@ -130,5 +127,5 @@ function reloadparentwindow() {
echo '
';
}
- require_once(APPLICATION_PATH . '/footer.php');
+ require_once(BASE_DIR . '/footer.php');
?>
\ No newline at end of file
diff --git a/folders/edit_folder.php b/folders/edit_folder.php
index 2c3e6a4..81f70f0 100644
--- a/folders/edit_folder.php
+++ b/folders/edit_folder.php
@@ -59,7 +59,7 @@
if ($mysql->query($query)) {
if ($inherit) {
- require_once(APPLICATION_PATH . '/folders/folder.php');
+ require_once(BASE_DIR . '/folders/folder.php');
$tree = new Folder();
$tree->get_children($folderid);
if (count($tree->get_children) > 0) {
@@ -119,5 +119,5 @@
}
}
- require_once(APPLICATION_PATH . '/footer.php');
+ require_once(BASE_DIR . '/footer.php');
?>
\ No newline at end of file
diff --git a/folders/move_folder.php b/folders/move_folder.php
index debb168..193a131 100644
--- a/folders/move_folder.php
+++ b/folders/move_folder.php
@@ -1,7 +1,7 @@
error);
}
}
- require_once(APPLICATION_PATH . '/footer.php');
+ require_once(BASE_DIR . '/footer.php');
?>
\ No newline at end of file
diff --git a/folders/new_folder.php b/folders/new_folder.php
index cac25fe..f65097e 100644
--- a/folders/new_folder.php
+++ b/folders/new_folder.php
@@ -46,4 +46,4 @@
}
}
- require_once(APPLICATION_PATH.'/footer.php');
+ require_once(BASE_DIR.'/footer.php');
diff --git a/folders/select_folder.php b/folders/select_folder.php
index 3858f13..b97cc75 100644
--- a/folders/select_folder.php
+++ b/folders/select_folder.php
@@ -8,7 +8,7 @@
make_tree(0);
$tree->print_tree();
@@ -22,5 +22,5 @@
diff --git a/header.min.php b/header.min.php
index 27e07bb..0a029aa 100644
--- a/header.min.php
+++ b/header.min.php
@@ -4,7 +4,7 @@
ob_start('ob_gzhandler');
}
-// require_once(APPLICATION_PATH . '/lib/webstart.php');
+// require_once(BASE_DIR . '/lib/webstart.php');
if (!is_file(realpath(dirname(__FILE__, 1)) . '/config/config.php')) {
die ('You need to
install OpenBookmark II.');
@@ -13,14 +13,14 @@
require_once(realpath(dirname(__FILE__, 1)) . '/config/config.php');
}
- require_once(APPLICATION_PATH . '/lib/mysql.php');
+ require_once(BASE_DIR . '/lib/mysql.php');
$mysql = new mysql;
- require_once(APPLICATION_PATH . '/lib/auth.php');
+ require_once(BASE_DIR . '/lib/auth.php');
$auth = new Auth;
- require_once(APPLICATION_PATH . '/lib/lib.php');
- require_once(APPLICATION_PATH . '/lib/login.php');
+ require_once(BASE_DIR . '/lib/lib.php');
+ require_once(BASE_DIR . '/lib/login.php');
?>
diff --git a/header.php b/header.php
index 88f94f5..ec97142 100644
--- a/header.php
+++ b/header.php
@@ -10,21 +10,21 @@
ob_start('ob_gzhandler');
}
*/
-// require_once(APPLICATION_PATH .'/lib/webstart.php');
+// require_once(BASE_DIR .'/lib/webstart.php');
if (!is_file(realpath(dirname(__FILE__, 1)) . '/config/config.php')) {
die ('You need to
install OpenBookmark II.');
}
else {
require_once(realpath(dirname(__FILE__, 1)) . '/config/config.php');
}
- require_once(APPLICATION_PATH .'/lib/mysql.php');
+ require_once(BASE_DIR .'/lib/mysql.php');
$mysql = new mysql;
- require_once(APPLICATION_PATH .'/lib/auth.php');
+ require_once(BASE_DIR .'/lib/auth.php');
$auth = new Auth;
- require_once(APPLICATION_PATH .'/lib/lib.php');
- require_once(APPLICATION_PATH .'/lib/login.php');
+ require_once(BASE_DIR .'/lib/lib.php');
+ require_once(BASE_DIR .'/lib/login.php');
$settings['private_mode'] = set_post_bool_var('settings_private_mode', false);
?>
@@ -54,13 +54,13 @@
display_login_form ();
- require_once(APPLICATION_PATH .'/footer.php');
+ require_once(BASE_DIR .'/footer.php');
}
?>
\ No newline at end of file
diff --git a/import.php b/import.php
index 8c7c29b..e2d2d7e 100644
--- a/import.php
+++ b/import.php
@@ -102,7 +102,7 @@
; height:350px; overflow:auto;">
make_tree(0);
$tree->print_tree();
@@ -338,5 +338,5 @@ function folder_close() {
}
print_footer();
- require_once(APPLICATION_PATH . '/footer.php');
+ require_once(BASE_DIR . '/footer.php');
?>
diff --git a/index.php b/index.php
index da6fabc..015a70c 100644
--- a/index.php
+++ b/index.php
@@ -180,7 +180,7 @@ function setupBookmarkIntercepts() {
0) {
- require_once(APPLICATION_PATH . '/bookmarks/bookmarks.php');
+ require_once(BASE_DIR . '/bookmarks/bookmarks.php');
list_bookmarks(
bookmarks:$bookmarks,
show_checkbox:true,
@@ -241,7 +241,7 @@ function setupBookmarkIntercepts() {
make_tree(0);
$tree->print_tree();
@@ -259,7 +259,7 @@ function setupBookmarkIntercepts() {
' . $message . '';
}
- require_once(APPLICATION_PATH . '/footer.php');
+ require_once(BASE_DIR . '/footer.php');
}
@@ -45,7 +45,7 @@ function logged_in_only() {
if (empty($_SESSION['logged_in']) || ! $_SESSION['logged_in']) {
global $auth;
$auth->display_login_form();
- require_once(APPLICATION_PATH . '/footer.php');
+ require_once(BASE_DIR . '/footer.php');
}
}
@@ -496,7 +496,7 @@ function set_num_array($array){
function get_local_version() {
- return file_get_contents(APPLICATION_PATH . '/VERSION');
+ return file_get_contents(BASE_DIR . '/VERSION');
}
function check_for_new_version() {
diff --git a/lib/mysql.php b/lib/mysql.php
index abad898..e80b34c 100644
--- a/lib/mysql.php
+++ b/lib/mysql.php
@@ -9,7 +9,7 @@ class mysql {
public function __construct() {
global $cfg;
- require_once(APPLICATION_PATH . '/config/config.php');
+ require_once(BASE_DIR . '/config/config.php');
$this->conn = mysqli_connect($cfg['hostspec'], $cfg['db_user'], $cfg['db_pass'], $cfg['database']);
diff --git a/register.php b/register.php
index a4d2e18..27d06de 100644
--- a/register.php
+++ b/register.php
@@ -160,5 +160,5 @@ function display_register_additional_text () {
echo '
If you are already a registered user, you can log in here.
' . PHP_EOL;
}
- require_once(APPLICATION_PATH . '/footer.php');
+ require_once(BASE_DIR . '/footer.php');
?>
diff --git a/settings.php b/settings.php
index 2c2619a..2e6d3d1 100644
--- a/settings.php
+++ b/settings.php
@@ -392,5 +392,5 @@ function addSidebar() {
\ No newline at end of file
diff --git a/shared.php b/shared.php
index 377e602..7c29ca6 100644
--- a/shared.php
+++ b/shared.php
@@ -62,7 +62,7 @@
; height: ;">
make_tree(0);
$tree->print_tree();
@@ -75,7 +75,7 @@
;">
diff --git a/sidebar.php b/sidebar.php
index 2bd31f2..3a8a3d6 100644
--- a/sidebar.php
+++ b/sidebar.php
@@ -1,15 +1,15 @@
tree = new Folder();
$this->tree->folders[0] = ['id' => 0, 'childof' => null, 'name' => $GLOBALS['settings']['root_folder_name']];
@@ -166,5 +166,5 @@ function print_bookmarks($folderid) {
$sidebar->make_tree(0);
echo ''. PHP_EOL;
- require_once(APPLICATION_PATH .'/footer.php');
+ require_once(BASE_DIR .'/footer.php');
?>