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 | |
function MYMODULE_node_insert($node) { | |
$event_types = array('event'); | |
if (in_array($node->type, $event_types)) { | |
module_load_include('inc', 'webform', 'includes/webform.emails'); | |
$email = array( | |
'nid' => $node->nid, | |
'email' => '[email protected]', | |
'subject' => 'default', |
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
// $node = node_load(123); | |
try { | |
$wrapper = entity_metadata_wrapper('node', $node); | |
$value = $wrapper->field_FIELDNAME->value(); | |
} | |
catch (Exception $ex) { | |
watchdog_exception('watchdog_key', $ex); | |
} |
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
function cur_memory() { | |
$unit=array('b','kb','mb','gb','tb','pb'); | |
$size=memory_get_usage(TRUE); | |
$memory = @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i]; | |
return $memory; | |
} | |
print cur_memory(); | |
//some_potentially_intensive_function(); |
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
/** | |
* Implements hook_preprocess_page(). | |
*/ | |
function NAME_preprocess_html(&$vars) { | |
if (arg(0) == "colorbox") { | |
// disable the Toolbar when we're in a colorbox popup | |
unset($vars['page']['page_top']['toolbar']); | |
} | |
} |
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
diff --git a/app/lib/core/Plugins/TaskQueueHandlers/mediaproc.php b/app/lib/core/Plugins/TaskQueueHandlers/mediaproc.php | |
index d956891..5e84570 100644 | |
--- a/app/lib/core/Plugins/TaskQueueHandlers/mediaproc.php | |
+++ b/app/lib/core/Plugins/TaskQueueHandlers/mediaproc.php | |
@@ -42,6 +42,7 @@ include_once(__CA_LIB_DIR__."/core/Plugins/WLPlug.php"); | |
include_once(__CA_LIB_DIR__."/core/Plugins/IWLPlugTaskQueueHandler.php"); | |
include_once(__CA_LIB_DIR__."/core/Media.php"); | |
include_once(__CA_LIB_DIR__."/core/Media/MediaVolumes.php"); | |
+include_once(__CA_LIB_DIR__."/core/Media/MediaInfoCoder.php"); | |
include_once(__CA_LIB_DIR__."/core/Media/MediaProcessingSettings.php"); |