From 68cb647421d1ea60ac6a3146818d09f18332ac1f Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 15:03:48 -0800 Subject: [PATCH 1/6] ljpost typos --- ljpost/ljpost.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index a55a7bf47..3b2bbe8b4 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -171,11 +171,11 @@ $title = '' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . $post = $title . bbcode($b['body']); $post = xmlify($post); -$year = date('Y') -$month = date('F') -$day = date('l') -$hour = date('H') -$min = date('i') +$year = date('Y'); +$month = date('F'); +$day = date('l'); +$hour = date('H'); +$min = date('i'); $xml = <<< EOT From 8427fe4e03df638b91ed3ee7505ee07531d18a9b Mon Sep 17 00:00:00 2001 From: friendica <info@friendica.com> Date: Tue, 28 Feb 2012 18:41:24 -0800 Subject: [PATCH 2/6] descriptive text for qcomment settings --- qcomment.tgz | Bin 1426 -> 1489 bytes qcomment/qcomment.php | 1 + 2 files changed, 1 insertion(+) diff --git a/qcomment.tgz b/qcomment.tgz index 76dffda1c46b5eac43e558fa50e9ffa378a801e4..1ab55a43f8d3a0cc5b146950d35c7a65b5211726 100644 GIT binary patch literal 1489 zcmV;?1ups@iwFQtkWEhj1MOFBZ`(Ey&R6?a+|;153&(GXlOl~X3|$8dSl1RUwhwI) z&=O^Fp-6?K>=;G=`|c>oiJb%~hNK%X9a_Yu$b0U&J3eP!L^{j3a)X`6vmx5i(PU>l zIXD`R4|ax=!|~z4$gfwnGa4O@_xDHmak4WUjVDKkJ1}{~nATQU#|*$u#-h0}3!(1V zm(M4Mqvy|`e~*~Hqg~YXuRrwjG=E@>d+I+qJUG~@|73K4^&dWP9Jkv4y#6OYV!hk# z_TbsGHavshS;mjyT_K`#cv&_CE&t4IWJK<SR>$yRsUecIqiPvTTmIn2`p2XGkiP#^ zxKx{CcrDI3ysncAC#iG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hR||U!V$Iya zRkLsR5Wt+tl2=oL*{`mGD#O(B>xd7xun~lt;s12^F7eA}wNR#CvQYe(T)uqq`pw&L z2TS<gZ{tJz<#X4q%eQN>I)2}w!8{Zy)$RR}Sg$CHH+s_Z$$9qTcT)L8*uVFa`1he( z*XBL@xa<A@QGc}m{&&*6|9uN;{kXl=X(UsrnL7u`Q-{N`5Q)pq;ZeU|T;tE28GM>K zcDle<J<r0~`Eh#^_l@jp)piFfyZF*H%TQr3^1rvOuAXK;?id=a+<)&RHq=l<4K>tI gLk%_5P(uwh)KEhWHPlc;4gCk{ABFtq4FD(r0Kyj0qyPW_ diff --git a/qcomment/qcomment.php b/qcomment/qcomment.php index 45e6332ef..6b3725799 100755 --- a/qcomment/qcomment.php +++ b/qcomment/qcomment.php @@ -53,6 +53,7 @@ function qcomment_addon_settings(&$a,&$s) { $s .= '<div class="settings-block">'; $s .= '<h3>' . t('Quick Comment Settings') . '</h3>'; $s .= '<div id="qcomment-wrapper">'; + $s .= '<div id="qcomment-desc">' . t("Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies.") . '</div>'; $s .= '<label id="qcomment-label" for="qcomment-words">' . t('Enter quick comments, one per line') . ' </label>'; $s .= '<textarea id="qcomment-words" type="text" name="qcomment-words" >' . htmlspecialchars(unxmlify($words)) . '</textarea>'; $s .= '</div><div class="clear"></div>'; From b0a59bd21a697b88a491fa454a1856e3f746d92c Mon Sep 17 00:00:00 2001 From: friendica <info@friendica.com> Date: Tue, 28 Feb 2012 20:54:02 -0800 Subject: [PATCH 3/6] some small improvements to ljpost --- ljpost.tgz | Bin 0 -> 2502 bytes ljpost/ljpost.css | 4 +- ljpost/ljpost.php | 176 +++++++++++++++++++++++----------------------- 3 files changed, 90 insertions(+), 90 deletions(-) create mode 100644 ljpost.tgz mode change 100644 => 100755 ljpost/ljpost.php diff --git a/ljpost.tgz b/ljpost.tgz new file mode 100644 index 0000000000000000000000000000000000000000..2af2a685aa0c8d000186514368467a2b70eb9c60 G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QrP+pz9A_Xesg+D4yzV-Qi zjjb)&{@0Guq)C$|O`0@m(xgd~CQX_&Y0{)glO|1?G-=YLNs}f`nlx$Bq)C$|O`0@m Q(xeIKPsmd({s2$_0I*!jT>t<8 literal 0 HcmV?d00001 diff --git a/ljpost/ljpost.css b/ljpost/ljpost.css index 50a3d4a06..e0494c5c4 100755 --- a/ljpost/ljpost.css +++ b/ljpost/ljpost.css @@ -1,11 +1,11 @@ -#ljpost-enable-label, #ljpost-username-label, #ljpost-password-label, #ljpost-blog-label, #ljpost-bydefault-label { +#ljpost-enable-label, #ljpost-username-label, #ljpost-password-label, #ljpost-bydefault-label { float: left; width: 200px; margin-top: 10px; } -#ljpost-checkbox, #ljpost-username, #ljpost-password, #ljpost-blog, #ljpost-bydefault { +#ljpost-checkbox, #ljpost-username, #ljpost-password, #ljpost-bydefault { float: left; margin-top: 10px; } diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php old mode 100644 new mode 100755 index 3b2bbe8b4..1ea8dfe55 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -1,43 +1,41 @@ <?php /** -* Name: LiveJournal Post Connector -* Description: Post to LiveJournal (or anything else which uses blogger XMLRPC API) -* Version: 1.0 -* Author: Mike Macgirvin <http://macgirvin.com/profile/mike> -* Author: Tony Baldwin <http://theshi.re/profile/tony> -*/ + * Name: LiveJournal Post Connector + * Description: Post to LiveJournal + * Version: 1.0 + * Author: Tony Baldwin <http://theshi.re/profile/tony> + * Author: Michael Johnston + */ function ljpost_install() { - register_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); - register_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); - register_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); - register_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); + register_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); + register_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); + register_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); + register_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); register_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post'); } function ljpost_uninstall() { - unregister_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); - unregister_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); - unregister_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); - unregister_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); + unregister_hook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); + unregister_hook('notifier_normal', 'addon/ljpost/ljpost.php', 'ljpost_send'); + unregister_hook('jot_networks', 'addon/ljpost/ljpost.php', 'ljpost_jot_nets'); + unregister_hook('connector_settings', 'addon/ljpost/ljpost.php', 'ljpost_settings'); unregister_hook('connector_settings_post', 'addon/ljpost/ljpost.php', 'ljpost_settings_post'); } - - function ljpost_jot_nets(&$a,&$b) { if(! local_user()) return; $lj_post = get_pconfig(local_user(),'ljpost','post'); if(intval($lj_post) == 1) { - $wp_defpost = get_pconfig(local_user(),'ljpost','post_by_default'); - $selected = ((intval($wp_defpost) == 1) ? ' checked="checked" ' : ''); + $lj_defpost = get_pconfig(local_user(),'ljpost','post_by_default'); + $selected = ((intval($lj_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '<div class="profile-jot-net"><input type="checkbox" name="ljpost_enable" ' . $selected . ' value="1" /> ' - . t('Post to Livejournal') . '</div>'; + . t('Post to LiveJournal') . '</div>'; } } @@ -49,7 +47,7 @@ function ljpost_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/ljpost/ljpost.css' . '" media="all" />' . "\r\n"; + $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/ljpost/ljpost.css' . '" media="all" />' . "\r\n"; /* Get the current state of our config variables */ @@ -61,9 +59,8 @@ function ljpost_settings(&$a,&$s) { $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); -$lj_username = get_pconfig(local_user(), 'ljpost', 'lj_username'); -$lj_password = get_pconfig(local_user(), 'ljpost', 'lj_password'); -$lj_blog = get_pconfig(local_user(), 'ljpost', 'lj_blog'); + $lj_username = get_pconfig(local_user(), 'ljpost', 'lj_username'); + $lj_password = get_pconfig(local_user(), 'ljpost', 'lj_password'); /* Add some HTML to the existing form */ @@ -85,14 +82,9 @@ $lj_blog = get_pconfig(local_user(), 'ljpost', 'lj_blog'); $s .= '<input id="ljpost-password" type="password" name="lj_password" value="' . $lj_password . '" />'; $s .= '</div><div class="clear"></div>'; - $s .= '<div id="ljpost-blog-wrapper">'; - $s .= '<label id="ljpost-blog-label" for="ljpost-blog">' . t('LiveJournal API URL') . '</label>'; - $s .= '<input id="ljpost-blog" type="text" name="lj_blog" value="' . $lj_blog . '" />'; - $s .= '</div><div class="clear"></div>'; - $s .= '<div id="ljpost-bydefault-wrapper">'; $s .= '<label id="ljpost-bydefault-label" for="ljpost-bydefault">' . t('Post to LiveJournal by default') . '</label>'; - $s .= '<input id="ljpost-bydefault" type="checkbox" name="wp_bydefault" value="1" ' . $def_checked . '/>'; + $s .= '<input id="ljpost-bydefault" type="checkbox" name="lj_bydefault" value="1" ' . $def_checked . '/>'; $s .= '</div><div class="clear"></div>'; /* provide a submit button */ @@ -104,37 +96,36 @@ $lj_blog = get_pconfig(local_user(), 'ljpost', 'lj_blog'); function ljpost_settings_post(&$a,&$b) { -if(x($_POST,'ljpost-submit')) { + if(x($_POST,'ljpost-submit')) { -set_pconfig(local_user(),'ljpost','post',intval($_POST['ljpost'])); -set_pconfig(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault'])); -set_pconfig(local_user(),'ljpost','lj_username',trim($_POST['lj_username'])); -set_pconfig(local_user(),'ljpost','lj_password',trim($_POST['lj_password'])); -set_pconfig(local_user(),'ljpost','lj_blog',trim($_POST['lj_blog'])); + set_pconfig(local_user(),'ljpost','post',intval($_POST['ljpost'])); + set_pconfig(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault'])); + set_pconfig(local_user(),'ljpost','lj_username',trim($_POST['lj_username'])); + set_pconfig(local_user(),'ljpost','lj_password',trim($_POST['lj_password'])); -} + } } function ljpost_post_local(&$a,&$b) { -// This can probably be changed to allow editing by pointing to a different API endpoint + // This can probably be changed to allow editing by pointing to a different API endpoint -if($b['edit']) -return; + if($b['edit']) + return; -if((! local_user()) || (local_user() != $b['uid'])) -return; + if((! local_user()) || (local_user() != $b['uid'])) + return; -if($b['private'] || $b['parent']) -return; + if($b['private'] || $b['parent']) + return; - $lj_post = intval(get_pconfig(local_user(),'ljpost','post')); + $lj_post = intval(get_pconfig(local_user(),'ljpost','post')); -$lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0); + $lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0); -if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'ljpost','post_by_default'))) -$lj_enable = 1; + if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'ljpost','post_by_default'))) + $lj_enable = 1; if(! $lj_enable) return; @@ -158,59 +149,68 @@ function ljpost_send(&$a,&$b) { if($b['parent'] != $b['id']) return; + // LiveJournal post in the LJ user's timezone. + // Hopefully the person's Friendica account + // will be set to the same thing. -$lj_username = get_pconfig($b['uid'],'ljpost','lj_username'); -$lj_password = get_pconfig($b['uid'],'ljpost','lj_password'); -$lj_blog = get_pconfig($b['uid'],'ljpost','lj_blog'); + $tz = 'UTC'; -if($lj_username && $lj_password && $lj_blog) { + $x = q("select timezone from user where uid = %d limit 1", + intval($b['uid']) + ); + if($x && strlen($x[0]['timezone'])) + $tz = $x[0]['timezone']; -require_once('include/bbcode.php'); + $lj_username = get_pconfig($b['uid'],'ljpost','lj_username'); + $lj_password = get_pconfig($b['uid'],'ljpost','lj_password'); + $lj_blog = 'http://www.livejournal.com/interface/xmlrpc'; -$title = '<title>' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . ''; -$post = $title . bbcode($b['body']); -$post = xmlify($post); + if($lj_username && $lj_password && $lj_blog) { -$year = date('Y'); -$month = date('F'); -$day = date('l'); -$hour = date('H'); -$min = date('i'); + require_once('include/bbcode.php'); + require_once('include/datetime.php'); -$xml = <<< EOT + $title = (($b['title']) ? $b['title'] : t('[no subject]')); + $post = bbcode($b['body']); + $post = xmlify($post); - -LJ.XMLRPC.postevent - - -year$year -mon$month -day$day -hour$hour -min$min -usejournal$lj_blog -event$post -username$lj_username -password$lj_password -subjectfriendica post -lineendingsunix -ver1 -props - -useragentFriendica -taglistfriendica,crosspost - - - + $date = datetime_convert('UTC',$tz,$b['created'],'Y-m-d H:i:s'); + $year = intval(substr($date,0,4)); + $mon = intval(substr($date,5,2)); + $day = intval(substr($date,8,2)); + $hour = intval(substr($date,11,2)); + $min = intval(substr($date,14,2)); + + $xml = <<< EOT + + + LJ.XMLRPC.postevent + + + + username$lj_username + password$lj_password + event$post + subject$title + lineendingsunix + year$year + mon$mon + day$day + hour$hour + min$min + + + EOT; -logger('ljpost: data: ' . $xml, LOGGER_DATA); + logger('ljpost: data: ' . $xml, LOGGER_DATA); -if($lj_blog !== 'test') -$x = post_url($lj_blog,$xml); -logger('posted to livejournal: ' . ($x) ? $x : ''); + if($lj_blog !== 'test') + $x = post_url($lj_blog,$xml); + logger('posted to livejournal: ' . ($x) ? $x : '', LOGGER_DEBUG); } } + From 199df2a28bedc1fefb40d958127e60045ce44004 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 21:21:03 -0800 Subject: [PATCH 4/6] inconsistent file extension --- ljpost.tar.gz | Bin 2267 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ljpost.tar.gz diff --git a/ljpost.tar.gz b/ljpost.tar.gz deleted file mode 100644 index b3f354fc337df7e5ff9f9f049aa1bf3b580a1d5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2267 zcmV<12qgC(iwFo;gG^5V18iz=Z*z1mbYXG;?OJVb+c*-=*YmGng`lzv+ltyvx|iAx zy4`H|7U?zDW)F903PUfn#Y7f;66M6$?SJ1Hilk&)PUK62!(mGVur=g7Gn_XL<-}KW zo(X5~F~ApNXsDA3P=ejSSzi?sV$lW_|UHAFn9yxqet<=af;iZJ^37#zP zT6f?4|LKSe{}&(qc{G0n8R+1n@4nmOfA{5)``q~d;0WmM3-|D7j~qOLE*s-d?*G9F z_`KC}o;_V(rot*BnnkRi zQp1K`1vaPEn&e4`E}ctYhoUFvE3!M7lu4> zHgXB46kKI}=T#kG!UdZ!cuaUYYl@oDB;0~`#l<+G;)bW!Su-%jk!=ACbQFM8A;7y0 zVa@8Mu+mn$VHYeQp!H?Lk$JN2$~^h%&fI`}usb&pAMVf%$gkzn2EY$;s^bvuXFR5Y zk{$%mj4$YYo*bhsA8z$|oKIQuwe7Qp`oM_Cu^#o>_wA?qUiay~uVbH0+D}MfAgIV` zyVH^6A~6M&a6rU|{rF0XAVV^x5b@yA37fX7oL!}p-LZy8FoT_#QIR_3XHL?p`zevZgyIqHea(jkG-^uR|9HC)I zKrG3`GKTY#QmGA`on-D!Dakmwp(OAUGV|bomMfK15WufV!U9V0NR{UFdLv}}WJh8a zN7M`L&xL_wmRy7EcxaV^EM-$cZ-oL}$uOcSFVJSmrX63F5?}oc& zN5QH>Pe!Z8xi>lsR*2~F&XU*CrbJp%qyl}vGMLyX3j_WxMTpS^zZn+9khKA_3y!lp z_p%0|Su_MTlsmBFa=C+QtY;i{@$<#IGacsi7HT!NuM;@COP^;Og+a%C4{(EPOQ)t@ z8NHAp2PwVLQhzijM3LCI^wowK7V2`+D}2+tNxk`;rW>MS&!=(CdP%o%BWA|bE3MqA zT)NrzpUXo^YbcS{#TIq2BDO4scNIsgQUhgb>rljuUY8+@Ue)SBOg*rGsfKr%O@~}_ z!x@em)9E>@&aY*3?_w|mS*d)bvBu@JvY0eiHT`6r`?^NcN!HwGhNH%4dal-JWj^m> zGy|!ORz4fUm83PpnWFOuhQspG+-P!jjlqy!Yb>}flV3la?Pe>9Rv%o&)S7){MSTq0 zEY%^jgMkc7ot5;YF;(5$2!Bb;*|(F`4EmNr2K{Aa&00CDp059WNrU4FI?n|QDe*{_ z`!gnpp9=xqUXwGa;4s!Et6gg`YgPBGN!3bii1p|z(E~2{D5-_1F@V%g&9?4pS>;us zdR=Kj&wAV5AD_Sfc%ge5CD-oA1zE%1tE+DX66=$m{oH|8pdm)Ji`s-MW1%r;%uglI0@^;R_%=jHANysJ>Dm!$nf^cJ((=tZ({ZBUXfnqIlmjU|v zg@^q9J6YK=c`_u(oHJ>f6=tN*Q?`KH09;srQxZJXU`5W_U0Fp&<4b|=ri*s1XvHT5kW~(t?@^xv8jh-8M#p#I1=Cw^?{VcQw~a+>?*!4R5;D z`KAswR$O?~m}U2wwi~28%kHzUqjYXC1(c%xsLu>3m6FzKK~;nTT>SRjR%g*MR#5M_ zxUfOJ?2@zhZ{MDN82|YC;&tV8lII#8_qL#TT0^ykT3h_Gn8s#F7cqcM3y~F5Hnws3 p8o!X%-oKSc(5-o&`WJke|G)lEfN$g5_%{A*;}1Kp{X+mK001^3Y~cU^ From e964ed80087532a507772d6081c630c70bfe51fa Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 22:41:01 -0800 Subject: [PATCH 5/6] seems the subject isn't really required, contrary to the docs. --- ljpost/ljpost.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 1ea8dfe55..6a85d8f2f 100755 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -170,7 +170,7 @@ function ljpost_send(&$a,&$b) { require_once('include/bbcode.php'); require_once('include/datetime.php'); - $title = (($b['title']) ? $b['title'] : t('[no subject]')); + $title = $b['title']; $post = bbcode($b['body']); $post = xmlify($post); From 665ffab5c7572ba274402e9d42736590383d185d Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 22:41:33 -0800 Subject: [PATCH 6/6] rebuild tgz --- ljpost.tgz | Bin 2502 -> 2494 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/ljpost.tgz b/ljpost.tgz index 2af2a685aa0c8d000186514368467a2b70eb9c60..5189d6e09312ad392b92620e95eda3e691992840 100644 GIT binary patch literal 2494 zcmV;v2|@NBiwFRh$W2cG1MOMsbJ|D}_gC{*OtiiTQh>lVwu=C+Y}T7x%DMOw=jyJ! zDN0BK8e6Z`!@%z5f4`oWB#^Knx6XdJ>2j6POwX@-`ZYb0dm9FEV(dL7b%0J!dwYky z&{!RNJ_@!~}dy+HpkJ={l^evptUfk!`xyc~ZE=otI<2GH9e8T&Yy2hm+z z(0B__u`=EOY)N;5^duqvEZ#|Bv1D6pW<3h9JvLtg0%~7NPEP%GH>dvNj{YVmmw+qW zyrYXtkQGk;1_zg5|5O)mf&M=_xtz;#hxO+NX7l;ML^_*H>(3DL(m0KARBtqDGBF~Y zKmh_g`f%XhG686aW*D3cDo@F*UR>D}8tF}4sv;y1Ke;#Ey2NOp;ShDD1`^%I)7=D& zCri4>Ox;Wt!-}yB#>6%t)r+Eq04e<(>Bw@hb%*VtCVprz)<^mZ+yu3UNFUhb9$Bs# z$3sn&)fU*a1vb@21LB7%)a_-61=J*1Xvl}^Kh%T+uy0OWOa-(HDz@Pn^h<%St07~A z^h_|NHcIMx#hIWt=*ocsN{w``>(@%R%is`hkEzjj^1A_thHWDdi{fPI!pVX$(*{l% z6q+-P;sDJtvP>U&<{jpoLMjLd?vPI`%+42PPO~+l%WiZh@mvR+w*G}1*d_iQ$aaTX zE=WVds0m&qh84#eaw0q(YRrlNMMGs`#yE{={Q{d9RS5$N=>lCt9=3@&)S%o^YtupP zm*^K?%Xj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