2008-09-01 Esteban Sanchez <estebans@artica.es>

* extensions/update_manager/sql/update_manager.sql,
        extensions/update_manager.php: Updated server info to
        the final Update manager host.

        * extensions/update_manager/main.php: Added a information message
        about Update Manager extension.

        * update_manager/load_updatemanager.php: Get module count into user
        key.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1058 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Esteban Sanchez 2008-09-01 10:39:32 +00:00
parent c97bc978fa
commit a04c80edd0
6 changed files with 31 additions and 6 deletions

View File

@ -1,3 +1,15 @@
2008-09-01 Esteban Sanchez <estebans@artica.es>
* extensions/update_manager/sql/update_manager.sql,
extensions/update_manager.php: Updated server info to
the final Update manager host.
* extensions/update_manager/main.php: Added a information message
about Update Manager extension.
* update_manager/load_updatemanager.php: Get module count into user
key.
2008-09-01 Sancho Lerena <slerena@artica.es> 2008-09-01 Sancho Lerena <slerena@artica.es>
* pandora_logo.png: White background for IE6 users. * pandora_logo.png: White background for IE6 users.

View File

@ -87,7 +87,10 @@ function pandora_update_manager_login () {
$config['dbpass'], $config['dbname']); $config['dbpass'], $config['dbname']);
$settings = um_db_load_settings (); $settings = um_db_load_settings ();
if(empty($settings->keygen_path)) um_db_update_setting ('update_server_host', 'www.artica.es');
um_db_update_setting ('update_server_path', 'pandoraupdate/server.php');
if (empty ($settings->keygen_path))
return false; return false;
$user_key = exec ($settings->keygen_path); $user_key = exec ($settings->keygen_path);

View File

@ -9,8 +9,7 @@ unset ($prev_level);
function um_xml_rpc_client_call ($server_host, $server_path, $server_port, $function, $parameters) { function um_xml_rpc_client_call ($server_host, $server_path, $server_port, $function, $parameters) {
$msg = new XML_RPC_Message ($function, $parameters); $msg = new XML_RPC_Message ($function, $parameters);
$client = new XML_RPC_Client ($server_path, $server_host, $server_port); $client = new XML_RPC_Client ($server_path, $server_host, $server_port);
if (defined ('XMLRPC_DEBUG'))
$client->setDebug (XMLRPC_DEBUG);
$result = $client->send ($msg); $result = $client->send ($msg);
if (! $result || $result->faultCode ()) { if (! $result || $result->faultCode ()) {

View File

@ -17,9 +17,12 @@ function get_user_key () {
/* We only want to know this for statistics records. /* We only want to know this for statistics records.
Feel free to disable if you want. We don't want to hide anything. Feel free to disable if you want. We don't want to hide anything.
*/ */
$user_key = get_db_value ('COUNT(`id_agente`)', 'tagente', 'disabled', 0); $n = get_db_value ('COUNT(`id_agente`)', 'tagente', 'disabled', 0);
$m = get_db_value ('COUNT(`id_agente_modulo`)', 'tagente_modulo',
'disabled', 0);
$user_key = array ('A' => $n, 'M' => $m);
return $user_key; return json_encode ($user_key);
} }
flush (); flush ();

View File

@ -34,6 +34,14 @@ $settings = um_db_load_settings ();
echo '<h3>'.__('Update manager').'</h3>'; echo '<h3>'.__('Update manager').'</h3>';
echo '<div class="notify" style="width: 80%" >';
echo '<img src="images/information.png" /> ';
/* Translators: Do not translade Update Manager, it's the name of the program */
echo __('The new <a href="http://updatemanager.sourceforge.net">Update Manager</a> client is shipped with the new Pandora FMS 2.0. It lets systems administrators to do not need to update their PandoraFMS manually since the Update Manager is the one getting new modules, new plugins and new features (even full migrations tools for future versions) automatically');
echo '<p />';
echo __('Update Manager is one of the most advanced features of PandoraFMS 2.0 Enterprise version, for more information visit <a href="http://pandorafms.com">http://pandorafms.com</a>');
echo '</div>';
$user_key = get_user_key (); $user_key = get_user_key ();
$package = um_client_check_latest_update ($settings, $user_key); $package = um_client_check_latest_update ($settings, $user_key);

View File

@ -1,5 +1,5 @@
CREATE TABLE `tupdate_settings` ( `key` varchar(255) default '', `value` varchar(255) default '', PRIMARY KEY (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tupdate_settings` ( `key` varchar(255) default '', `value` varchar(255) default '', PRIMARY KEY (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tupdate_settings` VALUES ('current_update', '0'), ('customer_key', 'PANDORA-FREE'), ('keygen_path', ''), ('update_server_host', 'artica.homelinux.com'), ('update_server_port', '80'), ('update_server_path', 'pandoraupdate/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''); INSERT INTO `tupdate_settings` VALUES ('current_update', '0'), ('customer_key', 'PANDORA-FREE'), ('keygen_path', ''), ('update_server_host', 'www.artica.es'), ('update_server_port', '80'), ('update_server_path', 'pandoraupdate/server.php'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', '');
CREATE TABLE `tupdate_package` ( id int(11) unsigned NOT NULL auto_increment, timestamp datetime NOT NULL, description mediumtext NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tupdate_package` ( id int(11) unsigned NOT NULL auto_increment, timestamp datetime NOT NULL, description mediumtext NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tupdate` ( id int(11) unsigned NOT NULL auto_increment, type enum('code', 'db_data', 'db_schema', 'binary'), id_update_package int(11) unsigned NOT NULL default 0, filename varchar(250) default '', checksum varchar(250) default '', previous_checksum varchar(250) default '', svn_version int(4) unsigned NOT NULL default 0, data LONGTEXT default '', data_rollback LONGTEXT default '', description TEXT default '', db_table_name varchar(140) default '', db_field_name varchar(140) default '', db_field_value varchar(1024) default '', PRIMARY KEY (`id`), FOREIGN KEY (`id_update_package`) REFERENCES tupdate_package(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tupdate` ( id int(11) unsigned NOT NULL auto_increment, type enum('code', 'db_data', 'db_schema', 'binary'), id_update_package int(11) unsigned NOT NULL default 0, filename varchar(250) default '', checksum varchar(250) default '', previous_checksum varchar(250) default '', svn_version int(4) unsigned NOT NULL default 0, data LONGTEXT default '', data_rollback LONGTEXT default '', description TEXT default '', db_table_name varchar(140) default '', db_field_name varchar(140) default '', db_field_value varchar(1024) default '', PRIMARY KEY (`id`), FOREIGN KEY (`id_update_package`) REFERENCES tupdate_package(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tupdate_journal` ( id int(11) unsigned NOT NULL auto_increment, id_update int(11) unsigned NOT NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`id_update`) REFERENCES tupdate(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tupdate_journal` ( id int(11) unsigned NOT NULL auto_increment, id_update int(11) unsigned NOT NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`id_update`) REFERENCES tupdate(`id`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;