original_string: protected function after_delete($result) {
          global $DB;
          if (!$result) {
              return;
          }
  
          // Resolving sortorder holes left after delete.
          $table = '{' . self::TABLE . '}';
          $sql = "UPDATE $table SET sortorder = sortorder -1  WHERE  competencyframeworkid = ? AND parentid = ? AND sortorder > ?";
          $DB->execute($sql, array($this->get('competencyframeworkid'), $this->get('parentid'), $this->get('sortorder')));
      }
code: protected function after_delete($result) {
          global $DB;
          if (!$result) {
              return;
          }
  
          // Resolving sortorder holes left after delete.
          $table = '{' . self::TABLE . '}';
          $sql = "UPDATE $table SET sortorder = sortorder -1  WHERE  competencyframeworkid = ? AND parentid = ? AND sortorder > ?";
          $DB->execute($sql, array($this->get('competencyframeworkid'), $this->get('parentid'), $this->get('sortorder')));
      }
code_tokens: protected function after_delete ( $ result ) { global $ DB ; if ( ! $ result ) { return ; } // Resolving sortorder holes left after delete. $ table = '{' . self :: TABLE . '}' ; $ sql = "UPDATE $table SET sortorder = sortorder -1  WHERE  competencyframeworkid = ? AND parentid = ? AND sortorder > ?" ; $ DB -> execute ( $ sql , array ( $ this -> get ( 'competencyframeworkid' ) , $ this -> get ( 'parentid' ) , $ this -> get ( 'sortorder' ) ) ) ; }
docstring: Hook to execute after a delete.
  
  @param bool $result Whether or not the delete was successful.
  @return void
docstring_tokens: Hook to execute after a delete .