Skip to content

Instantly share code, notes, and snippets.

@kermie
Created November 23, 2012 15:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kermie/4136034 to your computer and use it in GitHub Desktop.
Save kermie/4136034 to your computer and use it in GitHub Desktop.
CLI script to read all entries from oxconfig in clear text
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();
}
}
@kermie
Copy link
Author

kermie commented Nov 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment