Plugin Directory

Changeset 1099127


Ignore:
Timestamp:
02/25/2015 10:59:13 AM (11 years ago)
Author:
kushsharma
Message:

Option to update database table charset utf8

Location:
kush-micro-news/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kush-micro-news/trunk/includes/admin.php

    r1084839 r1099127  
    2424$what='';
    2525//$_POST = array_map('stripslashes_deep', $_POST['myRename']);
     26
    2627if(isset($_POST['valSub']))
    2728{
     
    238239        <br><hr>
    239240        Download Backup of your Micro News data : <a href="?backup=true" target="_blank" class="button-primary">Download</a>
     241
     242
     243        <br><hr>
     244        Update table storage(to support utf-8 charset): <a href="?updatedb=true" target="_blank" class="button-primary">Update</a>
     245        <h5 style="display:inline-block;margin:0;">Create a backup first.</h5>
    240246    </form>
    241247    <br><br>
     
    255261</script>
    256262<?php
     263}
     264
     265if(isset($_GET['updatedb']) && $_GET['updatedb']=='true')
     266    update_table();
     267function update_table(){
     268    global $wpdb;
     269    $table_name = $wpdb->prefix . "kushmicronews";
     270           
     271    $rows_affected = $wpdb->query("ALTER TABLE `$table_name` CONVERT TO CHARACTER SET utf8");
     272    if($rows_affected == 1)
     273        echo 'Updated Successfully!';
     274               
    257275}
    258276
  • kush-micro-news/trunk/index.php

    r1084839 r1099127  
    33Plugin Name: Kush Micro News
    44Description: Spread the news in shortest possible way. Use links to refer data and title to concise it.
    5 Version: 1.5.2
     5Version: 1.5.3
    66Author: Kush Sharma
    77Author Email: thekushsharma@gmail.com
    88Author URI: http://softnuke.com/
    99Plugin URI: https://github.com/kushsharma/micro-news
    10 Last Officially Updated: 08 Feb 2015
     10Last Officially Updated: 25 Feb 2015
    1111*/
    1212
  • kush-micro-news/trunk/readme.txt

    r1084839 r1099127  
    44Tags: post,news,micro,short,share,link,kush,refer,concise,fast
    55Requires at least: 3.0.1
    6 Tested up to: 4.1
    7 Stable tag: 1.5.2
     6Tested up to: 4.2
     7Stable tag: 1.5.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8383
    8484== Changelog ==
     85
     86= 1.5.3 =
     87* Added option: Update database table to charset UTF8.
    8588
    8689= 1.5.2 =
Note: See TracChangeset for help on using the changeset viewer.