Changeset 130677
- Timestamp:
- 06/30/2009 04:49:39 AM (17 years ago)
- Location:
- delete-revision
- Files:
-
- 9 added
- 3 deleted
- 5 edited
-
tags/1.3 (added)
-
tags/1.3/changelog.txt (added)
-
tags/1.3/delete-revision-zh_CN.mo (added)
-
tags/1.3/delete-revision-zh_CN.po (added)
-
tags/1.3/delete-revision.php (added)
-
tags/1.3/readme.txt (added)
-
tags/1.3/screenshot-1.png (added)
-
tags/1.3/screenshot-2.png (added)
-
tags/1.3/screenshot-3.png (added)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/delete-revision-zh_CN.mo (modified) (previous)
-
trunk/delete-revision-zh_CN.po (modified) (4 diffs)
-
trunk/delete-revision.php (modified) (10 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/screenshot1.png (deleted)
-
trunk/screenshot2.png (deleted)
-
trunk/screenshot3.png (deleted)
Legend:
- Unmodified
- Added
- Removed
-
delete-revision/trunk/changelog.txt
r75584 r130677 1 2009-06-30 v1.3 2 Increased the database maintenance and the optimization 3 增加数据库状态检测和修复优化 4 1 5 2008-11-24 v1.2 2 6 An increase of the international language support 3 Ôö¼Ó¹ú¼Ê»¯ÓïÑÔÖ§³Ö7 增加国际化语言支持 4 8 5 9 2008-11-24 v1.1 6 10 Fix bugs cann't runat where the datebase name is not the default "wp-*" and some description. 7 ÐÞ¸´ÁËÒòÊý¾Ý¿âÃû³ÆÇ°×º·ÇĬÈϵÄ"wp-*"ʱµÄÔËÐдíÎóºÍ×ÊÁÏÖÐ˵Ã÷ÖÐÊý×ÖÎÊÌâ¡£11 修复了因数据库名称前缀非默认的"wp-*"时的运行错误和资料中说明中数字问题。 8 12 2008-10-21 v1.0 9 13 First public ver1.0 10 Ê״η¢²¼1.014 首次发布1.0 -
delete-revision/trunk/delete-revision-zh_CN.po
r75584 r130677 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2008-11-24 17:51+0800\n" 6 "PO-Revision-Date: 200 8-11-24 18:27+0800\n"7 "Last-Translator: gohsy <igohsy@gmail.com>\n"6 "PO-Revision-Date: 2009-06-30 12:44+0800\n" 7 "Last-Translator: gohsy.com <me@gohsy.com>\n" 8 8 "Language-Team: gohsy <[email protected]>\n" 9 9 "MIME-Version: 1.0\n" … … 17 17 #: delete-revision.php:32 18 18 #, php-format 19 msgid "Now You have <span style='color:red;font-weight:bolder;'> %s </span> posts ,Up to now Delete-Revision has deteted <span style='color:red;font-weight:bolder;'> %s </span> post revision of dedundancy,it's easy . Wish happy ending !"20 msgstr "您已经发布了 <span style='color:red;font-weight:bolder;'> %s </span> 篇日志,截止目前,Delete-Revision 已轻松删除了 <span style='color:red;font-weight:bolder;'> %s </span> 篇冗余日志,祝您愉快!"19 msgid "Now You have <span style='color:red;font-weight:bolder;'> %s </span> posts ,Up to now Delete-Revision has deteted <span id='revs_no' style='color:red;font-weight:bolder;'> %s </span> post revision of dedundancy,it's easy . Wish happy ending !" 20 msgstr "您已经发布了 <span style='color:red;font-weight:bolder;'> %s </span> 篇日志,截止目前,Delete-Revision 已轻松删除了 <span id='revs_no' style='color:red;font-weight:bolder;'> %s </span> 篇冗余日志,祝您愉快!" 21 21 22 22 #: delete-revision.php:41 … … 27 27 #: delete-revision.php:51 28 28 msgid "Check Redundant Revision" 29 msgstr "检查冗余 Revision数量"29 msgstr "检查冗余 日志 数量" 30 30 31 31 #: delete-revision.php:57 … … 62 62 msgstr "太棒了,您的wordpress还没有发现冗余的 revision 日志 ! <br />今天又是您美好的一天 !" 63 63 64 msgid "Optimize DataBase" 65 msgstr "执行数据库优化" 66 67 msgid "If the Status is green <font color=green>OK</font>, then indicated that is normal, does not need any operation, please go back; If is red, then click on the following button to optimize." 68 msgstr "如果Status是绿色的<font color=green>OK</font>,则表明是正常的,不需要任何操作,请返回。如果是红色的,请点击下来的按钮执行优化。" 69 70 msgid "Optimization of database completed." 71 msgstr "优化数据库操作完成!" 72 73 msgid "Database Optimization" 74 msgstr "检测数据库和优化" 75 -
delete-revision/trunk/delete-revision.php
r75584 r130677 5 5 Description: Delete revision post from Database,let us now to drop Redundancy, lose weight ! 6 6 Author: gohsy 7 Version: 1. 27 Version: 1.3 8 8 Author URI: http://gohsy.com 9 9 */ … … 11 11 /* 12 12 Changelog 13 14 2009-06-30 v1.3 15 Increased the database maintenance and the optimization 16 Ôö¼ÓÊý¾Ý¿â״̬¼ì²âºÍÐÞ¸´ÓÅ»¯ 13 17 14 18 2008-11-24 v1.2 … … 41 45 42 46 function my_options_delete_revision() { 43 $dr_ver = 1. 1;47 $dr_ver = 1.3; 44 48 $get_my_posts = get_my_posts(); 45 49 $del_revision_no = get_option('del_revision_no'); … … 47 51 <div class="wrap"> 48 52 <h2>Delete-revision Manager <font size=1>ver $dr_ver</font></h2> 49 <div style="padding:5px 0;border:1px dashed #80B5D0;padding:10px;background:#E4F2FD;margin:15px 0;">53 <div class="widget"><p style="margin:10px;"> 50 54 EOT; 51 printf(__("Now You have <span style='color:red;font-weight:bolder;'> %s </span> posts ,Up to now Delete-Revision has deteted <span style='color:red;font-weight:bolder;'> %s </span> post revision of dedundancy,it's easy . Wish happy ending !",'delete-revision'), $get_my_posts,$del_revision_no); 52 echo '</div>'; 53 54 55 printf(__("Now You have <span style='color:red;font-weight:bolder;'> %s </span> posts ,Up to now Delete-Revision has deteted <span id='revs_no' style='color:red;font-weight:bolder;'> %s </span> post revision of dedundancy,it's easy . Wish happy ending !",'delete-revision'), $get_my_posts,$del_revision_no); 56 echo '</p></div>'; 57 55 58 if (isset($_POST['del_act'])) { 56 59 delete_revision_act(); … … 59 62 echo '<div class="updated" style="margin-top:50px;"><p><strong>'; 60 63 printf(__("Deleted <span style='color:red;font-weight:bolder;'> %s </span> redundancy posts !",'delete-revision'),$del_no); 61 echo '</strong></p></div></div>'; 64 echo "</strong></p></div></div><script> 65 var del_no = document.getElementById('revs_no').innerHTML; 66 document.getElementById('revs_no').innerHTML = Number(del_no)+ $del_no; 67 </script>"; 62 68 } 63 69 elseif (isset($_POST['get_rev'])) { … … 65 71 66 72 } 73 elseif (isset($_POST['maintain_mysql'])) { 74 if ($_POST['operation'] == 'OPTIMIZE' ) {echo maintain_mysql('OPTIMIZE');} 75 else echo maintain_mysql('ANALYZE'); 76 } 67 77 else { 68 78 echo '<form method="post" action="">'; 69 echo '<input type="submit" name="get_rev" value="';79 echo '<input class="button" type="submit" name="get_rev" value="'; 70 80 _e('Check Redundant Revision','delete-revision'); 81 echo '" /> <input class="button" type="submit" name="maintain_mysql" value="'; 82 _e('Database Optimization','delete-revision'); 71 83 echo '" /></form></div>'; 72 84 73 85 } 74 86 75 echo '< div style="line-height:22px;padding:5px 0;border:1px dashed #80B5D0;padding:10px;background:#E4F2FD;margin:15px;">';87 echo '<br /><div class="widget"><div style="margin:12px;line-height: 1.5em;">'; 76 88 _e('Revision Post is in the 2.6 version of WordPress after the automatic accession to the revised edition of the journal preservation cause, you modify a log of each, will add a revision, if you modify many times, log on the few speeches, it will be a very frightening number!','delete-revision'); 77 //echo '<br />';78 89 _e('If you have 100 on the log, your revisiong redundancy may be as many as 1,000 articles!','delete-revision'); 79 90 echo '<br />'; … … 82 93 _e('Thank you for your useing. I hope this will give you convenient plug-ins!','delete-revision'); 83 94 _e('Author','delete-revision'); 84 echo ':<a href="http://www.gohsy.com" target="_blank">http://www.gohsy.com</a></div> ';95 echo ':<a href="http://www.gohsy.com" target="_blank">http://www.gohsy.com</a></div></div>'; 85 96 86 97 } … … 110 121 if($results) { 111 122 $res_no = count($results); 112 echo "<table >";113 echo "<tr style=\"background:#C6D9E9\"><td width=30> Id </td><td width=450> Title </td><td width=180> Post date </td><td width=180> Last modified </td></tr>";123 echo "<table class='widefat'><thead>"; 124 echo "<tr><th width=30> Id </th><th width=450> Title </th><th width=180> Post date </th><th width=180> Last modified </th></tr></thead>"; 114 125 for($i = 0 ; $i < $res_no ; $i++) { 115 126 echo "<tr><td>".$results[$i] -> ID."</td>"; … … 123 134 <input type="hidden" name="rev_no" value=" $res_no " /> 124 135 EOT; 125 echo '<input type="submit" name="del_act" value="';126 printf(__('Yes ,I would like to delete them!(A Total Of %s)','delete-revision'),$res_no);127 echo '" /><input type="submit" name="goback" value="';128 _e('No ,I would not mind deleted!','delete-revision');136 echo '<input class="button" type="submit" name="del_act" value="'; 137 printf(__('Yes , I would like to delete them!(A Total Of %s)','delete-revision'),$res_no); 138 echo '" /><input class="button" type="submit" name="goback" value="'; 139 _e('No , I would not mind deleted!','delete-revision'); 129 140 echo '" /></form></div>'; 130 141 … … 144 155 } 145 156 157 function maintain_mysql($operation = "ANALYZE"){ 158 global $wpdb; 159 160 $Tables = $wpdb -> get_results('SHOW TABLES IN '.DB_NAME); 161 $query = "$operation TABLE "; 162 163 $Tables_in_DB_NAME = 'Tables_in_'.DB_NAME; 164 foreach($Tables as $k=>$v){ 165 $_tabName = $v -> $Tables_in_DB_NAME ; 166 $query .= " `$_tabName`,"; 167 } 168 169 $query = substr($query,0,strlen($query)-1); 170 $result = $wpdb -> get_results($query); 171 if ($operation == "OPTIMIZE") { 172 return '<h3>'.__('Optimization of database completed.','delete-revision').'</h3>'; 173 } 174 175 $res = "<table border=\"0\" class=\"widefat\">"; 176 $res .= "<thead><tr> 177 <th>Table</th> 178 <th>OP</th> 179 <th>Status</th> 180 </tr><thead>"; 181 $bgcolor = $color3; 182 foreach($result as $j=>$o) { 183 $res .= "<tr>"; 184 foreach ($o as $k=>$v) { 185 $tdClass = $j%2 == 1 ? 'active alt' : 'inactive'; 186 if($k == 'Msg_type') continue; 187 if($k == 'Msg_text' ) { 188 if ($v == 'OK') { 189 $res .= "<td class='$tdClass' ><font color='green'><b>$v</b></font></td>"; 190 } 191 else { 192 $res .= "<td class='$tdClass' ><font color='red'><b>$v</b></font></td>"; 193 } 194 } 195 else $res .= "<td class='$tdClass' >$v</td>"; 196 } 197 $res .= "</tr>"; 198 } 199 $res .= "<tfoot><tr><th colspan=3>".__('If the Status is green <font color=green>OK</font>, then indicated that is normal, does not need any operation, please go back; If is red, then click on the following button to optimize.','delete-revision')."</th></tr></tfoot></table>"; 200 $res .= "<br /><form method='post' action=''> 201 <input name='operation' type='hidden' value='OPTIMIZE' /> 202 <input name='maintain_mysql' type='hidden' value='OPTIMIZE' /> 203 <input name='submit' type='submit' class='button' value='".__('Optimize DataBase','delete-revision')."' /></form>"; 204 return $res; 205 } 206 146 207 ?> -
delete-revision/trunk/readme.txt
r75584 r130677 5 5 Tags:revision,posts,datebase,Redundancy 6 6 Requires at least:2.6.X 7 Tested up to:1. 28 Stable tag:1. 27 Tested up to:1.3 8 Stable tag:1.3 9 9 10 10 Delete revision post from Database,let us now to drop Redundancy, lose weight ! … … 30 30 == Contributors/Changelog == 31 31 32 2009-06-30 v1.3 33 Increased the database maintenance and the optimization 34 增加数据库状态检测和修复优化 35 36 32 37 2008-11-24 v1.2 33 38 An increase of the international language support 34 Ôö¼Ó¹ú¼Ê»¯ÓïÑÔÖ§³Ö39 增加国际化语言支持 35 40 36 41 2008-11-24 v1.1 37 42 Fix bugs cann't runat where the datebase name is not the default "wp-*" and some description. 38 ÐÞ¸´ÁËÒòÊý¾Ý¿âÃû³ÆÇ°×º·ÇĬÈϵÄ"wp-*"ʱµÄÔËÐдíÎóºÍ×ÊÁÏÖÐ˵Ã÷ÖÐÊý×ÖÎÊÌâ¡£43 修复了因数据库名称前缀非默认的"wp-*"时的运行错误和资料中说明中数字问题。 39 44 2008-10-21 v1.0 40 45 First public ver1.0 41 Ê״η¢²¼1.046 首次发布1.0 42 47 43 48 == Frequently Asked Questions ==
Note: See TracChangeset
for help on using the changeset viewer.