original_string: public static function set_state_running($running = true) {
          if ($running === true) {
              if (self::get_automated_backup_state() === self::STATE_RUNNING) {
                  throw new backup_helper_exception('backup_automated_already_running');
              }
              set_config('backup_auto_running', '1', 'backup');
          } else {
              unset_config('backup_auto_running', 'backup');
          }
          return true;
      }
code: public static function set_state_running($running = true) {
          if ($running === true) {
              if (self::get_automated_backup_state() === self::STATE_RUNNING) {
                  throw new backup_helper_exception('backup_automated_already_running');
              }
              set_config('backup_auto_running', '1', 'backup');
          } else {
              unset_config('backup_auto_running', 'backup');
          }
          return true;
      }
code_tokens: public static function set_state_running ( $ running = true ) { if ( $ running === true ) { if ( self :: get_automated_backup_state ( ) === self :: STATE_RUNNING ) { throw new backup_helper_exception ( 'backup_automated_already_running' ) ; } set_config ( 'backup_auto_running' , '1' , 'backup' ) ; } else { unset_config ( 'backup_auto_running' , 'backup' ) ; } return true ; }
docstring: Sets the state of the automated backup system.
  
  @param bool $running
  @return bool
docstring_tokens: Sets the state of the automated backup system .