Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ private function ___getReferrer() {
self::$___sCacheReferrer = isset( self::$___sCacheReferrer )
? self::$___sCacheReferrer
: wp_get_referer();
return self::$___sCacheReferrer;
return is_string( self::$___sCacheReferrer ) ? self::$___sCacheReferrer : '';
}
/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ class AdminPageFramework_TabNavigationBar extends AdminPageFramework_FrameworkUt
* Stores the tab items.
*/
public $aTabs = array();
/**
* Stores the active slugs.
*/
public $aActiveSlugs = array();

/**
* Stores container attributes.
Expand Down
5 changes: 5 additions & 0 deletions development/factory/_common/form/AdminPageFramework_Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ class AdminPageFramework_Form extends AdminPageFramework_Form_Controller {
),
);

/**
* Stores sections definitions.
*/
public $aSections = array();

/**
* Stores field set definitions.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function get() {
strip_tags(
is_array( $aField[ 'description' ] )
? implode( '
', $aField[ 'description' ] )
: $aField[ 'description' ]
: ( is_string( $aField[ 'description' ] ) ? $aField[ 'description' ] : '' )
)
)
. "'>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ static public function getStyleAttribute( $asInlineCSSes ) {
}

// At this point, it is a string. Break them down to array elements.
$__aCSSRules = explode( ';', $_asCSSRules );
$__aCSSRules = explode( ';', is_string( $_asCSSRules ) ? $_asCSSRules : '' );
foreach( $__aCSSRules as $_sPair ) {
$_aCSSPair = explode( ':', $_sPair );
$_aCSSPair = explode( ':', ( is_string( $_sPair )? $_sPair : '' ) );
if ( ! isset( $_aCSSPair[ 0 ], $_aCSSPair[ 1 ] ) ) {
continue;
}
Expand Down Expand Up @@ -229,4 +229,4 @@ static public function getDataAttributeArray( array $aArray ) {

}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public function _replyToCallback( $aInputs, $aRawInputs, array $aSubmits, $aSubm
$aSubmits,
'reset_key'
);
$_sKeyToReset = trim( $_sKeyToReset );
if ( ! $_sKeyToReset ) {
return;
}
$_sKeyToReset = trim( $_sKeyToReset );
$_oException = new Exception( 'aReturn' );
$_oException->aReturn = $this->_resetOptions(
$_sKeyToReset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function getTOC() {

$_aOutput = array();
foreach( $this->_aMatches as $_iIndex => $_sMatch ) {
$_sMatch = is_string( $_sMatch ) ? $_sMatch : '';
$_sMatch = strip_tags( $_sMatch, '<h1><h2><h3><h4><h5><h6><h7><h8>' );
$_sMatch = preg_replace( '/<h([1-' . $iDepth . '])>/', '<li class="toc$1"><a href="#toc_' . $_iIndex . '">', $_sMatch );
$_sMatch = preg_replace( '/<\/h[1-' . $iDepth . ']>/', '</a></li>', $_sMatch );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class AdminPageFramework_TabNavigationBar extends AdminPageFramework_FrameworkUtility {
public $sTabTag = 'h2';
public $aTabs = array();
public $aActiveSlugs;
public $aAttributes = array( 'class' => 'nav-tab-wrapper', );
public $aTab = array( 'slug' => null, 'title' => null, 'href' => null, 'disabled' => null, 'class' => null, 'attributes' => array(), );
public $aCallbacks = array( 'format' => null, 'arguments' => array(), );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class AdminPageFramework_Form extends AdminPageFramework_Form_Controller {
public $sStructureType = '';
public $aFieldTypeDefinitions = array();
public $aSectionsets = array( '_default' => array( 'section_id' => '_default', ), );
public $aSections = array();
public $aFieldsets = array();
public $aSavedData = array();
public $sCapability = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function getStyleAttribute($asInlineCSSes)
$_aCSSRules = array_merge($_asCSSRules, $_aCSSRules);
continue;
}
$__aCSSRules = explode(';', $_asCSSRules);
$__aCSSRules = explode( ';', is_string( $_asCSSRules ) ? $_asCSSRules : '' );
foreach ($__aCSSRules as $_sPair) {
$_aCSSPair = explode(':', $_sPair);
if (! isset($_aCSSPair[ 0 ], $_aCSSPair[ 1 ])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public function _replyToCallback($aInputs, $aRawInputs, array $aSubmits, $aSubmi
return;
}
$_sKeyToReset = $this->_getPressedSubmitButtonData($aSubmits, 'reset_key');
$_sKeyToReset = trim($_sKeyToReset);
if (! $_sKeyToReset) {
return;
}
$_sKeyToReset = trim($_sKeyToReset);
$_oException = new Exception('aReturn');
$_oException->aReturn = $this->_resetOptions($_sKeyToReset, $aInputs, $aSubmitInformation);
throw $_oException;
Expand Down