Skip to content

Commit 46294a7

Browse files
authored
Merge pull request #9 from MsieurPafi/master
added a test for the presence of git
2 parents 54ceba7 + 07d1b11 commit 46294a7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

phpwpinfo.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ public function init_all_tests() {
9292
$this->test_form_mail();
9393

9494
$this->get_footer();
95-
}
95+
}
9696

9797
/**
98-
* Main test, check if php/mysql are installed and right version for WP
98+
* Main test, check if php/mysql/git are installed and right version for WP
9999
*/
100100
public function test_versions() {
101101
$this->html_table_open( 'General informations & tests PHP/MySQL Version', '', 'Required', 'Recommended', 'Current' );
@@ -142,9 +142,14 @@ public function test_versions() {
142142
$this->html_table_row( 'MySQL Version', $this->mysqli_version, '-', 'Not available, needs credentials.', 'warning' );
143143
}
144144

145-
$this->html_table_close();
146-
}
145+
//Test if the server is connected to the server by attempt to find the IP(v4) of www.google.fr
146+
if(gethostbyname('www.google.fr') != 'www.google.fr'){
147+
$this->html_table_row('Internet connection', 'No', 'Yes', 'Yes', 'success');
148+
}else{
149+
$this->html_table_row('Internet connection', 'No', 'Yes', 'No', 'error');
150+
}
147151

152+
148153
public function test_php_extensions() {
149154
$this->html_table_open( 'PHP Extensions', '', 'Required', 'Recommended','Current' );
150155

0 commit comments

Comments
 (0)