Skip to content

Commit

Permalink
Merge pull request #149 from rupok/mahfuz-dev
Browse files Browse the repository at this point in the history
version control updated
  • Loading branch information
rupok authored Jan 22, 2019
2 parents 09d5937 + c579578 commit 02322c9
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions includes/eael-rollback.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public function __construct() {
* @access private
*/
private function setup_plugin_vars() {
$this->set_svn_versions_data($svn_tags);
$this->versions_select('plugin');
}

Expand All @@ -143,33 +142,6 @@ public function get_plugin_data() {
}
}

/**
* Set SVN Version Data
*
* @param $html
*
* @return array|bool
*/
public function set_svn_versions_data( $html ) {
if( ! $html ) return false;

$DOM = new DOMDocument;
$DOM->loadHTML( $html );

$versions = [];
$items = $DOM->getElementsByTagName('a');

foreach( $items as $item ) {
$href = str_replace( '/', '', $item->getAttribute('href') ); // Remove trailing slash

if( strpos( $href, 'http' ) === false && '..' !== $href ) {
$versions[] = $href;
}
}

return $versions;
}

/**
* Versions Select
*
Expand Down

0 comments on commit 02322c9

Please sign in to comment.