Changeset 2838 for trunk/install/upgrade_1.3.1.php
- Timestamp:
- Nov 7, 2008, 2:54:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/install/upgrade_1.3.1.php
r2836 r2838 579 579 } 580 580 581 // load the config file 582 $config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php'; 583 $config_file_contents = @file_get_contents($config_file); 584 if ($config_file_contents === false) 585 { 586 die('CANNOT LOAD '.$config_file); 587 } 588 $php_end_tag = strrpos($config_file_contents, '?'.'>'); 589 if ($php_end_tag === false) 590 { 591 die('CANNOT FIND PHP END TAG IN '.$config_file); 592 } 593 if (!is_writable($config_file)) 594 { 595 die('FILE NOT WRITABLE '.$config_file); 596 } 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); 607 608 // Send infos 581 609 $page['infos'] = array_merge( 582 610 $page['infos'], 583 611 array( 584 'all sub-categories of private categories become private', 585 586 'user permissions and group permissions have been erased', 587 588 'only thumbnails prefix and webmaster mail address have been saved from 589 previous configuration', 590 591 'in include/mysql.inc.php, before 592 <pre style="background-color:lightgray">?></pre> 593 insert 594 <pre style="background-color:lightgray">define(\'PHPWG_INSTALLED\', true);</pre>' 612 l10n('all sub-categories of private categories become private'), 613 l10n('user permissions and group permissions have been erased'), 614 l10n('only thumbnails prefix and webmaster mail saved') 595 615 ) 596 616 ); 597 598 617 599 618 // now we upgrade from 1.4.0
Note: See TracChangeset
for help on using the changeset viewer.