Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 07c07be

Browse files
committed
ENH: refs #0278. Changing Latin1 and iso-8859 to UTF8.
This did require removing the unique key from the assetstore table.
1 parent a6081f9 commit 07c07be

File tree

17 files changed

+67
-96
lines changed

17 files changed

+67
-96
lines changed

core/AppController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AppController extends MIDAS_GlobalController
2424
public function preDispatch()
2525
{
2626
parent::preDispatch();
27-
$this->view->setEncoding('iso-8859-1');
27+
$this->view->setEncoding('UTF-8');
2828

2929
$this->view->setScriptPath(BASE_PATH."/core/views");
3030

core/controllers/DownloadController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public function indexAction()
7878
{
7979
continue;
8080
}
81-
8281
$this->Item->incrementDownloadCount($item);
8382
if(isset($tmp[1]))
8483
{

core/controllers/UserController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function make_seed_recoverpass()
116116
$text .= "Your new password is: ".$pass."<br>";
117117
$text .= "<br><br>Generated by MIDAS";
118118

119-
if($this->isTestingEnv() || mail("$email", "MIDAS: Password request", "$text", "From: \nReply-To: no-reply\nX-Mailer: PHP/" . phpversion()."\nMIME-Version: 1.0\nContent-type: text/html; charset = iso-8859-1"))
119+
if($this->isTestingEnv() || mail("$email", "MIDAS: Password request", "$text", "From: \nReply-To: no-reply\nX-Mailer: PHP/" . phpversion()."\nMIME-Version: 1.0\nContent-type: text/html; charset = UTF-8"))
120120
{
121121
$this->User->save($user);
122122
echo JsonComponent::encode(array(true, $this->t('An Email has been sent to').' '.$email));

core/controllers/components/UtilityComponent.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static public function md5file($filename)
138138

139139

140140
/**
141-
* Check ifthe php function/extension are available
141+
* Check if the php function/extension are available
142142
*
143143
* $phpextensions should have the following format:
144144
* array(
@@ -211,7 +211,7 @@ static function isImageMagickWorking()
211211
$text = "<b>ImageMagick</b> (>=6.0) is not found. Please install imagemagick from http://www.imagemagick.org";
212212
return array(false, $text);
213213
}
214-
/** format filz size*/
214+
/** format file size*/
215215
static public function formatSize($sizeInByte)
216216
{
217217
$dataNorme = 'B';
@@ -268,7 +268,7 @@ static function run_mysql_from_file($sqlfile, $host, $username, $password, $dbna
268268

269269
$reqs = explode(";", $requetes);
270270
foreach($reqs as $req)
271-
{// et on les éxécute
271+
{// And they are executed
272272
if(!mysql_query($req, $db) && trim($req) != "")
273273
{
274274
throw new Zend_Exception("Unable to execute: ".$req );

core/database/mysql/3.0.1.sql

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CREATE TABLE IF NOT EXISTS `assetstore` (
2626
`type` tinyint(4) NOT NULL,
2727
PRIMARY KEY (`assetstore_id`),
2828
UNIQUE KEY `path` (`path`,`type`)
29-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
29+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
3030

3131

3232
-- --------------------------------------------------------
@@ -47,7 +47,7 @@ CREATE TABLE IF NOT EXISTS `bitstream` (
4747
`date` timestamp NOT NULL,
4848
PRIMARY KEY (`bitstream_id`),
4949
KEY `itemrevision_id` (`itemrevision_id`)
50-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=680 ;
50+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=680 ;
5151

5252
-- --------------------------------------------------------
5353

@@ -70,7 +70,7 @@ CREATE TABLE IF NOT EXISTS `community` (
7070
`view` bigint(20) NOT NULL DEFAULT '0',
7171
PRIMARY KEY (`community_id`),
7272
KEY `name` (`name`)
73-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
73+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
7474

7575
-- --------------------------------------------------------
7676

@@ -85,7 +85,7 @@ CREATE TABLE IF NOT EXISTS `errorlog` (
8585
`message` text NOT NULL,
8686
`datetime` timestamp NULL DEFAULT NULL ,
8787
PRIMARY KEY (`errorlog_id`)
88-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
88+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
8989

9090
-- --------------------------------------------------------
9191

@@ -104,7 +104,7 @@ CREATE TABLE IF NOT EXISTS `folder` (
104104
`view` bigint(20) NOT NULL DEFAULT '0',
105105
PRIMARY KEY (`folder_id`),
106106
KEY `parent_id` (`parent_id`)
107-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Describes a directory' AUTO_INCREMENT=23 ;
107+
) DEFAULT CHARSET=utf8 COMMENT='Describes a directory' AUTO_INCREMENT=23 ;
108108

109109
-- --------------------------------------------------------
110110

@@ -118,7 +118,7 @@ CREATE TABLE IF NOT EXISTS `folderpolicygroup` (
118118
`policy` tinyint(4) NOT NULL,
119119
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP(),
120120
UNIQUE KEY `folder_id` (`folder_id`,`group_id`)
121-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
121+
) DEFAULT CHARSET=utf8;
122122

123123
-- --------------------------------------------------------
124124

@@ -132,7 +132,7 @@ CREATE TABLE IF NOT EXISTS `folderpolicyuser` (
132132
`policy` tinyint(4) NOT NULL,
133133
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP(),
134134
UNIQUE KEY `folder_id` (`folder_id`,`user_id`)
135-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
135+
) DEFAULT CHARSET=utf8;
136136

137137
-- --------------------------------------------------------
138138

@@ -146,7 +146,7 @@ CREATE TABLE IF NOT EXISTS `group` (
146146
`name` varchar(255) NOT NULL,
147147
PRIMARY KEY (`group_id`),
148148
KEY `community_id` (`community_id`)
149-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
149+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
150150

151151
INSERT INTO `group` (group_id,community_id,name) VALUES (0,0,'Anonymous');
152152
-- --------------------------------------------------------
@@ -166,7 +166,7 @@ CREATE TABLE IF NOT EXISTS `item` (
166166
`download` bigint(20) NOT NULL DEFAULT '0',
167167
`sizebytes` BIGINT( 20 ) NOT NULL DEFAULT '0',
168168
PRIMARY KEY (`item_id`)
169-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=37 ;
169+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=37 ;
170170

171171
-- --------------------------------------------------------
172172

@@ -180,7 +180,7 @@ CREATE TABLE IF NOT EXISTS `itempolicygroup` (
180180
`policy` tinyint(4) NOT NULL,
181181
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP(),
182182
UNIQUE KEY `item_id` (`item_id`,`group_id`)
183-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
183+
) DEFAULT CHARSET=utf8;
184184

185185
-- --------------------------------------------------------
186186

@@ -194,7 +194,7 @@ CREATE TABLE IF NOT EXISTS `itempolicyuser` (
194194
`policy` tinyint(4) NOT NULL,
195195
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP(),
196196
UNIQUE KEY `item_id` (`item_id`,`user_id`)
197-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
197+
) DEFAULT CHARSET=utf8;
198198

199199
-- --------------------------------------------------------
200200

@@ -205,7 +205,7 @@ CREATE TABLE IF NOT EXISTS `itempolicyuser` (
205205
CREATE TABLE IF NOT EXISTS `item2folder` (
206206
`item_id` bigint(20) NOT NULL,
207207
`folder_id` bigint(20) NOT NULL
208-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
208+
) DEFAULT CHARSET=utf8;
209209

210210
-- --------------------------------------------------------
211211

@@ -217,7 +217,7 @@ CREATE TABLE IF NOT EXISTS `item2keyword` (
217217
`item_id` bigint(20) NOT NULL,
218218
`keyword_id` bigint(20) NOT NULL,
219219
UNIQUE KEY `item_id` (`item_id`,`keyword_id`)
220-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
220+
) DEFAULT CHARSET=utf8;
221221

222222
-- --------------------------------------------------------
223223

@@ -236,7 +236,7 @@ CREATE TABLE IF NOT EXISTS `itemrevision` (
236236
UNIQUE KEY `item_id` (`item_id`,`revision`),
237237
KEY `user_id` (`user_id`),
238238
KEY `date` (`date`)
239-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=685 ;
239+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=685 ;
240240

241241
-- --------------------------------------------------------
242242

@@ -251,7 +251,7 @@ CREATE TABLE IF NOT EXISTS `itemkeyword` (
251251
PRIMARY KEY (`keyword_id`),
252252
UNIQUE KEY `value` (`value`),
253253
KEY `relevance` (`relevance`)
254-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
254+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
255255

256256
-- --------------------------------------------------------
257257

@@ -267,7 +267,7 @@ CREATE TABLE IF NOT EXISTS `metadata` (
267267
`description` varchar(512) NOT NULL,
268268
PRIMARY KEY (`metadata_id`),
269269
KEY `metadatatype_id` (`metadatatype_id`)
270-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
270+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
271271

272272
-- --------------------------------------------------------
273273

@@ -282,7 +282,7 @@ CREATE TABLE IF NOT EXISTS `metadatadocumentvalue` (
282282
KEY `metadata_id` (`metadata_id`),
283283
KEY `itemrevision_id` (`itemrevision_id`),
284284
KEY `value` (`value`(1000))
285-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
285+
) DEFAULT CHARSET=utf8;
286286

287287
-- --------------------------------------------------------
288288

@@ -294,7 +294,7 @@ CREATE TABLE IF NOT EXISTS `metadatatype` (
294294
`metadatatype_id` int(11) NOT NULL AUTO_INCREMENT,
295295
`name` varchar(255) NOT NULL,
296296
PRIMARY KEY (`metadatatype_id`)
297-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
297+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
298298

299299
-- --------------------------------------------------------
300300

@@ -308,7 +308,7 @@ CREATE TABLE IF NOT EXISTS `metadatavalue` (
308308
`value` varchar(1024) NOT NULL,
309309
KEY `metadata_id` (`metadata_id`,`itemrevision_id`),
310310
KEY `value` (`value`(1000))
311-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
311+
) DEFAULT CHARSET=utf8;
312312

313313
-- --------------------------------------------------------
314314

@@ -333,7 +333,7 @@ CREATE TABLE IF NOT EXISTS `user` (
333333
`view` bigint(20) NOT NULL DEFAULT '0',
334334
PRIMARY KEY (`user_id`),
335335
KEY `email` (`email`)
336-
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
336+
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
337337

338338

339339
-- --------------------------------------------------------
@@ -346,7 +346,7 @@ CREATE TABLE IF NOT EXISTS `user2group` (
346346
`user_id` bigint(20) NOT NULL,
347347
`group_id` bigint(20) NOT NULL,
348348
UNIQUE KEY `user_id` (`user_id`,`group_id`)
349-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
349+
) DEFAULT CHARSET=utf8;
350350

351351

352352

@@ -363,7 +363,7 @@ CREATE TABLE IF NOT EXISTS `feed` (
363363
`type` int NOT NULL,
364364
`ressource` varchar(255) NOT NULL,
365365
PRIMARY KEY (`feed_id`)
366-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
366+
) DEFAULT CHARSET=utf8;
367367

368368

369369
-- --------------------------------------------------------
@@ -376,7 +376,7 @@ CREATE TABLE IF NOT EXISTS `feed2community` (
376376
`feed_id` bigint(20) NOT NULL,
377377
`community_id` bigint(20) NOT NULL,
378378
UNIQUE KEY `feed_id` (`feed_id`,`community_id`)
379-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
379+
) DEFAULT CHARSET=utf8;
380380

381381

382382
-- --------------------------------------------------------
@@ -391,7 +391,7 @@ CREATE TABLE IF NOT EXISTS `feedpolicygroup` (
391391
`policy` tinyint(4) NOT NULL,
392392
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP(),
393393
UNIQUE KEY `feed_id` (`feed_id`,`group_id`)
394-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
394+
) DEFAULT CHARSET=utf8;
395395

396396
-- --------------------------------------------------------
397397

@@ -405,4 +405,4 @@ CREATE TABLE IF NOT EXISTS `feedpolicyuser` (
405405
`policy` tinyint(4) NOT NULL,
406406
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP(),
407407
UNIQUE KEY `feed_id` (`feed_id`,`user_id`)
408-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
408+
) DEFAULT CHARSET=utf8;

0 commit comments

Comments
 (0)