diff -r dc838fd61a06 -r 0437a7cf1acc plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Thu Dec 20 22:23:07 2007 -0500 +++ b/plugins/SpecialAdmin.php Fri Dec 21 18:21:20 2007 -0500 @@ -57,6 +57,38 @@ return; } + if ( $paths->getParam(0) == 'updates.xml' ) + { + require_once(ENANO_ROOT . '/includes/http.php'); + $req = new Request_HTTP('germantown.enanocms.org', '/meta/updates.xml'); + $response = $req->get_response_body(); + header('Content-type: application/xml'); + if ( $req->response_code != HTTP_OK ) + { + // Error in response + echo 'response_code . ' ' . $req->response_string . ' +]]>'; + } + else + { + // Retrieve first update + $first_update = preg_match('//', $response, $match); + if ( !$first_update ) + { + echo ''; + } + if ( version_compare(enano_version(true), $match[2], '<') ) + { + $response = str_replace_once('', " \n ", $response); + } + echo $response; + } + return; + } + // Basic information echo RenderMan::render( '== Welcome to Runt, the Enano administration panel. == @@ -78,6 +110,10 @@ echo '
NOTE: It appears that your install.php and/or schema.sql files still exist. It is HIGHLY RECOMMENDED that you delete or rename these files, to prevent getting your server hacked.
'; } + echo '

Check for updates

'; + echo '

Periodically, new releases of Enano will be made available. Click the button below to check for updates to Enano. During this process, a request will be sent to the Enano CMS server (germantown.enanocms.org) over HTTP. No information about your Enano installation will be transmitted.

'; + echo '
'; + // Inactive users $q = $db->sql_query('SELECT * FROM '.table_prefix.'logs WHERE log_type=\'admin\' AND action=\'activ_req\';'); if($q)