Changeset 13163
- Timestamp:
- 01/05/12 11:59:43 (1 year ago)
- Files:
-
- modules/branches/2.9 (modified) (2 props)
- modules/branches/2.9/framework/install.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9
- Property svn:mergeinfo set to /modules/branches/2.10:13090,13103-13104,13106
- Property svnmerge-integrated changed from /modules/branches/2.10:1-12085,13055,13061,13067,13069 /modules/branches/2.8:1-12454 /modules/branches/bootstrap-2.9:1-10853 to /modules/branches/2.10:1-12085,13055,13061,13067,13069,13090,13097-13100,13103-13104,13106 /modules/branches/2.8:1-12454 /modules/branches/bootstrap-2.9:1-10853
modules/branches/2.9/framework/install.php
r11484 r13163 1 1 <?php 2 3 2 // HELPER FUNCTIONS: 4 3 … … 73 72 */ 74 73 75 $htdocs_source = dirname(__FILE__)."/htdocs/*"; 76 $bin_source = dirname(__FILE__)."/bin/*"; 77 $agibin_source = dirname(__FILE__)."/agi-bin/*"; 74 $base_source = dirname(__FILE__); 75 $htdocs_source = $base_source . "/htdocs/*"; 76 $bin_source = $base_source . "/bin/*"; 77 $agibin_source = $base_source . "/agi-bin/*"; 78 78 79 79 if (!file_exists(dirname($htdocs_source))) { … … 91 91 $agibin_dest = isset($asterisk_conf['astagidir']) ? $asterisk_conf['astagidir']:'/var/lib/asterisk/agi-bin'; 92 92 93 $msg = _("installing files to %s.."); 94 95 $out = array(); 96 outn(sprintf($msg, $htdocs_dest)); 93 97 exec("cp -rf $htdocs_source $htdocs_dest 2>&1",$out,$ret); 94 98 if ($ret != 0) { 95 99 framework_print_errors($htdocs_source, $htdocs_dest, $out); 100 out(_("done, see errors below")); 101 } else { 102 out(_("done")); 96 103 } 97 104 105 106 unset($out); 107 outn(sprintf($msg, $bin_dest)); 98 108 exec("cp -rf $bin_source $bin_dest 2>&1",$out,$ret); 99 109 if ($ret != 0) { 100 110 framework_print_errors($bin_source, $bin_dest, $out); 111 out(_("done, see errors below")); 112 } else { 113 out(_("done")); 101 114 } 102 115 116 unset($out); 117 outn(sprintf($msg, $agibin_dest)); 103 118 exec("cp -rf $agibin_source $agibin_dest 2>&1",$out,$ret); 104 119 if ($ret != 0) { 105 120 framework_print_errors($agibin_source, $agibin_dest, $out); 121 out(_("done, see errors below")); 122 } else { 123 out(_("done")); 106 124 } 107 125 … … 126 144 } 127 145 146 // We now delete the files, this makes sure that if someone had an unprotected system where they have not enabled 147 // the .htaccess files or otherwise allowed direct access, that these files are not around to possibly cause problems 148 // 149 out(_("framework file install done, removing packages from module")); 150 151 $base_source = dirname(__FILE__); 152 $htdocs_source = $base_source . "/htdocs/*"; 153 $bin_source = $base_source . "/bin/*"; 154 $agibin_source = $base_source . "/agi-bin/*"; 155 156 $rem_files[] = $base_source . '/htdocs'; 157 $rem_files[] = $base_source . '/bin'; 158 $rem_files[] = $base_source . '/agi-bin'; 159 $rem_files[] = $base_source . '/upgrades'; 160 $rem_files[] = $base_source . '/libfreepbx.install.php'; 161 162 foreach ($rem_files as $target) { 163 unset($out); 164 exec("rm -rf $target 2>&1",$out,$ret); 165 if ($ret != 0) { 166 out(sprintf(_("an error occured removing the packaged file/directory: %s"), $target)); 167 } else { 168 out(sprintf(_("file/directory: %s removed successfully"), $target)); 169 } 170 } 171 128 172 ?>
