original_string: public function rename_index($xmldb_table, $xmldb_intex, $newname) {
          debugging('rename_index() is one experimental feature. You must not use it in production!', DEBUG_DEVELOPER);
  
          // Check newname isn't empty
          if (!$newname) {
              throw new ddl_exception('ddlunknownerror', null, 'newname can not be empty');
          }
  
          // Check index exists
          if (!$this->index_exists($xmldb_table, $xmldb_intex)) {
              throw new ddl_exception('ddlunknownerror', null,
                        'Index ' . $xmldb_table->getName() . '->' . $xmldb_intex->getName() .
                        ' does not exist. Rename skipped');
          }
  
          if (!$sqlarr = $this->generator->getRenameIndexSQL($xmldb_table, $xmldb_intex, $newname)) {
              throw new ddl_exception('ddlunknownerror', null, 'Some DBs do not support index renaming (MySQL). Rename skipped');
          }
  
          $this->execute_sql_arr($sqlarr, array($xmldb_table->getName()));
      }
code: public function rename_index($xmldb_table, $xmldb_intex, $newname) {
          debugging('rename_index() is one experimental feature. You must not use it in production!', DEBUG_DEVELOPER);
  
          // Check newname isn't empty
          if (!$newname) {
              throw new ddl_exception('ddlunknownerror', null, 'newname can not be empty');
          }
  
          // Check index exists
          if (!$this->index_exists($xmldb_table, $xmldb_intex)) {
              throw new ddl_exception('ddlunknownerror', null,
                        'Index ' . $xmldb_table->getName() . '->' . $xmldb_intex->getName() .
                        ' does not exist. Rename skipped');
          }
  
          if (!$sqlarr = $this->generator->getRenameIndexSQL($xmldb_table, $xmldb_intex, $newname)) {
              throw new ddl_exception('ddlunknownerror', null, 'Some DBs do not support index renaming (MySQL). Rename skipped');
          }
  
          $this->execute_sql_arr($sqlarr, array($xmldb_table->getName()));
      }
code_tokens: public function rename_index ( $ xmldb_table , $ xmldb_intex , $ newname ) { debugging ( 'rename_index() is one experimental feature. You must not use it in production!' , DEBUG_DEVELOPER ) ; // Check newname isn't empty if ( ! $ newname ) { throw new ddl_exception ( 'ddlunknownerror' , null , 'newname can not be empty' ) ; } // Check index exists if ( ! $ this -> index_exists ( $ xmldb_table , $ xmldb_intex ) ) { throw new ddl_exception ( 'ddlunknownerror' , null , 'Index ' . $ xmldb_table -> getName ( ) . '->' . $ xmldb_intex -> getName ( ) . ' does not exist. Rename skipped' ) ; } if ( ! $ sqlarr = $ this -> generator -> getRenameIndexSQL ( $ xmldb_table , $ xmldb_intex , $ newname ) ) { throw new ddl_exception ( 'ddlunknownerror' , null , 'Some DBs do not support index renaming (MySQL). Rename skipped' ) ; } $ this -> execute_sql_arr ( $ sqlarr , array ( $ xmldb_table -> getName ( ) ) ) ; }
docstring: This function will rename the index in the table passed as arguments
  Before renaming the index, the function will check it exists
  Experimental. Shouldn't be used at all!
  
  @param xmldb_table $xmldb_table Table object (just the name is mandatory).
  @param xmldb_index $xmldb_intex Index object (full specs are required).
  @param string $newname New name of the index.
  @return void
docstring_tokens: This function will rename the index in the table passed as arguments Before renaming the index the function will check it exists Experimental . Shouldn t be used at all!