Changeset 3175
- Timestamp:
- 08/26/13 14:06:55 (10 years ago)
- Location:
- plugins/fakemeup
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/fakemeup/_define.php
r3173 r3175 16 16 /* Description*/ "Fakes Dotclear digest to force automatic updates", 17 17 /* Author */ "Bruno Hondelatte", 18 /* Version */ '1. 3',18 /* Version */ '1.4', 19 19 /* Permissions */ 'admin' 20 20 ); -
plugins/fakemeup/index.php
r3173 r3175 19 19 throw new Exception(__('Unable to read digests file.')); 20 20 } 21 21 22 22 $opts = FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES; 23 23 $contents = file($digests_file,$opts); 24 24 25 25 $changed = array(); 26 26 $same = array(); 27 27 $removed = array(); 28 28 29 29 foreach ($contents as $digest) 30 30 { … … 32 32 continue; 33 33 } 34 34 35 35 $md5 = $m[1]; 36 36 $filename = $root.'/'.$m[2]; 37 37 38 38 # Invalid checksum 39 39 if (is_readable($filename)) { … … 47 47 $removed[$m[2]] = true; 48 48 } 49 50 } 51 49 50 } 51 52 52 # No checksum found in digests file 53 53 if (empty($md5)) { 54 54 throw new Exception(__('Invalid digests file.')); 55 55 } 56 56 57 57 return array("same"=>$same,"changed"=>$changed,"removed" => $removed); 58 58 } … … 110 110 ?> 111 111 <html> 112 <head><title><?php echo __('Fake Me Up'); ?></title></head> 112 <head><title><?php echo __('Fake Me Up'); ?></title> 113 <style type="text/css"> 114 .message h3 { 115 color:#fff; 116 } 117 </style> 118 </head> 113 119 <body> 114 120 <?php 115 121 global $_lang; 116 122 117 123 echo '<h2>'.__('Fake Me Up').'</h2>'; 118 124 if (isset($_POST['erase_backup'])) { … … 174 180 echo '<div class="error"><p>'.__('Fake Me Up has already been run once.').'</p>'. 175 181 '<form action="'.$p_url.'" method="post">'. 176 '<p><input type="checkbox" name="erase_backup" id="erase_backup" /> '.177 '<label for=" confirm" class="inline">'.__("Remove the backup digest file, I want to play again").'</label>'.182 '<p><input type="checkbox" name="erase_backup" id="erase_backup" class="inline" /> '. 183 '<label for="erase_backup" class="inline">'.__("Remove the backup digest file, I want to play again").'</label>'. 178 184 $core->formNonce(). 179 185 '</p>'. … … 186 192 echo '<form action="'.$p_url.'" method="post">'. 187 193 '<p><input type="checkbox" name="disclaimer_ok" id="disclaimer_ok" /> '. 188 '<label for=" confirm" class="inline">'.__("I have read and understood the disclaimer and wish to continue anyway").'</label>'.194 '<label for="disclaimer_ok" class="inline">'.__("I have read and understood the disclaimer and wish to continue anyway").'</label>'. 189 195 $core->formNonce(). 190 196 '</p>'.
Note: See TracChangeset
for help on using the changeset viewer.