diff --git a/newscoop/application/modules/admin/views/scripts/comment-action.phtml b/newscoop/application/modules/admin/views/scripts/comment-action.phtml
deleted file mode 100644
index 4021165f7c..0000000000
--- a/newscoop/application/modules/admin/views/scripts/comment-action.phtml
+++ /dev/null
@@ -1,19 +0,0 @@
-
\ No newline at end of file
diff --git a/newscoop/application/modules/admin/views/scripts/comment-article.phtml b/newscoop/application/modules/admin/views/scripts/comment-article.phtml
deleted file mode 100644
index 0e8dd0cbe0..0000000000
--- a/newscoop/application/modules/admin/views/scripts/comment-article.phtml
+++ /dev/null
@@ -1,7 +0,0 @@
-
\ No newline at end of file
diff --git a/newscoop/application/modules/admin/views/scripts/comment-commenter.phtml b/newscoop/application/modules/admin/views/scripts/comment-commenter.phtml
deleted file mode 100644
index c266a0f35a..0000000000
--- a/newscoop/application/modules/admin/views/scripts/comment-commenter.phtml
+++ /dev/null
@@ -1,10 +0,0 @@
-
\ No newline at end of file
diff --git a/newscoop/application/modules/admin/views/scripts/comment-index.phtml b/newscoop/application/modules/admin/views/scripts/comment-index.phtml
deleted file mode 100644
index f2533b094c..0000000000
--- a/newscoop/application/modules/admin/views/scripts/comment-index.phtml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-index; ?>.
-
\ No newline at end of file
diff --git a/newscoop/application/modules/admin/views/scripts/comment-message.phtml b/newscoop/application/modules/admin/views/scripts/comment-message.phtml
deleted file mode 100644
index b5edd44795..0000000000
--- a/newscoop/application/modules/admin/views/scripts/comment-message.phtml
+++ /dev/null
@@ -1,51 +0,0 @@
-getService('translator'); ?>
-
-
-
diff --git a/newscoop/application/modules/admin/views/scripts/moderate-body-comment.phtml b/newscoop/application/modules/admin/views/scripts/moderate-body-comment.phtml
deleted file mode 100644
index 1e89798e25..0000000000
--- a/newscoop/application/modules/admin/views/scripts/moderate-body-comment.phtml
+++ /dev/null
@@ -1,9 +0,0 @@
-getService('translator'); ?>
-trans('New comment added', array(), 'home');?>
-
-trans('Time created', array(), 'home');?>
-comment->getTimeCreated()->format('H:i:s');?>
-trans('Subject');?>:
-comment->getSubject(); ?>
-trans('Comment');?>
-comment->getMessage(); ?>
diff --git a/newscoop/application/modules/admin/views/scripts/moderate-subject-comment.phtml b/newscoop/application/modules/admin/views/scripts/moderate-subject-comment.phtml
deleted file mode 100644
index 6ac64595e7..0000000000
--- a/newscoop/application/modules/admin/views/scripts/moderate-subject-comment.phtml
+++ /dev/null
@@ -1,4 +0,0 @@
-getService('translator'); ?>
-trans('New comment added', array(), 'home');?>
-trans('Subject');?>:
-comment->getSubject(); ?>
\ No newline at end of file
diff --git a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-01-14/tables.sql b/newscoop/install/Resources/sql/upgrade/4.1.x/2013-01-14/tables.sql
deleted file mode 100644
index 373310918d..0000000000
--- a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-01-14/tables.sql
+++ /dev/null
@@ -1,10 +0,0 @@
-CREATE TABLE IF NOT EXISTS `user_topic` (
- `user_id` int(11) unsigned NOT NULL,
- `topic_id` int(11) unsigned NOT NULL,
- `topic_language` int(11) unsigned NOT NULL,
- PRIMARY KEY (`user_id`,`topic_id`,`topic_language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-ALTER TABLE `user_topic` DROP PRIMARY KEY;
-ALTER TABLE `user_topic` ADD `id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
-ALTER TABLE `user_topic` ADD UNIQUE `user_topic` (`user_id`, `topic_id`, `topic_language`);
diff --git a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-01-23/tables.sql b/newscoop/install/Resources/sql/upgrade/4.1.x/2013-01-23/tables.sql
deleted file mode 100644
index ae70c33e18..0000000000
--- a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-01-23/tables.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-ALTER TABLE `Articles` ADD `rating_enabled` TINYINT(1) DEFAULT 1;
-
-CREATE TABLE IF NOT EXISTS `user_identity` (
- `provider` varchar(80) NOT NULL,
- `provider_user_id` varchar(255) NOT NULL,
- `user_id` int(11) unsigned NOT NULL,
- PRIMARY KEY (`provider`, `provider_user_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-02-06/data-required.sql b/newscoop/install/Resources/sql/upgrade/4.1.x/2013-02-06/data-required.sql
deleted file mode 100644
index bb05a8ce62..0000000000
--- a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-02-06/data-required.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-
--- allowing the geo-locations search
-INSERT INTO SystemPreferences (varname, value) VALUES ('GeoSearchLocalGeonames','1');
-INSERT INTO SystemPreferences (varname, value) VALUES ('GeoSearchMapquestNominatim','1');
-
diff --git a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-04-12/data-required.sql b/newscoop/install/Resources/sql/upgrade/4.1.x/2013-04-12/data-required.sql
deleted file mode 100644
index ea1018badf..0000000000
--- a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-04-12/data-required.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-INSERT IGNORE INTO `Languages` (`Name`, `CodePage`, `OrigName`, `Code`, `Month1`, `Month2`, `Month3`, `Month4`, `Month5`, `Month6`, `Month7`, `Month8`, `Month9`, `Month10`, `Month11`, `Month12`, `WDay1`, `WDay2`, `WDay3`, `WDay4`, `WDay5`, `WDay6`, `WDay7`, `ShortMonth1`, `ShortMonth2`, `ShortMonth3`, `ShortMonth4`, `ShortMonth5`, `ShortMonth6`, `ShortMonth7`, `ShortMonth8`, `ShortMonth9`, `ShortMonth10`, `ShortMonth11`, `ShortMonth12`, `ShortWDay1`, `ShortWDay2`, `ShortWDay3`, `ShortWDay4`, `ShortWDay5`, `ShortWDay6`, `ShortWDay7`) VALUES
-('English (Britain)', 'ISO_8859-1', 'English (Britain)', 'en_GB', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
-('Kurdish', 'UTF-8', 'کوردی', 'ku', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''),
-('German (Austria)', 'ISO_8859-1', 'Deutsch (Österreich)', 'de_AT', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
diff --git a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-04-22/tables.sql b/newscoop/install/Resources/sql/upgrade/4.1.x/2013-04-22/tables.sql
deleted file mode 100644
index 25a8261362..0000000000
--- a/newscoop/install/Resources/sql/upgrade/4.1.x/2013-04-22/tables.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-ALTER TABLE `package` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `package` CHANGE `headline` `headline` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
-ALTER TABLE `package` CHANGE `description` `description` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
-ALTER TABLE `package` CHANGE `slug` `slug` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
diff --git a/newscoop/install/Resources/sql/upgrade/4.4.x/2015.03.19/init_order_in_playlists.php b/newscoop/install/Resources/sql/upgrade/4.4.x/2015.03.19/init_order_in_playlists.php
new file mode 100644
index 0000000000..c4326a5e95
--- /dev/null
+++ b/newscoop/install/Resources/sql/upgrade/4.4.x/2015.03.19/init_order_in_playlists.php
@@ -0,0 +1,91 @@
+register(new Silex\Provider\MonologServiceProvider(), array(
+ 'monolog.logfile' => $newscoopDir.'/log/upgrade.log',
+ 'monolog.level' => Logger::NOTICE,
+ 'monolog.name' => 'upgrade',
+));
+
+$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
+ 'db.options' => array(
+ 'driver' => 'pdo_mysql',
+ 'host' => $Campsite['db']['host'],
+ 'dbname' => $Campsite['db']['name'],
+ 'user' => $Campsite['db']['user'],
+ 'password' => $Campsite['db']['pass'],
+ 'port' => $Campsite['db']['port'],
+ 'charset' => 'utf8',
+ ),
+));
+
+$app->register(new DoctrineOrmServiceProvider(), array(
+ "orm.proxies_dir" => $newscoopDir."/library/Proxy",
+ "orm.auto_generate_proxies" => false,
+ "orm.proxies_namespace" => "Proxy",
+ "orm.em.options" => array(
+ "mappings" => array(
+ array(
+ "type" => "annotation",
+ "namespace" => "Newscoop\Entity",
+ "path" => $newscoopDir."/library/Newscoop/Entity",
+ "use_simple_annotation_reader" => false,
+ ),
+ array(
+ "type" => "annotation",
+ "namespace" => "Newscoop\NewscoopBundle\Entity",
+ "path" => $newscoopDir."/src/Newscoop/NewscoopBundle/Entity",
+ "use_simple_annotation_reader" => false,
+ ),
+ array(
+ "type" => "annotation",
+ "namespace" => "Newscoop\Package",
+ "path" => $newscoopDir."/library/Newscoop/Package",
+ "use_simple_annotation_reader" => false,
+ ),
+ array(
+ "type" => "annotation",
+ "namespace" => "Newscoop\Image",
+ "path" => $newscoopDir."/library/Newscoop/Image",
+ "use_simple_annotation_reader" => false,
+ ),
+ ),
+ ),
+));
+
+$logger = $app['monolog'];
+
+try {
+ $playlists = $app['orm.em']->getRepository('\Newscoop\Entity\Playlist')
+ ->findAll();
+
+ foreach ($playlists as $playlist) {
+ $playlistArticles = $app['orm.em']->getRepository('Newscoop\Entity\Playlist')
+ ->articles($playlist, null, true, null, null, false, true, 'id')
+ ->getResult();
+
+ $index = 0;
+ foreach ($playlistArticles as $article) {
+ $index++;
+ $article->setOrder($index);
+ }
+ $app['orm.em']->flush();
+ }
+} catch (\Exception $e) {
+ $msg = $e->getMessage();
+ $upgradeErrors[] = $msg;
+ $logger->addError($msg);
+ array_splice($upgradeErrors, 0, 0, array($msg));
+}
diff --git a/newscoop/install/Resources/sql/upgrade/4.4.x/2015.03.19/tables.sql b/newscoop/install/Resources/sql/upgrade/4.4.x/2015.03.19/tables.sql
new file mode 100644
index 0000000000..811c702503
--- /dev/null
+++ b/newscoop/install/Resources/sql/upgrade/4.4.x/2015.03.19/tables.sql
@@ -0,0 +1 @@
+system php ./init_order_in_playlists.php
\ No newline at end of file
diff --git a/newscoop/js/models/Slideshow.js b/newscoop/js/models/Slideshow.js
deleted file mode 100644
index 74341f25ec..0000000000
--- a/newscoop/js/models/Slideshow.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Slideshow model
- */
-window.Slideshow = Backbone.Model.extend({
- defaults: {
- attached: false
- },
-
- initialize: function() {
- if (window.article) {
- this.set('attached', _.indexOf(article.get('slideshows'), this.get('id')) !== -1);
- }
- },
-
- toggle: function() {
- var index = _.indexOf(article.get('slideshows'), this.get('id'));
- if (index === -1) {
- this.set('attached', true);
- article.get('slideshows').push(this.get('id'));
- } else {
- this.set('attached', false);
- article.get('slideshows').splice(index, 1);
- }
- }
-});
diff --git a/newscoop/js/pwd_meter/css/default.css b/newscoop/js/pwd_meter/css/default.css
deleted file mode 100644
index 80bee7c43c..0000000000
--- a/newscoop/js/pwd_meter/css/default.css
+++ /dev/null
@@ -1,133 +0,0 @@
-#score {
- color: #fff;
- font-size: 12px;
- position:absolute;
- text-align: center;
- width: 100px;
- z-index: 10;
- padding:5px 0 0 0;
-}
-#score,#rating,#standards {
- font-weight: bold;
-}
-#scorebar {
- background-image: url(../images/bg_strength_gradient.jpg);
- background-repeat: repeat-y;
- background-position: 0 0;
- position:relative;
- width: 100px;
- z-index: 0;
- height:25px;
-}
-#scorebarBorder {
- background: #333;
- border: 1px #D5C3DF solid;
- height: 16px;
- margin-bottom: 2px;
- width: 100px;
- float: left;
-}
-#password {
- border: 1px solid #9d9d9d;
- background: url("images/input_bg.png") repeat-x scroll 0 0 #FFFFFF;
- text-indent: 3px;
- font-size: 12px;
- height:23px;
- margin:0;
- font-family: Arial,Helvetica,sans-serif;
- padding:0;
-}
-#complexity {
- font-size: 80%;
- padding: 4px;
- float: left;
-}
-#tablePwdScoring {
- margin-bottom: 0 !important;
-}
-div.fail,div.pass,div.exceed,div.warn {
- background-repeat: no-repeat;
- background-position: left top;
- height: 16px;
- margin-left: auto;
- margin-right: auto;
- width: 16px;
-}
-div.exceed {
- background-image: url(../images/img_status_exceed.png);
-}
-div.fail {
- background-image: url(../images/img_status_fail.png);
-}
-div.pass {
- background-image: url(../images/img_status_pass.png);
-}
-div.warn {
- background-image: url(../images/img_status_warn.png);
-}
-div.box {
- background: #456;
- border: 1px #000 solid;
- color: #fff;
- height: 16px;
- padding: 2px;
- white-space: nowrap;
- width: 16px;
-}
-div.boxMinus,div.boxPlus {
- border: none;
- color: #fff;
- font-weight: bold;
- padding: 2px;
- text-align: left;
- white-space: nowrap;
-}
-.clearNone {
- clear: none;
-}
-.floatRight {
- float: right;
-}
-.floatLeft {
- float: left;
-}
-.hide {
- display: none;
-}
-.imgLegend {
- clear: left !important;
- float: left !important;
- position: relative !important;
- margin-bottom: -3px !important;
- margin-right: 5px !important;
-}
-.inline {
- display: inline;
-}
-.italic {
- font-style: italic;
-}
-.noPad {
- padding: 0;
-}
-.show {
- display: inline !important;
-}
-.txtLg {
- font-size: 125%;
-}
-.txtSmall {
- font-size: 75%;
-}
-.txtCenter {
- text-align: center;
-}
-.txtRight {
- text-align: right;
-}
-div.xtend {
- clear: both !important;
- line-height: 0;
- height: 0;
-}
-
diff --git a/newscoop/js/pwd_meter/css/ie.css b/newscoop/js/pwd_meter/css/ie.css
deleted file mode 100644
index 03d1d12baf..0000000000
--- a/newscoop/js/pwd_meter/css/ie.css
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Begin hacks for IE and all it's non-compliant glory!!! */
-/* \*/
-
-* html div.exceed,* html div.fail,* html div.pass,* html div.warn { background-image: none !important; }
-* html div.exceed { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='images/img_status_exceed.png'); }
-* html div.fail { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='images/img_status_fail.png'); }
-* html div.pass { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='images/img_status_pass.png'); }
-* html div.warn { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='images/img_status_warn.png'); }
-
-/* */
-/* End hacks for IE */
diff --git a/newscoop/js/pwd_meter/images/bg_page.gif b/newscoop/js/pwd_meter/images/bg_page.gif
deleted file mode 100644
index 9e4f64cc18..0000000000
Binary files a/newscoop/js/pwd_meter/images/bg_page.gif and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/bg_strength_gradient.jpg b/newscoop/js/pwd_meter/images/bg_strength_gradient.jpg
deleted file mode 100644
index be7742566e..0000000000
Binary files a/newscoop/js/pwd_meter/images/bg_strength_gradient.jpg and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_exceed.gif b/newscoop/js/pwd_meter/images/img_status_exceed.gif
deleted file mode 100644
index a6bfb9d45b..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_exceed.gif and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_exceed.png b/newscoop/js/pwd_meter/images/img_status_exceed.png
deleted file mode 100644
index 1acf05524b..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_exceed.png and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_fail.gif b/newscoop/js/pwd_meter/images/img_status_fail.gif
deleted file mode 100644
index b543abc694..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_fail.gif and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_fail.png b/newscoop/js/pwd_meter/images/img_status_fail.png
deleted file mode 100644
index 7c208fc0c9..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_fail.png and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_meet.gif b/newscoop/js/pwd_meter/images/img_status_meet.gif
deleted file mode 100644
index 2da8c0b9f6..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_meet.gif and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_meet.png b/newscoop/js/pwd_meter/images/img_status_meet.png
deleted file mode 100644
index 8d8efbce8b..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_meet.png and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_pass.gif b/newscoop/js/pwd_meter/images/img_status_pass.gif
deleted file mode 100644
index 781d6d167a..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_pass.gif and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_pass.png b/newscoop/js/pwd_meter/images/img_status_pass.png
deleted file mode 100644
index c4d3ecaa1c..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_pass.png and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_warn.gif b/newscoop/js/pwd_meter/images/img_status_warn.gif
deleted file mode 100644
index d8a729c90b..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_warn.gif and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/img_status_warn.png b/newscoop/js/pwd_meter/images/img_status_warn.png
deleted file mode 100644
index 6b58746d0f..0000000000
Binary files a/newscoop/js/pwd_meter/images/img_status_warn.png and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/raw_images/bg_strength_gradient.png b/newscoop/js/pwd_meter/images/raw_images/bg_strength_gradient.png
deleted file mode 100644
index 38c995b75c..0000000000
Binary files a/newscoop/js/pwd_meter/images/raw_images/bg_strength_gradient.png and /dev/null differ
diff --git a/newscoop/js/pwd_meter/images/raw_images/img_statuses.png b/newscoop/js/pwd_meter/images/raw_images/img_statuses.png
deleted file mode 100644
index 928adb099c..0000000000
Binary files a/newscoop/js/pwd_meter/images/raw_images/img_statuses.png and /dev/null differ
diff --git a/newscoop/js/pwd_meter/js/pwd_generator.js b/newscoop/js/pwd_meter/js/pwd_generator.js
deleted file mode 100644
index 1995b91d3c..0000000000
--- a/newscoop/js/pwd_meter/js/pwd_generator.js
+++ /dev/null
@@ -1,69 +0,0 @@
-function GeneratePassword() {
-
- if (parseInt(navigator.appVersion) <= 3) {
- alert("Sorry this only works in 4.0+ browsers");
- return true;
- }
-
- var length=8;
- var sPassword = "";
-
- var noPunction = true;
- var randomLength = true;
-
- if (randomLength) {
- length = Math.random();
-
- length = parseInt(length * 100);
- length = (length % 7) + 6;
- }
-
-
- for (i=0; i < length; i++) {
-
- numI = getRandomNum();
- if (noPunction) { while (checkPunc(numI)) { numI = getRandomNum(); } }
-
- sPassword = sPassword + String.fromCharCode(numI);
- }
-
- document.forms[0].password.value = sPassword;
- document.forms[0].passwordConf.value = sPassword;
- document.getElementById('passtext').innerHTML = sPassword;
-
- chkPass(sPassword);
-
- return true;
-}
-
-function cleanGeneratedPasswords() {
- document.forms[0].password.value = '';
- document.forms[0].passwordConf.value = '';
- document.getElementById('passtext').innerHTML = '';
- var sPassword = '';
- chkPass(sPassword);
-}
-
-function getRandomNum() {
-
- // between 0 - 1
- var rndNum = Math.random();
-
- // rndNum from 0 - 1000
- rndNum = parseInt(rndNum * 1000);
-
- // rndNum from 33 - 127
- rndNum = (rndNum % 94) + 33;
-
- return rndNum;
-}
-
-function checkPunc(num) {
-
- if ((num >=33) && (num <=47)) { return true; }
- if ((num >=58) && (num <=64)) { return true; }
- if ((num >=91) && (num <=96)) { return true; }
- if ((num >=123) && (num <=126)) { return true; }
-
- return false;
-}
diff --git a/newscoop/js/pwd_meter/js/pwd_generator_min.js b/newscoop/js/pwd_meter/js/pwd_generator_min.js
deleted file mode 100644
index d4672de8d3..0000000000
--- a/newscoop/js/pwd_meter/js/pwd_generator_min.js
+++ /dev/null
@@ -1 +0,0 @@
-function GeneratePassword(){if(parseInt(navigator.appVersion)<=3){alert("Sorry this only works in 4.0+ browsers");return true}var length=8;var sPassword="";var noPunction=true;var randomLength=true;if(randomLength){length=Math.random();length=parseInt(length*100);length=(length%7)+6}for(i=0;i=33)&&(num<=47)){return true}if((num>=58)&&(num<=64)){return true}if((num>=91)&&(num<=96)){return true}if((num>=123)&&(num<=126)){return true}return false}
diff --git a/newscoop/js/pwd_meter/js/pwd_meter.js b/newscoop/js/pwd_meter/js/pwd_meter.js
deleted file mode 100644
index 0eb63aa014..0000000000
--- a/newscoop/js/pwd_meter/js/pwd_meter.js
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
-** Original File: pwd_meter.js
-** Created by: Jeff Todnem (http://www.todnem.com/)
-** Created on: 2007-08-14
-** Last modified: 2007-08-30
-**
-** License Information:
-** -------------------------------------------------------------------------
-** Copyright (C) 2007 Jeff Todnem
-**
-** This program is free software; you can redistribute it and/or modify it
-** under the terms of the GNU General Public License as published by the
-** Free Software Foundation; either version 2 of the License, or (at your
-** option) any later version.
-**
-** This program is distributed in the hope that it will be useful, but
-** WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-** General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License along
-** with this program; if not, write to the Free Software Foundation, Inc.,
-** 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-**
-**
-*/
-
-function addLoadEvent(func) {
- var oldonload = window.onload;
- if (typeof window.onload != "function") {
- window.onload = func;
- }
- else {
- window.onload = function() {
- if (oldonload) {
- oldonload();
- }
- func();
- };
- }
-}
-
-String.prototype.strReverse = function() {
- var newstring = "";
- for (var s=0; s < this.length; s++) {
- newstring = this.charAt(s) + newstring;
- }
- return newstring;
- //strOrig = ' texttotrim ';
- //strReversed = strOrig.revstring();
-};
-
-function chkPass(pwd) {
- var oScorebar = document.getElementById("scorebar");
- var oScore = document.getElementById("score");
- var oComplexity = document.getElementById("complexity");
- var nScore = 0;
- var nLength = 0;
- var nAlphaUC = 0;
- var nAlphaLC = 0;
- var nNumber = 0;
- var nSymbol = 0;
- var nMidChar = 0;
- var nRequirements = 0;
- var nAlphasOnly = 0;
- var nNumbersOnly = 0;
- var nRepChar = 0;
- var nConsecAlphaUC = 0;
- var nConsecAlphaLC = 0;
- var nConsecNumber = 0;
- var nConsecSymbol = 0;
- var nConsecCharType = 0;
- var nSeqAlpha = 0;
- var nSeqNumber = 0;
- var nSeqChar = 0;
- var nReqChar = 0;
- var nReqCharType = 3;
- var nMultLength = 4;
- var nMultAlphaUC = 3;
- var nMultAlphaLC = 3;
- var nMultNumber = 4;
- var nMultSymbol = 6;
- var nMultMidChar = 2;
- var nMultRequirements = 2;
- var nMultRepChar = 1;
- var nMultConsecAlphaUC = 2;
- var nMultConsecAlphaLC = 2;
- var nMultConsecNumber = 2;
- var nMultConsecSymbol = 1;
- var nMultConsecCharType = 0;
- var nMultSeqAlpha = 3;
- var nMultSeqNumber = 3;
- var nTmpAlphaUC = "";
- var nTmpAlphaLC = "";
- var nTmpNumber = "";
- var nTmpSymbol = "";
- var sAlphaUC = " 0";
- var sAlphaLC = " 0";
- var sNumber = " 0";
- var sSymbol = " 0";
- var sMidChar = " 0";
- var sRequirements = " 0";
- var sAlphasOnly = " 0";
- var sNumbersOnly = " 0";
- var sRepChar = " 0";
- var sConsecAlphaUC = " 0";
- var sConsecAlphaLC = " 0";
- var sConsecNumber = " 0";
- var sSeqAlpha = " 0";
- var sSeqNumber = " 0";
- var sAlphas = "abcdefghijklmnopqrstuvwxyz";
- var sNumerics = "01234567890";
- var sComplexity = "Too Short";
- var sStandards = "Below";
- var nMinPwdLen = 8;
- if (document.all) { var nd = 0; } else { var nd = 1; }
- if (pwd) {
- nScore = parseInt(pwd.length * nMultLength);
- nLength = pwd.length;
- var arrPwd = pwd.replace (/\s+/g,"").split(/\s*/);
- var arrPwdLen = arrPwd.length;
-
- /* Loop through password to check for Symbol, Numeric, Lowercase and Uppercase pattern matches */
- for (var a=0; a < arrPwdLen; a++) {
- if (arrPwd[a].match(new RegExp(/[A-Z]/g))) {
- if (nTmpAlphaUC !== "") { if ((nTmpAlphaUC + 1) == a) { nConsecAlphaUC++; nConsecCharType++; } }
- nTmpAlphaUC = a;
- nAlphaUC++;
- }
- else if (arrPwd[a].match(new RegExp(/[a-z]/g))) {
- if (nTmpAlphaLC !== "") { if ((nTmpAlphaLC + 1) == a) { nConsecAlphaLC++; nConsecCharType++; } }
- nTmpAlphaLC = a;
- nAlphaLC++;
- }
- else if (arrPwd[a].match(new RegExp(/[0-9]/g))) {
- if (a > 0 && a < (arrPwdLen - 1)) { nMidChar++; }
- if (nTmpNumber !== "") { if ((nTmpNumber + 1) == a) { nConsecNumber++; nConsecCharType++; } }
- nTmpNumber = a;
- nNumber++;
- }
- else if (arrPwd[a].match(new RegExp(/[^a-zA-Z0-9_]/g))) {
- if (a > 0 && a < (arrPwdLen - 1)) { nMidChar++; }
- if (nTmpSymbol !== "") { if ((nTmpSymbol + 1) == a) { nConsecSymbol++; nConsecCharType++; } }
- nTmpSymbol = a;
- nSymbol++;
- }
- /* Internal loop through password to check for repeated characters */
- for (var b=0; b < arrPwdLen; b++) {
- if (arrPwd[a].toLowerCase() == arrPwd[b].toLowerCase() && a != b) { nRepChar++; }
- }
- }
-
- /* Check for sequential alpha string patterns (forward and reverse) */
- for (var s=0; s < 23; s++) {
- var sFwd = sAlphas.substring(s,parseInt(s+3));
- var sRev = sFwd.strReverse();
- if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) { nSeqAlpha++; nSeqChar++;}
- }
-
- /* Check for sequential numeric string patterns (forward and reverse) */
- for (var s=0; s < 8; s++) {
- var sFwd = sNumerics.substring(s,parseInt(s+3));
- var sRev = sFwd.strReverse();
- if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) { nSeqNumber++; nSeqChar++;}
- }
-
- /* Modify overall score value based on usage vs requirements */
-
- /* General point assignment */
- document.getElementById("nLengthBonus").innerHTML = "+ " + nScore;
- if (nAlphaUC > 0 && nAlphaUC < nLength) {
- nScore = parseInt(nScore + ((nLength - nAlphaUC) * 2));
- sAlphaUC = "+ " + parseInt((nLength - nAlphaUC) * 2);
- }
- if (nAlphaLC > 0 && nAlphaLC < nLength) {
- nScore = parseInt(nScore + ((nLength - nAlphaLC) * 2));
- sAlphaLC = "+ " + parseInt((nLength - nAlphaLC) * 2);
- }
- if (nNumber > 0 && nNumber < nLength) {
- nScore = parseInt(nScore + (nNumber * nMultNumber));
- sNumber = "+ " + parseInt(nNumber * nMultNumber);
- }
- if (nSymbol > 0) {
- nScore = parseInt(nScore + (nSymbol * nMultSymbol));
- sSymbol = "+ " + parseInt(nSymbol * nMultSymbol);
- }
- if (nMidChar > 0) {
- nScore = parseInt(nScore + (nMidChar * nMultMidChar));
- sMidChar = "+ " + parseInt(nMidChar * nMultMidChar);
- }
- document.getElementById("nAlphaUCBonus").innerHTML = sAlphaUC;
- document.getElementById("nAlphaLCBonus").innerHTML = sAlphaLC;
- document.getElementById("nNumberBonus").innerHTML = sNumber;
- document.getElementById("nSymbolBonus").innerHTML = sSymbol;
- document.getElementById("nMidCharBonus").innerHTML = sMidChar;
-
- /* Point deductions for poor practices */
- if ((nAlphaLC > 0 || nAlphaUC > 0) && nSymbol === 0 && nNumber === 0) { // Only Letters
- nScore = parseInt(nScore - nLength);
- nAlphasOnly = nLength;
- sAlphasOnly = "- " + nLength;
- }
- if (nAlphaLC === 0 && nAlphaUC === 0 && nSymbol === 0 && nNumber > 0) { // Only Numbers
- nScore = parseInt(nScore - nLength);
- nNumbersOnly = nLength;
- sNumbersOnly = "- " + nLength;
- }
- if (nRepChar > 0) { // Same character exists more than once
- nScore = parseInt(nScore - (nRepChar * nRepChar));
- sRepChar = "- " + nRepChar;
- }
- if (nConsecAlphaUC > 0) { // Consecutive Uppercase Letters exist
- nScore = parseInt(nScore - (nConsecAlphaUC * nMultConsecAlphaUC));
- sConsecAlphaUC = "- " + parseInt(nConsecAlphaUC * nMultConsecAlphaUC);
- }
- if (nConsecAlphaLC > 0) { // Consecutive Lowercase Letters exist
- nScore = parseInt(nScore - (nConsecAlphaLC * nMultConsecAlphaLC));
- sConsecAlphaLC = "- " + parseInt(nConsecAlphaLC * nMultConsecAlphaLC);
- }
- if (nConsecNumber > 0) { // Consecutive Numbers exist
- nScore = parseInt(nScore - (nConsecNumber * nMultConsecNumber));
- sConsecNumber = "- " + parseInt(nConsecNumber * nMultConsecNumber);
- }
- if (nSeqAlpha > 0) { // Sequential alpha strings exist (3 characters or more)
- nScore = parseInt(nScore - (nSeqAlpha * nMultSeqAlpha));
- sSeqAlpha = "- " + parseInt(nSeqAlpha * nMultSeqAlpha);
- }
- if (nSeqNumber > 0) { // Sequential numeric strings exist (3 characters or more)
- nScore = parseInt(nScore - (nSeqNumber * nMultSeqNumber));
- sSeqNumber = "- " + parseInt(nSeqNumber * nMultSeqNumber);
- }
- document.getElementById("nAlphasOnlyBonus").innerHTML = sAlphasOnly;
- document.getElementById("nNumbersOnlyBonus").innerHTML = sNumbersOnly;
- document.getElementById("nRepCharBonus").innerHTML = sRepChar;
- document.getElementById("nConsecAlphaUCBonus").innerHTML = sConsecAlphaUC;
- document.getElementById("nConsecAlphaLCBonus").innerHTML = sConsecAlphaLC;
- document.getElementById("nConsecNumberBonus").innerHTML = sConsecNumber;
- document.getElementById("nSeqAlphaBonus").innerHTML = sSeqAlpha;
- document.getElementById("nSeqNumberBonus").innerHTML = sSeqNumber;
-
- /* Determine if mandatory requirements have been met and set image indicators accordingly */
- var arrChars = [nLength,nAlphaUC,nAlphaLC,nNumber,nSymbol];
- var arrCharsIds = ["nLength","nAlphaUC","nAlphaLC","nNumber","nSymbol"];
- var arrCharsLen = arrChars.length;
- for (var c=0; c < arrCharsLen; c++) {
- var oImg = document.getElementById('div_' + arrCharsIds[c]);
- var oBonus = document.getElementById(arrCharsIds[c] + 'Bonus');
- document.getElementById(arrCharsIds[c]).innerHTML = arrChars[c];
- if (arrCharsIds[c] == "nLength") { var minVal = parseInt(nMinPwdLen - 1); } else { var minVal = 0; }
- if (arrChars[c] == parseInt(minVal + 1)) { nReqChar++; oImg.className = "pass"; oBonus.parentNode.className = "pass"; }
- else if (arrChars[c] > parseInt(minVal + 1)) { nReqChar++; oImg.className = "exceed"; oBonus.parentNode.className = "exceed"; }
- else { oImg.className = "fail"; oBonus.parentNode.className = "fail"; }
- }
- nRequirements = nReqChar;
- if (pwd.length >= nMinPwdLen) { var nMinReqChars = 3; } else { var nMinReqChars = 4; }
- if (nRequirements > nMinReqChars) { // One or more required characters exist
- nScore = parseInt(nScore + (nRequirements * 2));
- sRequirements = "+ " + parseInt(nRequirements * 2);
- }
- document.getElementById("nRequirementsBonus").innerHTML = sRequirements;
-
- /* Determine if additional bonuses need to be applied and set image indicators accordingly */
- var arrChars = [nMidChar,nRequirements];
- var arrCharsIds = ["nMidChar","nRequirements"];
- var arrCharsLen = arrChars.length;
- for (var c=0; c < arrCharsLen; c++) {
- var oImg = document.getElementById('div_' + arrCharsIds[c]);
- var oBonus = document.getElementById(arrCharsIds[c] + 'Bonus');
- document.getElementById(arrCharsIds[c]).innerHTML = arrChars[c];
- if (arrCharsIds[c] == "nRequirements") { var minVal = nMinReqChars; } else { var minVal = 0; }
- if (arrChars[c] == parseInt(minVal + 1)) { oImg.className = "pass"; oBonus.parentNode.className = "pass"; }
- else if (arrChars[c] > parseInt(minVal + 1)) { oImg.className = "exceed"; oBonus.parentNode.className = "exceed"; }
- else { oImg.className = "fail"; oBonus.parentNode.className = "fail"; }
- }
-
- /* Determine if suggested requirements have been met and set image indicators accordingly */
- var arrChars = [nAlphasOnly,nNumbersOnly,nRepChar,nConsecAlphaUC,nConsecAlphaLC,nConsecNumber,nSeqAlpha,nSeqNumber];
- var arrCharsIds = ["nAlphasOnly","nNumbersOnly","nRepChar","nConsecAlphaUC","nConsecAlphaLC","nConsecNumber","nSeqAlpha","nSeqNumber"];
- var arrCharsLen = arrChars.length;
- for (var c=0; c < arrCharsLen; c++) {
- var oImg = document.getElementById('div_' + arrCharsIds[c]);
- var oBonus = document.getElementById(arrCharsIds[c] + 'Bonus');
- document.getElementById(arrCharsIds[c]).innerHTML = arrChars[c];
- if (arrChars[c] > 0) { oImg.className = "warn"; oBonus.parentNode.className = "warn"; }
- else { oImg.className = "pass"; oBonus.parentNode.className = "pass"; }
- }
-
- /* Determine complexity based on overall score */
- if (nScore > 100) { nScore = 100; } else if (nScore < 0) { nScore = 0; }
- if (nScore >= 0 && nScore < 20) { sComplexity = "Very Weak"; }
- else if (nScore >= 20 && nScore < 40) { sComplexity = "Weak"; }
- else if (nScore >= 40 && nScore < 60) { sComplexity = "Good"; }
- else if (nScore >= 60 && nScore < 80) { sComplexity = "Strong"; }
- else if (nScore >= 80 && nScore <= 100) { sComplexity = "Very Strong"; }
-
- /* Display updated score criteria to client */
- oScorebar.style.backgroundPosition = "-" + parseInt(nScore * 4) + "px";
- oScore.innerHTML = nScore + "%";
- oComplexity.innerHTML = sComplexity;
- }
- else {
- /* Display default score criteria to client */
- initPwdChk();
- oScore.innerHTML = nScore + "%";
- oComplexity.innerHTML = sComplexity;
- }
-}
-
-function togPwdMask() {
- var oPwd = document.getElementById("password");
- var oTxt = document.getElementById("passwordTxt");
- var oMask = document.getElementById("mask");
- if (oMask.checked) {
- oPwd.value = oTxt.value;
- oPwd.className = "";
- oTxt.className = "hide";
- }
- else {
- oTxt.value = oPwd.value;
- oPwd.className = "hide";
- oTxt.className = "";
- }
-}
-
-function initPwdChk(restart) {
- /* Reset all form values to their default */
- document.getElementById("nLength").innerHTML = "0";
- document.getElementById("nAlphaUC").innerHTML = "0";
- document.getElementById("nAlphaLC").innerHTML = "0";
- document.getElementById("nNumber").innerHTML = "0";
- document.getElementById("nSymbol").innerHTML = "0";
- document.getElementById("nMidChar").innerHTML = "0";
- document.getElementById("nRequirements").innerHTML = "0";
- document.getElementById("nAlphasOnly").innerHTML = "0";
- document.getElementById("nNumbersOnly").innerHTML = "0";
- document.getElementById("nRepChar").innerHTML = "0";
- document.getElementById("nConsecAlphaUC").innerHTML = "0";
- document.getElementById("nConsecAlphaLC").innerHTML = "0";
- document.getElementById("nConsecNumber").innerHTML = "0";
- document.getElementById("nSeqAlpha").innerHTML = "0";
- document.getElementById("nSeqNumber").innerHTML = "0";
- document.getElementById("nLengthBonus").innerHTML = " 0";
- document.getElementById("nAlphaUCBonus").innerHTML = " 0";
- document.getElementById("nAlphaLCBonus").innerHTML = " 0";
- document.getElementById("nNumberBonus").innerHTML = " 0";
- document.getElementById("nSymbolBonus").innerHTML = " 0";
- document.getElementById("nMidCharBonus").innerHTML = " 0";
- document.getElementById("nRequirementsBonus").innerHTML = " 0";
- document.getElementById("nAlphasOnlyBonus").innerHTML = " 0";
- document.getElementById("nNumbersOnlyBonus").innerHTML = " 0";
- document.getElementById("nRepCharBonus").innerHTML = " 0";
- document.getElementById("nConsecAlphaUCBonus").innerHTML = " 0";
- document.getElementById("nConsecAlphaLCBonus").innerHTML = " 0";
- document.getElementById("nConsecNumberBonus").innerHTML = " 0";
- document.getElementById("nSeqAlphaBonus").innerHTML = " 0";
- document.getElementById("nSeqNumberBonus").innerHTML = " 0";
- document.getElementById("nLengthBonus").parentNode.className = "fail";
- document.getElementById("nAlphaUCBonus").parentNode.className = "fail";
- document.getElementById("nAlphaLCBonus").parentNode.className = "fail";
- document.getElementById("nNumberBonus").parentNode.className = "fail";
- document.getElementById("nSymbolBonus").parentNode.className = "fail";
- document.getElementById("nMidCharBonus").parentNode.className = "fail";
- document.getElementById("nRequirementsBonus").parentNode.className = "fail";
- document.getElementById("nAlphasOnlyBonus").parentNode.className = "pass";
- document.getElementById("nNumbersOnlyBonus").parentNode.className = "pass";
- document.getElementById("nRepCharBonus").parentNode.className = "pass";
- document.getElementById("nConsecAlphaUCBonus").parentNode.className = "pass";
- document.getElementById("nConsecAlphaLCBonus").parentNode.className = "pass";
- document.getElementById("nConsecNumberBonus").parentNode.className = "pass";
- document.getElementById("nSeqAlphaBonus").parentNode.className = "pass";
- document.getElementById("nSeqNumberBonus").parentNode.className = "pass";
- document.getElementById("div_nLength").className = "fail";
- document.getElementById("div_nAlphaUC").className = "fail";
- document.getElementById("div_nAlphaLC").className = "fail";
- document.getElementById("div_nNumber").className = "fail";
- document.getElementById("div_nSymbol").className = "fail";
- document.getElementById("div_nMidChar").className = "fail";
- document.getElementById("div_nRequirements").className = "fail";
- document.getElementById("div_nAlphasOnly").className = "pass";
- document.getElementById("div_nNumbersOnly").className = "pass";
- document.getElementById("div_nRepChar").className = "pass";
- document.getElementById("div_nConsecAlphaUC").className = "pass";
- document.getElementById("div_nConsecAlphaLC").className = "pass";
- document.getElementById("div_nConsecNumber").className = "pass";
- document.getElementById("div_nSeqAlpha").className = "pass";
- document.getElementById("div_nSeqNumber").className = "pass";
- document.getElementById("password").value = "";
- document.getElementById("passwordTxt").value = "";
- document.getElementById("scorebar").style.backgroundPosition = "0";
- if (restart) {
- document.getElementById("password").className = "";
- document.getElementById("passwordTxt").className = "hide";
- document.getElementById("mask").checked = true;
- }
-}
-
-addLoadEvent(function() { initPwdChk(1); });
-
diff --git a/newscoop/js/pwd_meter/js/pwd_meter_min.js b/newscoop/js/pwd_meter/js/pwd_meter_min.js
deleted file mode 100644
index 94a01c1b90..0000000000
--- a/newscoop/js/pwd_meter/js/pwd_meter_min.js
+++ /dev/null
@@ -1 +0,0 @@
-eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1g 2j(a){7 b=1r.1x;12(3f 1r.1x!="1g"){1r.1x=a}18{1r.1x=1g(){12(b){b()}a()}}}31.2M.1C=1g(){7 a="";1h(7 s=0;s<2A.1i;s++){a=2A.3e(s)+a}3a a};1g 39(d){7 e=10.11("2c");7 f=10.11("2H");7 g=10.11("2F");7 h=0;7 i=0;7 j=0;7 k=0;7 l=0;7 m=0;7 n=0;7 o=0;7 p=0;7 q=0;7 r=0;7 t=0;7 u=0;7 v=0;7 w=0;7 x=0;7 y=0;7 z=0;7 A=0;7 B=0;7 C=3;7 D=4;7 E=3;7 F=3;7 G=4;7 H=6;7 I=2;7 J=2;7 K=1;7 L=2;7 M=2;7 N=2;7 O=1;7 P=0;7 Q=3;7 R=3;7 S="";7 T="";7 U="";7 V="";7 W="&5;&5;&5;&5;0";7 X="&5;&5;&5;&5;0";7 Y="&5;&5;&5;&5;0";7 Z="&5;&5;&5;&5;0";7 1A="&5;&5;&5;&5;0";7 1B="&5;&5;&5;&5;0";7 1T="&5;&5;&5;&5;0";7 1Y="&5;&5;&5;&5;0";7 1F="&5;&5;&5;&5;0";7 1K="&5;&5;&5;&5;0";7 1S="&5;&5;&5;&5;0";7 1R="&5;&5;&5;&5;0";7 1J="&5;&5;&5;&5;0";7 1H="&5;&5;&5;&5;0";7 2h="35";7 2f="34";7 1j="2Y 2V";7 2T="2S";7 21=8;12(10.2N){7 2d=0}18{7 2d=1}12(d){h=15(d.1i*D);i=d.1i;7 1e=d.2L(/\\s+/g,"").2K(/\\s*/);7 1o=1e.1i;1h(7 a=0;a<1o;a++){12(1e[a].1w(1v 1s(/[A-Z]/g))){12(S!==""){12((S+1)==a){t++;x++}}S=a;j++}18 12(1e[a].1w(1v 1s(/[a-z]/g))){12(T!==""){12((T+1)==a){u++;x++}}T=a;k++}18 12(1e[a].1w(1v 1s(/[0-9]/g))){12(a>0&&a<(1o-1)){n++}12(U!==""){12((U+1)==a){v++;x++}}U=a;l++}18 12(1e[a].1w(1v 1s(/[^a-2J-2I-2G]/g))){12(a>0&&a<(1o-1)){n++}12(V!==""){12((V+1)==a){w++;x++}}V=a;m++}1h(7 b=0;b<1o;b++){12(1e[a].1n()==1e[b].1n()&&a!=b){r++}}}1h(7 s=0;s<23;s++){7 1m=2h.2a(s,15(s+3));7 1q=1m.1C();12(d.1n().1p(1m)!=-1||d.1n().1p(1q)!=-1){y++;A++}}1h(7 s=0;s<8;s++){7 1m=2f.2a(s,15(s+3));7 1q=1m.1C();12(d.1n().1p(1m)!=-1||d.1n().1p(1q)!=-1){z++;A++}}10.11("1z").13="+ "+h;12(j>0&&j0&&k0&&l0){h=15(h+(m*H));Z="+ "+15(m*H)}12(n>0){h=15(h+(n*I));1A="+ "+15(n*I)}10.11("1y").13=W;10.11("1E").13=X;10.11("1D").13=Y;10.11("29").13=Z;10.11("28").13=1A;12((k>0||j>0)&&m===0&&l===0){h=15(h-i);p=i;1T="- "+i}12(k===0&&j===0&&m===0&&l>0){h=15(h-i);q=i;1Y="- "+i}12(r>0){h=15(h-(r*r));1F="- "+r}12(t>0){h=15(h-(t*L));1K="- "+15(t*L)}12(u>0){h=15(h-(u*M));1S="- "+15(u*M)}12(v>0){h=15(h-(v*N));1R="- "+15(v*N)}12(y>0){h=15(h-(y*Q));1J="- "+15(y*Q)}12(z>0){h=15(h-(z*R));1H="- "+15(z*R)}10.11("27").13=1T;10.11("26").13=1Y;10.11("25").13=1F;10.11("1L").13=1K;10.11("1O").13=1S;10.11("1M").13=1R;10.11("24").13=1J;10.11("22").13=1H;7 1b=[i,j,k,l,m];7 1a=["1Z","2D","2C","2B","2z"];7 1l=1b.1i;1h(7 c=0;c<1l;c++){7 1d=10.11(\'1X\'+1a[c]);7 1c=10.11(1a[c]+\'1W\');10.11(1a[c]).13=1b[c];12(1a[c]=="1Z"){7 1f=15(21-1)}18{7 1f=0}12(1b[c]==15(1f+1)){B++;1d.14="17";1c.16.14="17"}18 12(1b[c]>15(1f+1)){B++;1d.14="1u";1c.16.14="1u"}18{1d.14="19";1c.16.14="19"}}o=B;12(d.1i>=21){7 1t=3}18{7 1t=4}12(o>1t){h=15(h+(o*2));1B="+ "+15(o*2)}10.11("1V").13=1B;7 1b=[n,o];7 1a=["2y","1U"];7 1l=1b.1i;1h(7 c=0;c<1l;c++){7 1d=10.11(\'1X\'+1a[c]);7 1c=10.11(1a[c]+\'1W\');10.11(1a[c]).13=1b[c];12(1a[c]=="1U"){7 1f=1t}18{7 1f=0}12(1b[c]==15(1f+1)){1d.14="17";1c.16.14="17"}18 12(1b[c]>15(1f+1)){1d.14="1u";1c.16.14="1u"}18{1d.14="19";1c.16.14="19"}}7 1b=[p,q,r,t,u,v,y,z];7 1a=["2x","2w","2v","2u","2t","2s","2b","2r"];7 1l=1b.1i;1h(7 c=0;c<1l;c++){7 1d=10.11(\'1X\'+1a[c]);7 1c=10.11(1a[c]+\'1W\');10.11(1a[c]).13=1b[c];12(1b[c]>0){1d.14="2q";1c.16.14="2q"}18{1d.14="17";1c.16.14="17"}}12(h>1G){h=1G}18 12(h<0){h=0}12(h>=0&&h<20){1j="2p 2o"}18 12(h>=20&&h<2n){1j="2o"}18 12(h>=2n&&h<2e){1j="38"}18 12(h>=2e&&h<2m){1j="2l"}18 12(h>=2m&&h<=1G){1j="2p 2l"}e.2k.2i="-"+15(h*4)+"37";f.13=h+"%";g.13=1j}18{1Q();f.13=h+"%";g.13=1j}}1g 36(){7 a=10.11("1N");7 b=10.11("1I");7 c=10.11("2g");12(c.2E){a.1k=b.1k;a.14="";b.14="1P"}18{b.1k=a.1k;a.14="1P";b.14=""}}1g 1Q(a){10.11("1Z").13="0";10.11("2D").13="0";10.11("2C").13="0";10.11("2B").13="0";10.11("2z").13="0";10.11("2y").13="0";10.11("1U").13="0";10.11("2x").13="0";10.11("2w").13="0";10.11("2v").13="0";10.11("2u").13="0";10.11("2t").13="0";10.11("2s").13="0";10.11("2b").13="0";10.11("2r").13="0";10.11("1z").13="&5;&5;&5;&5;0";10.11("1y").13="&5;&5;&5;&5;0";10.11("1E").13="&5;&5;&5;&5;0";10.11("1D").13="&5;&5;&5;&5;0";10.11("29").13="&5;&5;&5;&5;0";10.11("28").13="&5;&5;&5;&5;0";10.11("1V").13="&5;&5;&5;&5;0";10.11("27").13="&5;&5;&5;&5;0";10.11("26").13="&5;&5;&5;&5;0";10.11("25").13="&5;&5;&5;&5;0";10.11("1L").13="&5;&5;&5;&5;0";10.11("1O").13="&5;&5;&5;&5;0";10.11("1M").13="&5;&5;&5;&5;0";10.11("24").13="&5;&5;&5;&5;0";10.11("22").13="&5;&5;&5;&5;0";10.11("1z").16.14="19";10.11("1y").16.14="19";10.11("1E").16.14="19";10.11("1D").16.14="19";10.11("29").16.14="19";10.11("28").16.14="19";10.11("1V").16.14="19";10.11("27").16.14="17";10.11("26").16.14="17";10.11("25").16.14="17";10.11("1L").16.14="17";10.11("1O").16.14="17";10.11("1M").16.14="17";10.11("24").16.14="17";10.11("22").16.14="17";10.11("33").14="19";10.11("32").14="19";10.11("30").14="19";10.11("2Z").14="19";10.11("2X").14="19";10.11("2W").14="19";10.11("2U").14="19";10.11("3b").14="17";10.11("3c").14="17";10.11("3d").14="17";10.11("2R").14="17";10.11("2Q").14="17";10.11("2P").14="17";10.11("3g").14="17";10.11("2O").14="17";10.11("1N").1k="";10.11("1I").1k="";10.11("2c").2k.2i="0";12(a){10.11("1N").14="";10.11("1I").14="1P";10.11("2g").2E=3h}}2j(1g(){1Q(1)});',62,204,'|||||nbsp||var|||||||||||||||||||||||||||||||||||||||||||||||||||||||document|getElementById|if|innerHTML|className|parseInt|parentNode|pass|else|fail|bv|bu|by|bx|bq|bz|function|for|length|bm|value|bw|bs|toLowerCase|br|indexOf|bt|window|RegExp|bA|exceed|new|match|onload|nAlphaUCBonus|nLengthBonus|ba|bb|strReverse|nNumberBonus|nAlphaLCBonus|be|100|bj|passwordTxt|bi|bf|nConsecAlphaUCBonus|nConsecNumberBonus|password|nConsecAlphaLCBonus|hide|initPwdChk|bh|bg|bc|nRequirements|nRequirementsBonus|Bonus|div_|bd|nLength||bo|nSeqNumberBonus||nSeqAlphaBonus|nRepCharBonus|nNumbersOnlyBonus|nAlphasOnlyBonus|nMidCharBonus|nSymbolBonus|substring|nSeqAlpha|scorebar|bp|60|bl|mask|bk|backgroundPosition|addLoadEvent|style|Strong|80|40|Weak|Very|warn|nSeqNumber|nConsecNumber|nConsecAlphaLC|nConsecAlphaUC|nRepChar|nNumbersOnly|nAlphasOnly|nMidChar|nSymbol|this|nNumber|nAlphaLC|nAlphaUC|checked|complexity|9_|score|Z0|zA|split|replace|prototype|all|div_nSeqNumber|div_nConsecNumber|div_nConsecAlphaLC|div_nConsecAlphaUC|Below|bn|div_nRequirements|Short|div_nMidChar|div_nSymbol|Too|div_nNumber|div_nAlphaLC|String|div_nAlphaUC|div_nLength|01234567890|abcdefghijklmnopqrstuvwxyz|togPwdMask|px|Good|chkPass|return|div_nAlphasOnly|div_nNumbersOnly|div_nRepChar|charAt|typeof|div_nSeqAlpha|true'.split('|'),0,{}))
diff --git a/newscoop/library/Newscoop/Entity/Repository/PlaylistRepository.php b/newscoop/library/Newscoop/Entity/Repository/PlaylistRepository.php
index c17e4c668d..cc7e1b0f70 100755
--- a/newscoop/library/Newscoop/Entity/Repository/PlaylistRepository.php
+++ b/newscoop/library/Newscoop/Entity/Repository/PlaylistRepository.php
@@ -64,7 +64,7 @@ public function getPlaylistByTitle($title)
* @param int $offset
* @param bool $publishedOnly
*/
- public function articles(Playlist $playlist, Language $lang = null, $fullArticle = false, $limit = null, $offset = null, $publishedOnly = true, $onlyQuery = false)
+ public function articles(Playlist $playlist, Language $lang = null, $fullArticle = false, $limit = null, $offset = null, $publishedOnly = true, $onlyQuery = false, $orderBy = "order")
{
$em = $this->getEntityManager();
$query = $em->createQuery("
@@ -74,7 +74,7 @@ public function articles(Playlist $playlist, Language $lang = null, $fullArticle
WHERE pa.playlist = ?1 "
. ($publishedOnly ? " AND a.workflowStatus = 'Y'" : "")
. (is_null($lang) ? " GROUP BY a.number" : " AND a.language = ?2")
- . " ORDER BY pa.order "
+ . " ORDER BY pa.$orderBy "
);
$query->setParameter(1, $playlist);
diff --git a/newscoop/library/Newscoop/Services/PlaylistsService.php b/newscoop/library/Newscoop/Services/PlaylistsService.php
index 42611ce477..ebbadbbbab 100644
--- a/newscoop/library/Newscoop/Services/PlaylistsService.php
+++ b/newscoop/library/Newscoop/Services/PlaylistsService.php
@@ -103,8 +103,6 @@ public function addArticle($playlist, $articleToAdd, $position = false)
private function reorderAfterRemove($playlist, $removedArticlePosition)
{
- $this->initOrderOnPlaylist($playlist);
-
try {
$this->em->getConnection()->exec('LOCK TABLES playlist_article WRITE;');
@@ -143,8 +141,6 @@ private function initOrderOnPlaylist($playlist)
private function positionPlaylistArticle($playlist, $playlistArticle, $position)
{
- $this->initOrderOnPlaylist($playlist);
-
if ($position == false) {
$position = 1;
} else {
-- New
- - Approved
- - Hidden
- - Delete
- - Quick edit
- - Add rating
- -
- Ban user
-
-
-