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
<?php | |
/** | |
* MODULE-NAME | |
* Copyright (C) ${YEAR} ${USER} | |
* info: [email protected] | |
* | |
* This program is free software; | |
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; | |
* either version 3 of the License, or (at your option) any later version. | |
* |
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
<?php | |
/** | |
* ${NAME}.php | |
* Copyright (C) ${YEAR} ${USER} | |
* info: [email protected] | |
* | |
* This program is free software; | |
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; | |
* either version 3 of the License, or (at your option) any later version. | |
* |
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
<?php | |
/** | |
* ${NAME}.php | |
* Copyright (C) ${YEAR} ${USER} | |
* info: [email protected] | |
* | |
* This program is free software; | |
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; | |
* either version 3 of the License, or (at your option) any later version. | |
* |
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
$e = new Exception(); | |
oxRegistry::getUtils()->writeToLog(var_export($aData, true)."\n","yolo.log"); | |
oxRegistry::getUtils()->writeToLog($e->getTraceAsString()."\n------------------------------\n","yolo.log"); |
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
$cfg = oxRegistry::get("oxConfig"); | |
$dir = $cfg->getConfigParam("sCompileDir") . "smarty/*"; | |
foreach (glob($dir) as $item) { | |
if (!is_dir($item)) { | |
unlink($item); | |
} | |
} |
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
$aParams = array( | |
'oxcontents__oxid' => 'hdinotificationactplain', // OXID | |
'oxcontents__oxloadid' => 'hdi_notification_act_plain', // ident | |
'oxcontents__oxtitle' => 'Konto wieder aktiv PLAIN', // title | |
'oxcontents__oxcontent' => 'here comes the content', // content | |
'oxcontents__oxactive' => 1, | |
'oxcontents__oxtype' => 3, // 0 = snippet, 1 = mainmenu, 2 = category, 3 = manual | |
'oxcontents__oxsnippet' => 0, | |
'oxcontents__oxfolder' => 'CMSFOLDER_USERINFO', | |
'oxcontents__oxshopid' => oxSession::getVar("actshop"), |
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
$oDb = oxDb::getDb(); | |
$sCheck = "SHOW TABLES LIKE 'tablename'"; | |
// returns string if table found or false if not found | |
if (!$oDb->getOne($sCheck)) | |
{ | |
// table does not exists | |
// do something | |
} |
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
$oMetaData = oxNew('oxDbMetaDataHandler'); | |
$oMetaData->updateViews(); |
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
$oDb = oxDb::getDb(); | |
$oRs = $oDb->metaColumnNames("tablename"); | |
// check for lower case and upper case column name | |
if (!array_key_exists("columnname", $oRs) && !array_key_exists("COLUMNNAME", $oRs)) { | |
{ | |
// column does not exists | |
// do something | |
} |
NewerOlder