Skip to content

[tz-1] Resolve discrepencies between remote master and local version. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ignore all cached items #
mcp_cache/images/*

# ignore main config #
mcp_config/Main.xml

# ignore all platforms #
mcp_root/PlatForm/*

# ignore all sites #
mcp_root/Site/*

# ignore all files #
mcp_files/images/*
mcp_files/files
mcp_files/audio
mcp_files/video

# ignore remote and reserve #
remote
reserve

# ignore lib, jason_fugh and other #
www/jason_fugh
www/lib
www/other

#ignore ghost . files
**/*.php
**/*.txt
**/._*

# IDE files
org.eclipse.*
.jsdtscope
.project
.buildpath
Empty file modified README
100755 → 100644
Empty file.
Empty file modified mcp_config/MainExample.xml
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Config/Config.xml
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Config/Modules.xml
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Core/DAO.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Core/DB.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Core/Exception/Permission.php
100755 → 100644
Empty file.
173 changes: 98 additions & 75 deletions mcp_root/App/Core/MCP.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -263,81 +263,91 @@ private function _init() {
*/
$objDBConfig = array_pop($this->_objXMLMain->xpath("//site[@id='{$this->getSitesId()}']/db"));

/*
* Create database object and connect
*
* Different adapters may be used by changing the adapter XML config value. The value
* should reflect the full path to the adpater. The adapter is required to implement
* MCPDB and extend MCPResource. This is required so all the adapters can be interchanged.
* Default adapters are stored inside App.Resource.DB. Custom adapters should not be placed
* here. Instead you should dedicate a pkg or site directory to them so they aren't lost
* when updating to new versions of MCP.
*/
$this->_objDB = $this->getInstance((string) $objDBConfig->adapter,array($this));
$this->_objDB->connect(
(string) $objDBConfig->host
,(string) $objDBConfig->user
,(string) $objDBConfig->pass
,(string) $objDBConfig->db
);
if(INSTALLED) {

/*
* Create database object and connect
*
* Different adapters may be used by changing the adapter XML config value. The value
* should reflect the full path to the adpater. The adapter is required to implement
* MCPDB and extend MCPResource. This is required so all the adapters can be interchanged.
* Default adapters are stored inside App.Resource.DB. Custom adapters should not be placed
* here. Instead you should dedicate a pkg or site directory to them so they aren't lost
* when updating to new versions of MCP.
*/
$this->_objDB = $this->getInstance((string) $objDBConfig->adapter,array($this));
$this->_objDB->connect(
(string) $objDBConfig->host
,(string) $objDBConfig->user
,(string) $objDBConfig->pass
,(string) $objDBConfig->db
);

}

/*
* Create MCP event handler
*/
$this->_objEventHandler = $this->getInstance('App.Resource.Event.EventHandler',array($this));

/*
* Set the current site
*/
$this->_objSite = MCPSite::createInstance($this);
if(INSTALLED) {
/*
* Set the current site
*/
$this->_objSite = MCPSite::createInstance($this);
}

/*
* Initiate cookie manager - required for proper session handling
*/
$this->_objCookieManager = $this->getInstance('App.Resource.Cookie.CookieManager',array($this));

/*
* Initiate cache handler
*/
$this->import('App.Resource.Cache.CacheHandler');
$this->_objCacheHandler = MCPCacheHandler::createInstance($this);

/*
* Initiate session handler
*/
$this->import('App.Resource.Session.SessionHandler');
$this->_objSessionHandler = MCPSessionHandler::createInstance($this);

/*
* Required for garbage collector to function appropriatly
*/
ini_set('session.gc_probability', 100);
ini_set('session.gc_divisor', 100);

if(INSTALLED) {
/*
* Initiate cache handler
*/
$this->import('App.Resource.Cache.CacheHandler');
$this->_objCacheHandler = MCPCacheHandler::createInstance($this);

/*
* Initiate session handler
*/
$this->import('App.Resource.Session.SessionHandler');
$this->_objSessionHandler = MCPSessionHandler::createInstance($this);

/*
* Required for garbage collector to function appropriatly
*/
ini_set('session.gc_probability', 100);
ini_set('session.gc_divisor', 100);
}

/*
* Begin session once session handler has been created
*/
session_start();

/*
* Create config instance
*/
$this->_objConfig = MCPConfig::createInstance($this);
if(INSTALLED) {
/*
* Create config instance
*/
$this->_objConfig = MCPConfig::createInstance($this);

/*
* Create user instance
*/
$this->_objUser = MCPUser::createInstance($this);

/*
* Create permission handler
*/
$this->_objPermissionHandler = $this->getInstance('App.Resource.Permission.PermissionManager',array($this));

/*
* Create Template singleton
*/
$this->_objTemplate = MCPTemplate::createInstance($this);
/*
* Create user instance
*/
$this->_objUser = MCPUser::createInstance($this);

/*
* Create permission handler
*/
$this->_objPermissionHandler = $this->getInstance('App.Resource.Permission.PermissionManager',array($this));
}

/*
* Create Template singleton
*/
$this->_objTemplate = MCPTemplate::createInstance($this);

/*
* Instatiate UI drawing library
Expand All @@ -352,26 +362,30 @@ private function _init() {
*/
$this->_objUI->registerPath(ROOT.'/Component/Node/Theme');

/*
* Assign default master template path
*/
//$this->_strMasterTemplatePath = 'Site'.DS.'*'.DS/*.'Template'.DS*/.'master.php';
$this->_strMasterTemplatePath = $this->getConfigValue('site_master_template');

/*
* Assign default email master template path
*/
$this->_strEmailHTMLMasterTemplatePath = $this->getConfigValue('site_email_html_master_template');

/*
* Assign default email plain text master template path
*/
$this->_strEmailPlainTextMasterTemplatePath = $this->getConfigValue('site_email_plain_text_master_template');

if(INSTALLED) {
/*
* Assign default master template path
*/
//$this->_strMasterTemplatePath = 'Site'.DS.'*'.DS/*.'Template'.DS*/.'master.php';
$this->_strMasterTemplatePath = $this->getConfigValue('site_master_template');

/*
* Assign default email master template path
*/
$this->_strEmailHTMLMasterTemplatePath = $this->getConfigValue('site_email_html_master_template');

/*
* Assign default email plain text master template path
*/
$this->_strEmailPlainTextMasterTemplatePath = $this->getConfigValue('site_email_plain_text_master_template');
}

/*
* Execute login
*/
$this->executeLogin();
if(INSTALLED) {
$this->executeLogin();
}

}

Expand Down Expand Up @@ -1242,7 +1256,16 @@ public function getFrmConfig($strPkg,$strType='frm',$boolMixin=true,$arrDynamic=

if(strcmp('default',$objConfig->getName()) == 0) {
$mixValue = str_replace(array('SITES_ID','USERS_ID'),array($this->getSitesId(),$this->getUsersId()),(string) $objConfig);
} else {


// nested children
} else if(strcmp('children',$objConfig->getName()) === 0) {

$objNestedXml = simplexml_load_string("<?xml version=\"1.0\"?><mod>{$objConfig->asXml()}</mod>");
$mixValue = $this->getFrmConfig($objNestedXml,'children');


} else {
$mixValue = (string) $objConfig;
}

Expand Down
Empty file modified mcp_root/App/Core/Resource.php
100755 → 100644
Empty file.
8 changes: 0 additions & 8 deletions mcp_root/App/Core/VDItem.php

This file was deleted.

Empty file modified mcp_root/App/Lib/Console/Console.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Lib/Email/Emailer.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Lib/Import/Import.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Lib/Request/Request.php
100755 → 100644
Empty file.
4 changes: 3 additions & 1 deletion mcp_root/App/Lib/UI/Element/Common/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ public function html($settings,\UI\Manager $ui) {


$element.= $ui->draw('Common.Form.Video',array(
'base_name'=>sprintf('%s[%s]%s',$name,$field,(isset($data['multi'])?"[$i]":''))
'base_name'=>sprintf('%s[%s]%s',$name,$field,(isset($data['multi'])?"[$i][0]":'[0]')),
'codec'=> $data['children']['codec'],
'container'=> $data['children']['container']
));

} else {
Expand Down
20 changes: 8 additions & 12 deletions mcp_root/App/Lib/UI/Element/Common/Form/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ public function settings() {
return array(
'base_name'=>array(
'required'=>true
),
'codec'=> array(
'required'=> true
),
'container'=> array(
'required'=> true
)
);
}
Expand Down Expand Up @@ -57,12 +63,7 @@ protected function _getCodecsElement($ui,$settings) {
'name'=>$base_name.'[codec]'
,'id'=>'xxx'
,'data'=>array(
'values'=>array(
array('values'=>'','label'=>'Pick Codec')
,array('value'=>'1','label'=>'One')
,array('value'=>'2','label'=>'Two')
,array('value'=>'3','label'=>'Three')
)
'values'=> $codec['values']
)
,'value'=>''
));
Expand All @@ -82,12 +83,7 @@ protected function _getContainersElement($ui,$settings) {
'name'=>$base_name.'[container]'
,'id'=>'xxxccc'
,'data'=>array(
'values'=>array(
array('values'=>'','label'=>'Pick Format')
,array('value'=>'1','label'=>'One')
,array('value'=>'2','label'=>'Two')
,array('value'=>'3','label'=>'Three')
)
'values'=> $container['values']
)
,'value'=>''
));
Expand Down
Empty file modified mcp_root/App/Lib/Validation/Validator.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/Cache/CacheHandler.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/Cache/DAO/DAODataCache.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/Cache/DAO/DAOImageCache.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/Config/Config.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/Cookie/CookieManager.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/DB/MySQL/MySQL.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/DB/MySQLi/MySQLi.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/DB/PDO/PDO.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/Event/EventHandler.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/File/DAO/DAOImage.php
100755 → 100644
Empty file.
Empty file modified mcp_root/App/Resource/Module/Module.php
100755 → 100644
Empty file.
Loading