summaryrefslogtreecommitdiff
path: root/scripts/importtwitteratom.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-10-05 14:09:17 -0400
committerEvan Prodromou <evan@status.net>2010-10-05 14:09:17 -0400
commit8aa9c271dffe6ec6766b94486c0635c9db588db7 (patch)
treef6cb465062767bdf5642121e61d143bdd2e4dcfe /scripts/importtwitteratom.php
parent829a017a5d0104f495cd0b645ecb1f3cdeda25ac (diff)
parent5c4723919fa757b3e14a59350415cfe53e0900d1 (diff)
Merge remote branch 'gitorious/1.0.x' into 1.0.x
Diffstat (limited to 'scripts/importtwitteratom.php')
-rw-r--r--scripts/importtwitteratom.php26
1 files changed, 1 insertions, 25 deletions
diff --git a/scripts/importtwitteratom.php b/scripts/importtwitteratom.php
index c12e3b91a..a29526f27 100644
--- a/scripts/importtwitteratom.php
+++ b/scripts/importtwitteratom.php
@@ -36,30 +36,6 @@ END_OF_IMPORTTWITTERATOM_HELP;
require_once INSTALLDIR.'/scripts/commandline.inc';
require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php';
-function getUser()
-{
- $user = null;
-
- if (have_option('i', 'id')) {
- $id = get_option_value('i', 'id');
- $user = User::staticGet('id', $id);
- if (empty($user)) {
- throw new Exception("Can't find user with id '$id'.");
- }
- } else if (have_option('n', 'nickname')) {
- $nickname = get_option_value('n', 'nickname');
- $user = User::staticGet('nickname', $nickname);
- if (empty($user)) {
- throw new Exception("Can't find user with nickname '$nickname'");
- }
- } else {
- show_help();
- exit(1);
- }
-
- return $user;
-}
-
function getAtomFeedDocument()
{
$filename = get_option_value('f', 'file');
@@ -113,7 +89,7 @@ function importActivityStream($user, $doc)
$html = htmLawed($html, $config);
- $content = html_entity_decode(strip_tags($html));
+ $content = html_entity_decode(strip_tags($html), ENT_QUOTES, 'UTF-8');
$notice = Notice::saveNew($user->id,
$content,