Changeset 2863
- Timestamp:
- Nov 12, 2008, 1:40:20 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/template/goto/upgrade.tpl
r2836 r2863 23 23 table { margin: 0px; } 24 24 td { padding: 3px 10px; } 25 textarea { margin-left: 20px; } 25 26 </style> 26 27 {/literal} -
trunk/install/db/65-database.php
r2836 r2863 103 103 104 104 // +-----------------------------------------------------------------------+ 105 // load the config file106 $config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php';107 $config_file_contents = @file_get_contents($config_file);108 if ($config_file_contents === false)109 {110 die('CANNOT LOAD '.$config_file);111 }112 $php_end_tag = strrpos($config_file_contents, '?'.'>');113 if ($php_end_tag === false)114 {115 die('CANNOT FIND PHP END TAG IN '.$config_file);116 }117 if (!is_writable($config_file))118 {119 die('FILE NOT WRITABLE '.$config_file);120 }121 122 123 // +-----------------------------------------------------------------------+124 105 // load all the user languages 125 106 $all_langs=array(); … … 275 256 276 257 // +-----------------------------------------------------------------------+ 277 // write the result to file and update #user_infos.language 278 $config_file_contents = 279 substr($config_file_contents, 0, $php_end_tag).' 280 define(\'PWG_CHARSET\', \''.$pwg_charset.'\'); 258 // changes to write in mysql.inc.php 259 array_push($mysql_changes, 260 'define(\'PWG_CHARSET\', \''.$pwg_charset.'\'); 281 261 define(\'DB_CHARSET\', \''.$db_charset.'\'); 282 define(\'DB_COLLATE\', \'\'); 283 '.substr($config_file_contents, $php_end_tag); 284 285 $fp = @fopen( $config_file, 'w' ); 286 @fputs($fp, $config_file_contents, strlen($config_file_contents)); 287 @fclose($fp); 262 define(\'DB_COLLATE\', \'\');' 263 ); 288 264 289 265 foreach ($all_langs as $old_lang=>$lang_data) -
trunk/install/upgrade_1.3.1.php
r2838 r2863 596 596 } 597 597 598 // Insert define('PHPWG_INSTALLED', true); in mysql.inc.php 599 $config_file_contents = 600 substr($config_file_contents, 0, $php_end_tag).' 601 define(\'PHPWG_INSTALLED\', true); 602 '.substr($config_file_contents, $php_end_tag); 603 604 $fp = @fopen( $config_file, 'w' ); 605 @fputs($fp, $config_file_contents, strlen($config_file_contents)); 606 @fclose($fp); 598 // changes to write in mysql.inc.php 599 array_push($mysql_changes, 'define(\'PHPWG_INSTALLED\', true);'); 607 600 608 601 // Send infos -
trunk/language/de_DE/upgrade.lang.php
r2838 r2863 32 32 $lang['SQL queries'] = 'SQL queries'; 33 33 $lang['Upgrade informations'] = 'Upgrade informations'; 34 $lang['delete upgrade files'] = '[Security] Delete files "upgrade.php", "upgrade_feed.php", "install.php" and "install" directory';35 34 $lang['perform a maintenance check'] = 'Perform a maintenance check in [Administration>Specials>Maintenance] if you encounter any problem.'; 36 35 $lang['deactivated plugins'] = 'As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'; 37 36 $lang['upgrade login message'] = 'Only administrator can run upgrade: please sign in below.'; 38 37 $lang['You do not have access rights to run upgrade'] = 'You do not have access rights to run upgrade'; 38 $lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:'; 39 39 40 40 // Upgrade informations from upgrade_1.3.1.php -
trunk/language/en_UK/upgrade.lang.php
r2854 r2863 31 31 $lang['SQL queries'] = 'SQL queries'; 32 32 $lang['Upgrade informations'] = 'Upgrade informations'; 33 $lang['delete upgrade files'] = '[Security] Delete files "upgrade.php", "upgrade_feed.php", "install.php" and "install" directory';34 33 $lang['perform a maintenance check'] = 'Perform a maintenance check in [Administration>Specials>Maintenance] if you encounter any problem.'; 35 34 $lang['deactivated plugins'] = 'As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'; 36 35 $lang['upgrade login message'] = 'Only administrator can run upgrade: please sign in below.'; 37 36 $lang['You do not have access rights to run upgrade'] = 'You do not have access rights to run upgrade'; 37 $lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:'; 38 38 39 39 // Upgrade informations from upgrade_1.3.1.php -
trunk/language/es_ES/upgrade.lang.php
r2844 r2863 31 31 $lang['SQL queries'] = 'número de demanda SQL'; 32 32 $lang['Upgrade informations'] = 'Informaciones sobre la puesta al día'; 33 $lang['delete upgrade files'] = '[Seguridad] Borre los ficheros "upgrade.php", "upgrade_feed.php", "install.php" así como el expediente "install"';34 33 $lang['perform a maintenance check'] = 'Por favor, efectúes un mantenimiento en [Administración>Especiales>Mantenimiento] si usted encuentra problemas.'; 35 34 $lang['deactivated plugins'] = 'Por precaución, el plugins siguiente han sido desactivados. Verifique si existen unas posturas al día antes de reactivarlas:'; 36 35 $lang['upgrade login message'] = 'Sólo un administrador puede lanzar la puesta al día: por favor, identifiqúese más abajo.'; 37 36 $lang['You do not have access rights to run upgrade'] = 'Usted no tiene los derechos necessaires para lanzar la puesta al día.'; 37 /* TODO */$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:'; 38 38 39 39 // Upgrade informations from upgrade_1.3.1.php -
trunk/language/fr_FR/upgrade.lang.php
r2854 r2863 31 31 $lang['SQL queries'] = 'nombre de requêtes SQL'; 32 32 $lang['Upgrade informations'] = 'Informations sur la mise à jour'; 33 $lang['delete upgrade files'] = '[Sécurité] Effacez les fichiers "upgrade.php", "upgrade_feed.php", "install.php" ainsi que le dossier "install"';34 33 $lang['perform a maintenance check'] = 'Veuillez effectuer une maintenance dans [Administration>Spéciales>Maintenance] si vous rencontrez des problèmes.'; 35 34 $lang['deactivated plugins'] = 'Par précaution, les plugins suivants ont été désactivés. Vérifiez s\'il existe des mises à jour avant de les réactiver:'; 36 $lang['upgrade login message'] = 'Seul un admini trateur peut lancer la mise à jour: veuillez vous identifier ci-dessous.';35 $lang['upgrade login message'] = 'Seul un administrateur peut lancer la mise à jour: veuillez vous identifier ci-dessous.'; 37 36 $lang['You do not have access rights to run upgrade'] = 'Vous n\'avez pas les droits necessaires pour lancer la mise à jour.'; 37 $lang['in include/mysql.inc.php, before ?>, insert:'] = 'Dans le fichier <i>include/mysql.inc.php</i>, avant <b>?></b>, insérez:'; 38 38 39 39 // Upgrade informations from upgrade_1.3.1.php -
trunk/language/it_IT/upgrade.lang.php
r2854 r2863 31 31 $lang['SQL queries'] = 'numero delle esecuzioni SQL'; 32 32 $lang['Upgrade informations'] = 'Informazioni sul\'aggiornamento'; 33 $lang['delete upgrade files'] = '[Sicurezza] Cancellare i files "upgrade.php", "upgrade_feed.php", "install.php" e la directory "install"';34 33 $lang['perform a maintenance check'] = 'Se riscontrate dei problemi, effettuare una manutezione in [Amministrazione>Speciale>Manutenzione].'; 35 34 $lang['deactivated plugins'] = 'Per precauzione, i plugins sono stati disattivati. Verificate se non esistono degli aggiornamenti prima di riattivarli:'; 36 35 $lang['upgrade login message'] = 'Solo un\'amministratore può eseguire l\'aggiornamento: identificatevi.'; 37 36 $lang['You do not have access rights to run upgrade'] = 'Non avete le autorizzazioni necessarie per effettuare l\'aggiornamento'; 37 /* TODO */$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:'; 38 38 39 39 // Upgrade informations from upgrade_1.3.1.php -
trunk/language/nl_NL/upgrade.lang.php
r2854 r2863 32 32 $lang['SQL queries'] = 'SQL queries'; 33 33 $lang['Upgrade informations'] = 'Upgrade informations'; 34 $lang['delete upgrade files'] = '[Security] Delete files "upgrade.php", "upgrade_feed.php", "install.php" and "install" directory';35 34 $lang['perform a maintenance check'] = 'Perform a maintenance check in [Administration>Specials>Maintenance] if you encounter any problem.'; 36 35 $lang['deactivated plugins'] = 'As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'; 37 36 $lang['upgrade login message'] = 'Only administrator can run upgrade: please sign in below.'; 38 37 $lang['You do not have access rights to run upgrade'] = 'You do not have access rights to run upgrade'; 38 $lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:'; 39 39 40 40 // Upgrade informations from upgrade_1.3.1.php -
trunk/upgrade.php
r2862 r2863 30 30 define('PHPWG_ROOT_PATH', './'); 31 31 32 if (!file_exists(PHPWG_ROOT_PATH.'include/mysql.inc.php')) 33 { 34 die('Could not find include/mysql.inc.php file.'); 32 // load config file 33 $config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php'; 34 $config_file_contents = @file_get_contents($config_file); 35 if ($config_file_contents === false) 36 { 37 die('Cannot load '.$config_file); 38 } 39 $php_end_tag = strrpos($config_file_contents, '?'.'>'); 40 if ($php_end_tag === false) 41 { 42 die('Cannot find php end tag in '.$config_file); 35 43 } 36 44 … … 225 233 $page['infos'] = array(); 226 234 $page['errors'] = array(); 235 $mysql_changes = array(); 227 236 228 237 if (isset($_POST['username']) and isset($_POST['password'])) … … 239 248 $conf['die_on_sql_error'] = false; 240 249 include($upgrade_file); 250 251 // Something to add in mysql.inc.php? 252 if (!empty($mysql_changes)) 253 { 254 $config_file_contents = 255 substr($config_file_contents, 0, $php_end_tag) . "\r\n" 256 . implode("\r\n\r\n" , $mysql_changes) . "\r\n" 257 . substr($config_file_contents, $php_end_tag); 258 259 if (!@file_put_contents($config_file, $config_file_contents)) 260 { 261 array_push($page['infos'], 262 l10n('in include/mysql.inc.php, before ?>, insert:') . ' 263 <p><textarea rows="5" cols="40">'.implode("\r\n\r\n" , $mysql_changes).'</textarea></p>' 264 ); 265 } 266 } 241 267 242 268 // Plugins deactivation … … 270 296 271 297 array_push($page['infos'], 272 l10n('delete upgrade files'),273 298 l10n('perform a maintenance check') 274 299 );
Note: See TracChangeset
for help on using the changeset viewer.