1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

v2.10.3.1

This commit is contained in:
gnosygnu
2015-10-18 22:17:57 -04:00
parent 8e18af05b6
commit 4f43f51b18
1935 changed files with 12500 additions and 12889 deletions

View File

@@ -16,8 +16,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.relatedSites; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.pages.skins.*;
import gplx.xowa.html.hrefs.*;
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.wikis.pages.skins.*;
import gplx.xowa.htmls.hrefs.*;
class Sites_xtn_skin_itm implements Xopg_xtn_skin_itm {
private List_adp itms = List_adp_.new_();
private Sites_html_bldr html_bldr;
@@ -41,7 +41,7 @@ public class Sites_html_bldr implements Bry_fmtr_arg {
hash.Clear();
fmtr_grp.Bld_bfr_many(bfr, xtn_mgr.Msg_related_sites(), this);
}
public void XferAry(Bry_bfr bfr, int idx) {
public void Fmt__do(Bry_bfr bfr) {
Xowe_wiki wiki = xtn_mgr.Wiki();
Xoh_href_parser href_parser = wiki.Appe().Html__href_parser();
for (int i = 0; i < list_len; ++i) {
@@ -55,8 +55,8 @@ public class Sites_html_bldr implements Bry_fmtr_arg {
}
private static byte[] Xto_href(Bry_bfr tmp_bfr, Bry_fmtr url_fmtr, Xoh_href_parser href_parser, Xowe_wiki wiki, Xow_xwiki_itm xwiki_itm, byte[] ttl_page_db) {
Xoa_app_.Utl__encoder_mgr().Href().Encode(tmp_bfr, ttl_page_db);
byte[] rv = url_fmtr.Fmt_(xwiki_itm.Url_fmt()).Bld_bry_many(tmp_bfr, tmp_bfr.Xto_bry_and_clear());
if (xwiki_itm.Domain_tid() != Xow_domain_type_.Int__other)
byte[] rv = url_fmtr.Fmt_(xwiki_itm.Url_fmt()).Bld_bry_many(tmp_bfr, tmp_bfr.To_bry_and_clear());
if (xwiki_itm.Domain_tid() != Xow_domain_tid_.Int__other)
rv = Bry_.Add(Xoh_href_.Bry__site, rv);
return rv;
}

View File

@@ -47,10 +47,10 @@ class Sites_html_bldr_fxt {
this.xtn_mgr = wiki.Xtn_mgr().Xtn_sites();
xtn_mgr.Enabled_y_();
xtn_mgr.Xtn_init_by_wiki(wiki);
wiki.Xwiki_mgr().Add_many(Bry_.new_a7(String_.Concat_lines_nl_skip_last
( "w|en.wikipedia.org/wiki/$1|Wikipedia"
, "commons|commons.wikimedia.org/wiki/Category:$1|Wikimedia Commons"
, "dmoz|http://www.dmoz.org/$1|DMOZ"
wiki.Xwiki_mgr().Add_by_csv(Bry_.new_a7(String_.Concat_lines_nl_skip_last
( "0|w|en.wikipedia.org/wiki/~{0}|Wikipedia"
, "0|commons|commons.wikimedia.org/wiki/Category:~{0}|Wikimedia Commons"
, "0|dmoz|http://www.dmoz.org/~{0}|DMOZ"
)));
Init_regy_mgr("commons", "dmoz");
this.page = wiki.Parser_mgr().Ctx().Cur_page();
@@ -64,6 +64,6 @@ class Sites_html_bldr_fxt {
Bry_bfr tmp_bfr = Bry_bfr.reset_(255);
Sites_xtn_skin_itm skin_itm = (Sites_xtn_skin_itm)page.Html_data().Xtn_skin_mgr().Get_or_null(Sites_xtn_skin_itm.KEY);
skin_itm.Write(tmp_bfr, page);
Tfds.Eq_str_lines(expd, tmp_bfr.Xto_str_and_clear());
Tfds.Eq_str_lines(expd, tmp_bfr.To_str_and_clear());
}
}

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.relatedSites; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import gplx.xowa.wikis.xwikis.*; import gplx.xowa.pages.skins.*;
import gplx.xowa.wikis.xwikis.*; import gplx.xowa.wikis.pages.skins.*;
public class Sites_regy_mgr implements GfoInvkAble {
private Hash_adp_bry hash = Hash_adp_bry.cs();
private Xow_xwiki_mgr xwiki_mgr;