From 485528c27a30e2d6f6c138d5e2041b40d6c9a327 Mon Sep 17 00:00:00 2001 From: cheesypoof Date: Mon, 15 Aug 2016 13:08:38 -0700 Subject: [PATCH] Update include statements --- couch/addons/cart/cart.php | 9 ++++----- couch/addons/data-bound-form/data-bound-form.php | 8 ++++---- couch/addons/extended/extended-users.php | 4 ++-- couch/addons/inline/inline.php | 6 +++--- couch/addons/kfunctions.example.php | 4 +--- couch/addons/repeatable/repeatable.php | 2 +- couch/header.php | 14 +++++++------- 7 files changed, 22 insertions(+), 25 deletions(-) diff --git a/couch/addons/cart/cart.php b/couch/addons/cart/cart.php index a3818af..377acee 100644 --- a/couch/addons/cart/cart.php +++ b/couch/addons/cart/cart.php @@ -36,7 +36,6 @@ */ if ( !defined('K_COUCH_DIR') ) die(); // cannot be loaded directly - require_once( K_COUCH_DIR.'addons/cart/session.php' ); define( 'PP_CART_VERSION', '1.0' ); define( 'PP_ACTION_UNDEFINED', 0 ); @@ -118,8 +117,8 @@ function KCart(){ function populate_config(){ $pp = array(); - if( file_exists(K_COUCH_DIR.'addons/cart/config.php') ){ - require_once( K_COUCH_DIR.'addons/cart/config.php' ); + if( file_exists(K_ADDONS_DIR.'cart/config.php') ){ + require_once( K_ADDONS_DIR.'cart/config.php' ); } $this->config = array_map( "trim", $pp ); unset( $pp ); @@ -1149,8 +1148,8 @@ function gateway_handler( $params, $node ){ } // end class - if( file_exists(K_COUCH_DIR.'addons/cart/cart_ex.php') ){ - require_once( K_COUCH_DIR.'addons/cart/cart_ex.php' ); + if( file_exists(K_ADDONS_DIR.'cart/cart_ex.php') ){ + require_once( K_ADDONS_DIR.'cart/cart_ex.php' ); $CART = new KCartEx(); } else{ diff --git a/couch/addons/data-bound-form/data-bound-form.php b/couch/addons/data-bound-form/data-bound-form.php index feba1f9..6093a1c 100644 --- a/couch/addons/data-bound-form/data-bound-form.php +++ b/couch/addons/data-bound-form/data-bound-form.php @@ -627,7 +627,7 @@ function check_nonce( $params, $node ){ $FUNCS->register_tag( 'validate_nonce', array('KDataBoundForm', 'validate_nonce') ); $FUNCS->register_tag( 'check_nonce', array('KDataBoundForm', 'check_nonce') ); - require_once( K_COUCH_DIR.'addons/data-bound-form/securefile.php' ); - require_once( K_COUCH_DIR.'addons/data-bound-form/throttle.php' ); - require_once( K_COUCH_DIR.'addons/data-bound-form/datetime.php' ); - require_once( K_COUCH_DIR.'addons/data-bound-form/checkspam.php' ); + require_once( K_ADDONS_DIR.'data-bound-form/securefile.php' ); + require_once( K_ADDONS_DIR.'data-bound-form/throttle.php' ); + require_once( K_ADDONS_DIR.'data-bound-form/datetime.php' ); + require_once( K_ADDONS_DIR.'data-bound-form/checkspam.php' ); diff --git a/couch/addons/extended/extended-users.php b/couch/addons/extended/extended-users.php index b515d0a..6fb2f86 100644 --- a/couch/addons/extended/extended-users.php +++ b/couch/addons/extended/extended-users.php @@ -18,8 +18,8 @@ function KExtendedUsers(){ function populate_config(){ $t = array(); - if( file_exists(K_COUCH_DIR.'addons/extended/config.php') ){ - require_once( K_COUCH_DIR.'addons/extended/config.php' ); + if( file_exists(K_ADDONS_DIR.'extended/config.php') ){ + require_once( K_ADDONS_DIR.'extended/config.php' ); } else{/* die( diff --git a/couch/addons/inline/inline.php b/couch/addons/inline/inline.php index 2dc18f1..6b91e70 100644 --- a/couch/addons/inline/inline.php +++ b/couch/addons/inline/inline.php @@ -31,7 +31,7 @@ function load_edit_handler( $params, $node ){ set( 'k_disable_inline_edit', '1', 'global' ); @@ -219,7 +219,7 @@ static function register_admin_routes(){ $route = array( 'name'=>'edit', 'path'=>'edit', - 'include_file'=>K_COUCH_DIR.'addons/inline/inline_ex.php', + 'include_file'=>K_ADDONS_DIR.'inline/inline_ex.php', 'class'=> 'InlineEx', 'action'=>'edit_action', 'module'=>'inline', /* owner module of this route */ @@ -232,7 +232,7 @@ static function register_admin_routes(){ static function register_renderables(){ global $FUNCS; - $FUNCS->register_render( 'inline_content_form', array('template_path'=>K_COUCH_DIR.'addons/inline/theme/') ); + $FUNCS->register_render( 'inline_content_form', array('template_path'=>K_ADDONS_DIR.'inline/theme/') ); } } // end class diff --git a/couch/addons/kfunctions.example.php b/couch/addons/kfunctions.example.php index 34a0b60..bf0c66a 100644 --- a/couch/addons/kfunctions.example.php +++ b/couch/addons/kfunctions.example.php @@ -1,9 +1,7 @@ register_render( 'repeatable_column_deleted', array('template_path'=>K_COUCH_DIR.'addons/repeatable/theme/', 'template_ctx_setter'=>array('Repeatable', '_render_repeatable_column_deleted')) ); + $FUNCS->register_render( 'repeatable_column_deleted', array('template_path'=>K_ADDONS_DIR.'repeatable/theme/', 'template_ctx_setter'=>array('Repeatable', '_render_repeatable_column_deleted')) ); } static function _render_repeatable_column_deleted( $arr_deleted_html ){ diff --git a/couch/header.php b/couch/header.php index 49de28f..1210414 100644 --- a/couch/header.php +++ b/couch/header.php @@ -359,11 +359,11 @@ // addons to 1.3 define( 'K_ADDONS_DIR', K_COUCH_DIR . 'addons/' ); - require_once( K_COUCH_DIR . 'addons/nicedit/nicedit.php' ); - require_once( K_COUCH_DIR . 'addons/repeatable/repeatable.php' ); - require_once( K_COUCH_DIR . 'addons/relation/relation.php' ); - require_once( K_COUCH_DIR . 'addons/cart/session.php' ); - require_once( K_COUCH_DIR . 'addons/data-bound-form/data-bound-form.php' ); + require_once( K_ADDONS_DIR . 'nicedit/nicedit.php' ); + require_once( K_ADDONS_DIR . 'repeatable/repeatable.php' ); + require_once( K_ADDONS_DIR . 'relation/relation.php' ); + require_once( K_ADDONS_DIR . 'cart/session.php' ); + require_once( K_ADDONS_DIR . 'data-bound-form/data-bound-form.php' ); // Current user's authentication info $AUTH = new KAuth( ); @@ -388,8 +388,8 @@ if( !defined('K_THEME_URL') ) define( 'K_THEME_URL', '' ); // include custom functions/addons if any - if( file_exists(K_COUCH_DIR . 'addons/kfunctions.php') ){ - include_once( K_COUCH_DIR.'addons/kfunctions.php' ); + if( file_exists(K_ADDONS_DIR . 'kfunctions.php') ){ + include_once( K_ADDONS_DIR . 'kfunctions.php' ); } if( file_exists(K_SITE_DIR . 'kfunctions.php') ){ include_once( K_SITE_DIR . 'kfunctions.php' );