Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[livejournal] r22233: LJSUP-12453: Repost not working for user...

Committer: anazarov
LJSUP-12453: Repost not working for users and community with "_"
U   trunk/htdocs/js/basic.js
Modified: trunk/htdocs/js/basic.js
===================================================================
--- trunk/htdocs/js/basic.js	2012-06-14 07:01:51 UTC (rev 22232)
+++ trunk/htdocs/js/basic.js	2012-06-14 08:45:57 UTC (rev 22233)
@@ -405,13 +405,16 @@
 			result = {};
 
 		if (!regRes || !regRes[1]) { return null; }
-		if (regRes[1] !== 'users') {
+
+		if (!regRes[1].match(/^(?:users|community)$/)) {
 			result.journal = regRes[1];
 		} else {
 			if (!regRes[2]) { return null; }
 			result.journal = regRes[2];
 		}
 
+			result.journal = result.journal.replace(/-/g, '_');
+
 		if (regRes[3]) {
 			result.ditemid = parseInt(regRes[3], 10);
 		}

Tags: anazarov, js, livejournal, nfokz
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments