original_string: public function set_sortorder($sortorder) {
          $oldorder = $this->file_record->sortorder;
          $filerecord = new stdClass;
          $filerecord->sortorder = $sortorder;
          $this->update($filerecord);
          if (!$this->is_directory()) {
              // Callback for file sort order change.
              if ($pluginsfunction = get_plugins_with_function('after_file_sorted')) {
                  foreach ($pluginsfunction as $plugintype => $plugins) {
                      foreach ($plugins as $pluginfunction) {
                          $pluginfunction($this->file_record, $oldorder, $sortorder);
                      }
                  }
              }
          }
      }
code: public function set_sortorder($sortorder) {
          $oldorder = $this->file_record->sortorder;
          $filerecord = new stdClass;
          $filerecord->sortorder = $sortorder;
          $this->update($filerecord);
          if (!$this->is_directory()) {
              // Callback for file sort order change.
              if ($pluginsfunction = get_plugins_with_function('after_file_sorted')) {
                  foreach ($pluginsfunction as $plugintype => $plugins) {
                      foreach ($plugins as $pluginfunction) {
                          $pluginfunction($this->file_record, $oldorder, $sortorder);
                      }
                  }
              }
          }
      }
code_tokens: public function set_sortorder ( $ sortorder ) { $ oldorder = $ this -> file_record -> sortorder ; $ filerecord = new stdClass ; $ filerecord -> sortorder = $ sortorder ; $ this -> update ( $ filerecord ) ; if ( ! $ this -> is_directory ( ) ) { // Callback for file sort order change. if ( $ pluginsfunction = get_plugins_with_function ( 'after_file_sorted' ) ) { foreach ( $ pluginsfunction as $ plugintype => $ plugins ) { foreach ( $ plugins as $ pluginfunction ) { $ pluginfunction ( $ this -> file_record , $ oldorder , $ sortorder ) ; } } } } }
docstring: Set file sort order
  
  @param int $sortorder
  @return int
docstring_tokens: Set file sort order