/[drupal]/contributions/modules/media_mover/media_mover_api.module
ViewVC logotype

Diff of /contributions/modules/media_mover/media_mover_api.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.110.2.67, Sun Oct 4 17:14:06 2009 UTC revision 1.1.2.110.2.68, Fri Oct 30 15:23:00 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2    
3  /* $Id: media_mover_api.module,v 1.1.2.110.2.66 2009/10/04 17:08:05 arthuregg Exp $ */  /* $Id: media_mover_api.module,v 1.1.2.110.2.67 2009/10/04 17:14:06 arthuregg Exp $ */
4    
5    
6  /*  /*
# Line 85  function media_mover_api_cron() { Line 85  function media_mover_api_cron() {
85    // get all the configurations to run    // get all the configurations to run
86    $configurations = media_mover_api_get_configurations();    $configurations = media_mover_api_get_configurations();
87    foreach ($configurations as $configuration) {    foreach ($configurations as $configuration) {
88      // check to see if we should run on cron for this configuration      // The run control hook can prevent a configuration from running
89      if (! media_mover_api_run_control_extend($configuration, 'cron_run')) {      if (! media_mover_api_run_control_extend($configuration, 'cron_run')) {
90        media_mover_api_run_config($configuration, null, null, true);        media_mover_api_run_config($configuration, null, null, true);
91      }      }
# Line 530  function media_mover_api_run_config_verb Line 530  function media_mover_api_run_config_verb
530    $output = t('Configuration process: %verb is acting on !count files', array('%verb' => $verb, '!count' => count($files))) .'<br />';    $output = t('Configuration process: %verb is acting on !count files', array('%verb' => $verb, '!count' => count($files))) .'<br />';
531    // loop through all of the found files for this status    // loop through all of the found files for this status
532    foreach ($files as $file) {    foreach ($files as $file) {
533          // only run this if cron isn't requeseting this OR run_control does not try to stop it          // Now run this configuration on this file
         // @TODO think through if we need to be passing cron here- might make more sense to have a $configuration->operator  
534          media_mover_api_run_config_verb_file($file, $config, $verb);          media_mover_api_run_config_verb_file($file, $config, $verb);
         if ( ! media_mover_api_run_control_extend($config, $verb .'_run', $file) ) {  
       //media_mover_api_run_config_verb_file($file, $config, $verb);  
         }  
535    }    }
536    return $output;    return $output;
537  }  }
# Line 553  function media_mover_api_run_config_verb Line 549  function media_mover_api_run_config_verb
549   * @return array $file   * @return array $file
550   *   the file that has been acted upon   *   the file that has been acted upon
551   */   */
552  function media_mover_api_run_config_verb_file($file, $config, $verb ) {  function media_mover_api_run_config_verb_file($file, $config, $verb) {
553    // set the status for the file    // set the status for the file
554    $status = media_mover_api_verb_base_status($verb);    $status = media_mover_api_verb_base_status($verb);
555    // make sure no one else is trying to operate on this file    // make sure no one else is trying to operate on this file
# Line 671  function media_mover_api_build_dirs($pat Line 667  function media_mover_api_build_dirs($pat
667   *   *
668   */   */
669  function media_mover_api_dir_path($filepath = false) {  function media_mover_api_dir_path($filepath = false) {
670    $path = file_directory_path() .'/'. MMA_FILES_DIR .'/';    $path = variable_get('mma_files_dir', file_directory_path() .'/'. MMA_FILES_DIR .'/');
671    if ($filepath) {    if ($filepath) {
672      $path = $path . $filepath;      $path = $path . $filepath;
673      // make sure the directories exist      // make sure the directories exist

Legend:
Removed from v.1.1.2.110.2.67  
changed lines
  Added in v.1.1.2.110.2.68

  ViewVC Help
Powered by ViewVC 1.1.2