diff options
| author | modela bitweaver <spiderr@bitweaver.org> | 2021-02-02 01:17:54 -0500 |
|---|---|---|
| committer | modela bitweaver <spiderr@bitweaver.org> | 2021-02-02 01:17:54 -0500 |
| commit | 46f16280083e21264d6499899f447999a95a534e (patch) | |
| tree | 5c091b61ae841d110622146e68ca7dc5eb4399da | |
| parent | 8e8fb7e46c83f9c66d88cedbbd30c67f87c7a2d4 (diff) | |
| download | wiki-46f16280083e21264d6499899f447999a95a534e.tar.gz wiki-46f16280083e21264d6499899f447999a95a534e.tar.bz2 wiki-46f16280083e21264d6499899f447999a95a534e.zip | |
move _inc and _lib to includes/ and use PKG_INCLUDE_PATH constants
| -rw-r--r-- | admin/upgrade_inc.php | 6 | ||||
| -rw-r--r-- | edit.php | 6 | ||||
| -rw-r--r-- | edit_book.php | 8 | ||||
| -rw-r--r-- | export_wiki_pages.php | 2 | ||||
| -rw-r--r-- | includes/classes/BitBook.php | 2 | ||||
| -rw-r--r-- | includes/classes/BitPage.php | 2 | ||||
| -rw-r--r-- | includes/display_bitpage_inc.php | 2 | ||||
| -rw-r--r-- | includes/export_lib.php | 2 | ||||
| -rw-r--r-- | includes/lookup_page_inc.php | 2 | ||||
| -rw-r--r-- | index.php | 2 | ||||
| -rw-r--r-- | modules/mod_wiki_last_comments.php | 2 | ||||
| -rw-r--r-- | page_history.php | 2 | ||||
| -rw-r--r-- | page_watches.php | 4 | ||||
| -rwxr-xr-x | slideshow.php | 4 | ||||
| -rw-r--r-- | wiki_rss.php | 4 |
15 files changed, 25 insertions, 25 deletions
diff --git a/admin/upgrade_inc.php b/admin/upgrade_inc.php index 65d2c0e..0431384 100644 --- a/admin/upgrade_inc.php +++ b/admin/upgrade_inc.php @@ -84,7 +84,7 @@ array( 'ALTER' => array( // STEP 3 array( 'PHP' => ' global $gBitSystem; - require_once( WIKI_PKG_PATH."BitPage.php" ); + require_once( WIKI_PKG_CLASS_PATH.'BitPage.php' ); $max = $gBitSystem->mDb->getOne( "SELECT MAX(`page_id`) FROM `'.BIT_DB_PREFIX.'tiki_pages`" ); $gBitSystem->mDb->CreateSequence( "tiki_pages_page_id_seq", $max + 1 ); $query = "SELECT uu.`user_id`, uu2.`user_id` AS modifier_user_id, tp.`lastModif` AS created, tp.`lastModif` AS `last_modified`, tp.`data`, tp.`pageName` AS `title`, tp.`ip`, tp.`hits` @@ -225,8 +225,8 @@ array( 'QUERY' => // STEP 5 array( 'PHP' => ' global $gBitSystem; - require_once( LIBERTY_PKG_PATH."LibertyStructure.php" ); - require_once( WIKI_PKG_PATH."BitBook.php" ); + require_once( LIBERTY_PKG_CLASS_PATH.'LibertyStructure.php' ); + require_once( WIKI_PKG_CLASS_PATH.'BitBook.php' ); $query = "SELECT `structure_id`, `content_id` FROM `".BIT_DB_PREFIX."tiki_structures` WHERE `parent_id` IS NULL OR `parent_id`=0"; $roots = $gBitSystem->mDb->getAssoc( $query ); $s = new LibertyStructure(); @@ -32,7 +32,7 @@ if( $gContent->isValid() ) { //make comment count for this page available for templates if( $gBitSystem->isFeatureActive( 'wiki_comments' ) && !empty( $_REQUEST['page_id'] ) ) { - require_once( LIBERTY_PKG_PATH.'LibertyComment.php' ); + require_once( LIBERTY_PKG_CLASS_PATH.'LibertyComment.php' ); $gComment = new LibertyComment(); $numComments = $gComment->getNumComments($gContent->mContentId); $gBitSmarty->assign('comments_count', $numComments); @@ -413,7 +413,7 @@ if( isset( $_REQUEST["suck_url"] ) ) { $gBitSystem->fatalError( tra( "Importing remote URLs is disabled" )); } // Suck another page and append to the end of current - require_once( UTIL_PKG_INC.'htmlparser/html_parser_inc.php' ); + require_once( UTIL_PKG_INCLUDE_PATH.'htmlparser/html_parser_inc.php' ); $suck_url = isset( $_REQUEST["suck_url"] ) ? $_REQUEST["suck_url"] : ''; $parsehtml = isset( $_REQUEST["parsehtml"] ) ? ( $_REQUEST["parsehtml"] == 'on' ? 'y' : 'n' ): 'n'; if( isset( $_REQUEST['do_suck'] ) && strlen( $suck_url ) > 0 ) { @@ -443,7 +443,7 @@ if( isset( $_REQUEST["suck_url"] ) ) { // Need to parse HTML? if( $parsehtml == 'y' ) { // Read compiled( serialized ) grammar - $grammarfile = UTIL_PKG_INC.'htmlparser/htmlgrammar.cmp'; + $grammarfile = UTIL_PKG_INCLUDE_PATH.'htmlparser/htmlgrammar.cmp'; if( !$fp = @fopen( $grammarfile,'r' ) ) { $gBitSystem->fatalError( tra( "Can't parse remote HTML page" )); } diff --git a/edit_book.php b/edit_book.php index 3257ca0..ee2dfd5 100644 --- a/edit_book.php +++ b/edit_book.php @@ -22,8 +22,8 @@ if( isset( $_COOKIE['book_section'] ) && $_COOKIE['book_section'] == 'o' ) { } $gBitSmarty->assign( 'book_section',$book_section ); -include_once( LIBERTY_PKG_PATH.'LibertyStructure.php'); -include_once( WIKI_PKG_PATH.'BitBook.php'); +include_once( LIBERTY_PKG_CLASS_PATH.'LibertyStructure.php'); +include_once( WIKI_PKG_CLASS_PATH.'BitBook.php'); global $gStructure; @@ -34,7 +34,7 @@ global $gStructure; // get a book instance global $gContent; if( @BitBase::verifyId( $_REQUEST["structure_id"] ) || @BitBase::verifyId( $_REQUEST["content_id"] ) ) { - include_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' ); + include_once( LIBERTY_PKG_INCLUDE_PATH.'lookup_content_inc.php' ); if( empty( $gContent ) ){ $gBitSystem->fatalError( 'Error: Invalid structure id, the book you requested could not be found.' ); } elseif( empty( $_REQUEST["structure_id"] ) ) { @@ -140,7 +140,7 @@ if( isset($_REQUEST["createstructure"]) ) { // set the correct display template $mid = 'bitpackage:wiki/edit_book.tpl'; - include_once( LIBERTY_PKG_PATH.'edit_structure_inc.php'); + include_once( LIBERTY_PKG_INCLUDE_PATH.'edit_structure_inc.php'); if( $gBitThemes->isAjaxRequest() ) { $gBitSmarty->display( 'bitpackage:kernel/feedback_inc.tpl' ); } diff --git a/export_wiki_pages.php b/export_wiki_pages.php index 1c5d5bb..26baa89 100644 --- a/export_wiki_pages.php +++ b/export_wiki_pages.php @@ -14,7 +14,7 @@ * required setup */ require_once( '../kernel/setup_inc.php' ); -include_once( UTIL_PKG_INC.'zip_lib.php' ); +include_once( UTIL_PKG_INCLUDE_PATH.'zip_lib.php' ); include_once( WIKI_PKG_INCLUDE_PATH.'export_lib.php' ); if (!$gBitUser->hasPermission( 'p_wiki_admin' )) die; diff --git a/includes/classes/BitBook.php b/includes/classes/BitBook.php index a028742..f31d35a 100644 --- a/includes/classes/BitBook.php +++ b/includes/classes/BitBook.php @@ -25,7 +25,7 @@ * required setup */ require_once( WIKI_PKG_CLASS_PATH.'BitPage.php' ); -require_once( LIBERTY_PKG_PATH.'LibertyStructure.php' ); +require_once( LIBERTY_PKG_CLASS_PATH.'LibertyStructure.php' ); define('BITBOOK_CONTENT_TYPE_GUID', 'bitbook' ); diff --git a/includes/classes/BitPage.php b/includes/classes/BitPage.php index 48e2f84..9b2b03a 100644 --- a/includes/classes/BitPage.php +++ b/includes/classes/BitPage.php @@ -13,7 +13,7 @@ /** * required setup */ -require_once( LIBERTY_PKG_PATH.'LibertyMime.php' ); +require_once( LIBERTY_PKG_CLASS_PATH.'LibertyMime.php' ); /** * @package wiki diff --git a/includes/display_bitpage_inc.php b/includes/display_bitpage_inc.php index a8c92f6..57beec0 100644 --- a/includes/display_bitpage_inc.php +++ b/includes/display_bitpage_inc.php @@ -110,7 +110,7 @@ if( $gBitSystem->isFeatureActive( 'wiki_comments' )) { $comments_return_url .= '&comments_maxComments=1'; } } - include_once( LIBERTY_PKG_PATH.'comments_inc.php' ); + include_once( LIBERTY_PKG_INCLUDE_PATH.'comments_inc.php' ); } // Footnotes diff --git a/includes/export_lib.php b/includes/export_lib.php index e63877c..83f19dd 100644 --- a/includes/export_lib.php +++ b/includes/export_lib.php @@ -22,7 +22,7 @@ class ExportLib extends BitBase { function MakeWikiZip( $pExportFile ) { global $gBitUser,$gBitSystem; - include_once (UTIL_PKG_INC."tar.class.php"); + include_once (UTIL_PKG_INCLUDE_PATH."tar.class.php"); $tar = new tar(); $query = "SELECT wp.`page_id` from `".BIT_DB_PREFIX."wiki_pages` wp INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON (lc.`content_id` = wp.`content_id`) ORDER BY lc.".$this->mDb->convertSortmode("title_asc"); diff --git a/includes/lookup_page_inc.php b/includes/lookup_page_inc.php index 0fd5e17..8fe4da9 100644 --- a/includes/lookup_page_inc.php +++ b/includes/lookup_page_inc.php @@ -16,7 +16,7 @@ require_once( WIKI_PKG_CLASS_PATH.'BitBook.php'); global $gContent; -include_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' ); +include_once( LIBERTY_PKG_INCLUDE_PATH.'lookup_content_inc.php' ); // this is needed when the center module is applied to avoid abusing $_REQUEST if( empty( $lookupHash )) { @@ -19,7 +19,7 @@ $gBitSystem->verifyPackage( 'wiki' ); require_once( WIKI_PKG_CLASS_PATH.'BitPage.php' ); if( !empty( $_REQUEST['structure_id'] ) ) { - include( LIBERTY_PKG_PATH.'display_structure_inc.php' ); + include( LIBERTY_PKG_INCLUDE_PATH.'display_structure_inc.php' ); } else { // if no page set if ( !isset( $_REQUEST['page'] ) and !isset( $_REQUEST['page_id'] ) ) { diff --git a/modules/mod_wiki_last_comments.php b/modules/mod_wiki_last_comments.php index 4f8e544..b3d8fae 100644 --- a/modules/mod_wiki_last_comments.php +++ b/modules/mod_wiki_last_comments.php @@ -18,7 +18,7 @@ global $gQueryUserId, $moduleParams; * required setup */ if( $gBitUser->hasPermission( 'p_wiki_view_page' ) ) { - require_once( LIBERTY_PKG_PATH.'LibertyComment.php' ); + require_once( LIBERTY_PKG_CLASS_PATH.'LibertyComment.php' ); $cmt = new LibertyComment(); $listHash = array( 'max_records' => $moduleParams['module_rows'], 'user_id' => $gQueryUserId, 'content_type_guid' => BITPAGE_CONTENT_TYPE_GUID ); $lastComments = $cmt->getList( $listHash ); diff --git a/page_history.php b/page_history.php index 03f8af2..fe77244 100644 --- a/page_history.php +++ b/page_history.php @@ -39,7 +39,7 @@ if (!empty( $_REQUEST['rollback_preview'] )) { // set up stuff to get history working $smartyContentRef = 'pageInfo'; $rollbackPerm = 'p_wiki_rollback'; -include_once( LIBERTY_PKG_PATH.'content_history_inc.php' ); +include_once( LIBERTY_PKG_INCLUDE_PATH.'content_history_inc.php' ); // pagination stuff $gBitSmarty->assign( 'page', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 ); diff --git a/page_watches.php b/page_watches.php index 485bf88..c36d161 100644 --- a/page_watches.php +++ b/page_watches.php @@ -14,14 +14,14 @@ * required setup */ require_once( '../kernel/setup_inc.php' ); -include_once( WIKI_PKG_PATH.'BitPage.php'); +include_once( WIKI_PKG_CLASS_PATH.'BitPage.php'); $gBitSystem->verifyPackage( 'wiki' ); $gBitSystem->verifyFeature( 'users_watches' ); $gBitSystem->verifyPermission( 'p_admin_users', tra( "Permission denied you cannot browse these page watches" ) ); // Get the page from the request var or default it to HomePage -include( WIKI_PKG_PATH.'lookup_page_inc.php' ); +include( WIKI_PKG_INCLUDE_PATH.'lookup_page_inc.php' ); // make comment count for this page available for templates $gComment = new LibertyComment(); diff --git a/slideshow.php b/slideshow.php index 137ae2f..dc426c3 100755 --- a/slideshow.php +++ b/slideshow.php @@ -25,7 +25,7 @@ if (!isset($_SESSION["thedate"])) { $thedate = $_SESSION["thedate"]; } -require_once ( WIKI_PKG_PATH.'lookup_page_inc.php' ); +require_once ( WIKI_PKG_INCLUDE_PATH.'lookup_page_inc.php' ); // If the page doesn't exist then display an error if (!$gContent->isValid()) { $gBitSystem->fatalError( tra("Page cannot be found"), NULL, NULL, HttpStatusCodes::HTTP_NOT_FOUND ); @@ -35,7 +35,7 @@ if (!$gContent->isValid()) { $gContent->verifyViewPermission(); // Get page data -include( WIKI_PKG_PATH.'lookup_page_inc.php' ); +include( WIKI_PKG_INCLUDE_PATH.'lookup_page_inc.php' ); $info = $gContent->mInfo; // If not locked and last version is user version then can undo diff --git a/wiki_rss.php b/wiki_rss.php index f3eadb1..71d47a9 100644 --- a/wiki_rss.php +++ b/wiki_rss.php @@ -13,8 +13,8 @@ $gBitSystem->verifyPackage( 'wiki' ); $gBitSystem->verifyPackage( 'rss' ); $gBitSystem->verifyFeature( 'wiki_rss' ); -require_once( WIKI_PKG_PATH."BitPage.php" ); -require_once( RSS_PKG_PATH."rss_inc.php" ); +require_once( WIKI_PKG_CLASS_PATH.'BitPage.php' ); +require_once( RSS_PKG_INCLUDE_PATH.'rss_inc.php' ); $rss->title = $gBitSystem->getConfig( 'wiki_rss_title', $gBitSystem->getConfig( 'site_title' ).' - '.tra( 'Wiki' ) ); $rss->description = $gBitSystem->getConfig( 'wiki_rss_description', $gBitSystem->getConfig( 'site_title' ).' - '.tra( 'RSS Feed' ) ); |
