Skip to content

Commit

Permalink
add submodules and index.php
Browse files Browse the repository at this point in the history
  • Loading branch information
spiderr committed Mar 25, 2013
1 parent 706e648 commit 5d46f3d
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .gitmodules
@@ -0,0 +1,27 @@
[submodule "kernel"]
path = kernel
url = git@github.com:bitweaver/kernel.git
[submodule "liberty"]
path = liberty
url = git@github.com:bitweaver/liberty.git
[submodule "storage"]
path = storage
url = git@github.com:bitweaver/storage.git
[submodule "themes"]
path = themes
url = git@github.com:bitweaver/themes.git
[submodule "users"]
path = users
url = git@github.com:bitweaver/users.git
[submodule "util"]
path = util
url = git@github.com:bitweaver/util.git
[submodule "install"]
path = install
url = git@github.com:bitweaver/install.git
[submodule "help"]
path = help
url = git@github.com:bitweaver/wiki.git
[submodule "store"]
path = store
url = git@github.com:bitweaver/commerce.git
1 change: 1 addition & 0 deletions help
Submodule help added at 916e1b
48 changes: 48 additions & 0 deletions index.php
@@ -0,0 +1,48 @@
<?php
/**
* @version $Header$
* @package bitweaver
*/
require_once( 'kernel/setup_inc.php' );

// $gBitSystem->loadLayout() needs ACTIVE_PACKAGE
if( !$gBitSystem->isDatabaseValid() ) {
install_error();
} elseif( !defined( 'ACTIVE_PACKAGE' )) {
$bit_index = $gBitSystem->getConfig( 'bit_index' );
if( in_array( $bit_index, array_keys( $gBitSystem->mPackages )) && defined( strtoupper( $bit_index ).'_PKG_PATH' )) {
define( 'ACTIVE_PACKAGE', constant( strtoupper( $bit_index ).'_PKG_NAME' ));
$gBitSystem->mActivePackage = $bit_index;
} else {
define( 'ACTIVE_PACKAGE', KERNEL_PKG_NAME );
unset( $bit_index );
}
}

if( !empty( $_REQUEST['content_id'] )) {
if( $obj = LibertyBase::getLibertyObject( $_REQUEST['content_id'] )) {
$url = $obj->getDisplayUrl();
if( !empty($_REQUEST['highlight'] )) {
if( preg_match( '/\?/', $url )) {
$url .= '&';
} else {
$url .= '?';
}
$url .= 'highlight='.$_REQUEST['highlight'];
}
bit_redirect( $url );
}
} elseif( !empty( $_REQUEST['structure_id'] )) {
include( LIBERTY_PKG_PATH.'display_structure_inc.php' );
die;
}

$gBitThemes->loadLayout();
// Redirectless home for packages
if( !empty( $bit_index )) {
chdir( $gBitSystem->mPackages[$bit_index]['path'] );
include_once( './index.php' );
die;
}

bit_redirect( $gBitSystem->getDefaultPage() );
1 change: 1 addition & 0 deletions install
Submodule install added at 8f1b89
1 change: 1 addition & 0 deletions kernel
Submodule kernel added at 2bd11c
1 change: 1 addition & 0 deletions liberty
Submodule liberty added at 12cafa
1 change: 1 addition & 0 deletions storage
Submodule storage added at 1c0d7c
1 change: 1 addition & 0 deletions store
Submodule store added at a462ab
1 change: 1 addition & 0 deletions themes
Submodule themes added at 5b49d3
1 change: 1 addition & 0 deletions users
Submodule users added at 71ebbd
1 change: 1 addition & 0 deletions util
Submodule util added at d69e5a

0 comments on commit 5d46f3d

Please sign in to comment.