Created
November 23, 2012 15:03
-
-
Save kermie/4136034 to your computer and use it in GitHub Desktop.
CLI script to read all entries from oxconfig in clear text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defined('SHOPBASEPATH') | |
|| define('SHOPBASEPATH', realpath(dirname(__FILE__) . '/../htdocs')); | |
require_once(SHOPBASEPATH. "/core/oxfunctions.php"); | |
require_once(SHOPBASEPATH. "/core/adodblite/adodb.inc.php"); | |
function getShopBasePath() | |
{ | |
return SHOPBASEPATH . '/'; | |
} | |
$oDb = oxDb::getDb(); | |
$sQ = "SELECT oxvarname, oxvartype, DECODE( oxvarvalue, '" . oxConfig::getInstance()->getConfigParam( 'sConfigKey' ) . "') as oxvarvalue from oxconfig"; | |
$oRs = $oDb->execute( $sQ ); | |
if ( $oRs != false && $oRs->recordCount() > 0 ) { | |
while ( !$oRs->EOF ) { | |
echo $oRs->fields[0] . ' [' . $oRs->fields[1] . ']: ' . $oRs->fields[2] . "\n\n"; | |
$oRs->moveNext(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally posted
http://forum.oxid-esales.com/showthread.php?t=16903#post107306