]> git.saurik.com Git - cydia.git/commitdiff
Changed cache control.
authorJay Freeman (saurik) <saurik@saurk.com>
Mon, 21 Jun 2010 07:10:52 +0000 (07:10 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:14:00 +0000 (07:14 +0000)
Cydia.app/package.js
Cydia.mm

index 8cca069f0d664e6563bd8356419bf5f51e6bf1e6..6e091cf29f28bccd4377787c0e5adfb4d6c773fd 100644 (file)
@@ -33,10 +33,6 @@ function space(selector, html, max) {
     }
 }
 
-function cache(url) {
-    return url.replace('://', '://wpc.03A4.edgecastcdn.net/8003A4/');
-}
-
 var swap_, swap = function (on, off, time) {
     setTimeout(swap_(on, off, time), time);
 };
@@ -57,7 +53,9 @@ var special_ = function () {
     var idc = encodeURIComponent(id);
     var name = package.name;
     var icon = 'cydia://package-icon/' + idc;
+
     var api = 'http://cydia.saurik.com/api/';
+    var capi = 'http://cache.cydia.saurik.com/api/';
 
     var support = package.support;
 
@@ -71,7 +69,7 @@ var special_ = function () {
     $("#name").html(name);
     space("#latest", package.latest, 96);
 
-    $.xhr(cache(api + 'package/' + idc), 'GET', {}, null, {
+    $.xhr(capi + 'package/' + idc, 'GET', {}, null, {
         success: function (value) {
             value = eval(value);
 
index 86da62df3ccca49fbbe12248c48c3ab10eb3950f..f4b4a8ed757368b4f760448821a58bb08ed5e3d0 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -713,11 +713,8 @@ NSUInteger DOMNodeList$countByEnumeratingWithState$objects$count$(DOMNodeList *s
 
 - (NSString *) stringByCachingURLWithCurrentCDN {
     return [self
-        stringByReplacingOccurrencesOfString:@"://"
-        withString:@"://wpc.03A4.edgecastcdn.net/8003A4/"
-        options:0
-        /* XXX: this is somewhat inaccurate */
-        range:NSMakeRange(0, 10)
+        stringByReplacingOccurrencesOfString:@"://cydia.saurik.com/"
+        withString:@"://cache.cydia.saurik.com/"
     ];
 }
 
@@ -6256,24 +6253,19 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) _leftButtonClicked {
-    UIActionSheet *sheet = [[[UIActionSheet alloc]
-        initWithTitle:UCLocalize("ABOUT_CYDIA")
-        buttons:[NSArray arrayWithObjects:UCLocalize("CLOSE"), nil]
-        defaultButtonIndex:0
-        delegate:self
-        context:@"about"
-    ] autorelease];
+    UIAlertView *alert = [[[UIAlertView alloc] init] autorelease];
+    [alert setTitle:UCLocalize("ABOUT_CYDIA")];
+    [alert addButtonWithTitle:UCLocalize("CLOSE")];
+    [alert setCancelButtonIndex:0];
 
-    [sheet setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
-
-    [sheet setBodyText:
+    [alert setMessage:
         @"Copyright (C) 2008-2010\n"
         "Jay Freeman (saurik)\n"
         "saurik@saurik.com\n"
         "http://www.saurik.com/"
     ];
 
-    [sheet popupAlertAnimated:YES];
+    [alert show];
 }
 
 - (NSString *) leftButtonTitle {