diff -r 2f6f6f7551ca -r 32102edaa81b web/wp-content/plugins/google-sitemap-generator/sitemap-ui.php --- a/web/wp-content/plugins/google-sitemap-generator/sitemap-ui.php Thu Sep 16 15:45:36 2010 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/sitemap-ui.php Mon Nov 19 18:26:13 2012 +0100 @@ -1,7 +1,7 @@ sg = $sitemapBuilder; + $this->sg = &$sitemapBuilder; if(floatval($wp_version) >= 2.7) { $this->mode = 27; @@ -74,80 +74,14 @@ $this->sg->Initate(); - //All output should go in this var which get printed at the end $message=""; - if(!$snl) { - - if(isset($_GET['sm_hidedonate'])) { - $this->sg->SetOption('i_hide_donated',true); - $this->sg->SaveOptions(); - } - if(isset($_GET['sm_donated'])) { - $this->sg->SetOption('i_donated',true); - $this->sg->SaveOptions(); - } - if(isset($_GET['sm_hide_note'])) { - $this->sg->SetOption('i_hide_note',true); - $this->sg->SaveOptions(); - } - if(isset($_GET['sm_hidedonors'])) { - $this->sg->SetOption('i_hide_donors',true); - $this->sg->SaveOptions(); - } - if(isset($_GET['sm_hide_works'])) { - $this->sg->SetOption('i_hide_works',true); - $this->sg->SaveOptions(); - } - - - if(isset($_GET['sm_donated']) || ($this->sg->GetOption('i_donated')===true && $this->sg->GetOption('i_hide_donated')!==true)) { - ?> -
-

">

-
- sg->GetOption('i_donated') !== true && $this->sg->GetOption('i_install_date')>0 && $this->sg->GetOption('i_hide_note')!==true && time() > ($this->sg->GetOption('i_install_date') + (60*60*24*30))) { - ?> -
-

sg->GetRedirectLink("sitemap-donate-note"),__('Thanks for using this plugin! You\'ve installed this plugin over a month ago. If it works and you are satisfied with the results, isn\'t it worth at least a few dollar? Donations help me to continue support and development of this free software! Sure, no problem!','sitemap')); ?> " style="float:right; display:block; border:none; margin-left:10px;"> " style="float:right; display:block; border:none;">

-
-
- sg->GetOption('i_install_date')>0 && $this->sg->GetOption('i_hide_works')!==true && time() > ($this->sg->GetOption('i_install_date') + (60*60*24*15))) { - ?> -
-

sg->GetRedirectLink("sitemap-works-note"),__('Thanks for using this plugin! You\'ve installed this plugin some time ago. If it works and your are satisfied, why not rate it and recommend it to others? :-)','sitemap')); ?> " style="float:right; display:block; border:none;">

-
-
- -
-

-
-
- $v) { //Try to filter out passwords etc... - if(preg_match("/(pass|login|pw|secret|user|usr)/si",$v)) continue; + if(preg_match("/pass|login|pw|secret|user|usr|key|auth|token/si",$k)) continue; $popts[$k] = htmlspecialchars($v); } print_r($popts); @@ -249,7 +183,7 @@ //Options of the category "Basic Settings" are boolean, except the filename and the autoprio provider if(substr($k,0,5)=="sm_b_") { - if($k=="sm_b_filename" || $k=="sm_b_fileurl_manual" || $k=="sm_b_filename_manual" || $k=="sm_b_prio_provider" || $k=="sm_b_manual_key" || $k == "sm_b_yahookey" || $k == "sm_b_style" || $k == "sm_b_memory") { + if($k=="sm_b_filename" || $k=="sm_b_fileurl_manual" || $k=="sm_b_filename_manual" || $k=="sm_b_prio_provider" || $k=="sm_b_manual_key" || $k == "sm_b_style" || $k == "sm_b_memory") { if($k=="sm_b_filename_manual" && strpos($_POST[$k],"\\")!==false){ $_POST[$k]=stripslashes($_POST[$k]); } @@ -297,6 +231,18 @@ $this->sg->_options[$k] = $enabledTaxonomies; + } else if($k=='sm_in_customtypes') { + + $enabledPostTypes = array(); + + foreach(array_keys((array) $_POST[$k]) AS $postTypeName) { + if(empty($postTypeName) || !post_type_exists($postTypeName)) continue; + + $enabledPostTypes[] = $postTypeName; + } + + $this->sg->_options[$k] = $enabledPostTypes; + } else $this->sg->_options[$k]=(bool) $_POST[$k]; //Options of the category "Change frequencies" are string } else if(substr($k,0,6)=="sm_cf_") { @@ -341,6 +287,74 @@ echo $message; ?>

sg->SetOption('i_hide_donated',true); + $this->sg->SaveOptions(); + } + if(isset($_GET['sm_donated'])) { + $this->sg->SetOption('i_donated',true); + $this->sg->SaveOptions(); + } + if(isset($_GET['sm_hide_note'])) { + $this->sg->SetOption('i_hide_note',true); + $this->sg->SaveOptions(); + } + if(isset($_GET['sm_hidedonors'])) { + $this->sg->SetOption('i_hide_donors',true); + $this->sg->SaveOptions(); + } + if(isset($_GET['sm_hide_works'])) { + $this->sg->SetOption('i_hide_works',true); + $this->sg->SaveOptions(); + } + + + if(isset($_GET['sm_donated']) || ($this->sg->GetOption('i_donated')===true && $this->sg->GetOption('i_hide_donated')!==true)) { + ?> +
+

">

+
+ sg->GetOption('i_donated') !== true && $this->sg->GetOption('i_install_date')>0 && $this->sg->GetOption('i_hide_note')!==true && time() > ($this->sg->GetOption('i_install_date') + (60*60*24*30))) { + ?> +
+

sg->GetRedirectLink("sitemap-donate-note"),__('Thanks for using this plugin! You\'ve installed this plugin over a month ago. If it works and you are satisfied with the results, isn\'t it worth at least a few dollar? Donations help me to continue support and development of this free software! Sure, no problem!','sitemap')); ?> " style="float:right; display:block; border:none; margin-left:10px;"> " style="float:right; display:block; border:none;">

+
+
+ sg->GetOption('i_install_date')>0 && $this->sg->GetOption('i_hide_works')!==true && time() > ($this->sg->GetOption('i_install_date') + (60*60*24*15))) { + ?> +
+

sg->GetRedirectLink("sitemap-works-note"),__('Thanks for using this plugin! You\'ve installed this plugin some time ago. If it works and your are satisfied, why not rate it and recommend it to others? :-)','sitemap')); ?> " style="float:right; display:block; border:none;">

+
+
+ Due to limitations of the WordPress scheduler, it might take another 60 seconds until the build process is actually started.','sitemap'); + } else { + $diffMsg = str_replace("%s",$diff,__('Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!','sitemap')); + } + ?> +
+

+
+
+ =")): ?> @@ -593,12 +636,9 @@ HtmlPrintBoxHeader('sm_smres',__('Sitemap Resources:','sitemap'),true); ?> - - - - - - + + +
@@ -634,7 +674,7 @@ GetStartTime(); @@ -681,19 +721,7 @@ echo "
  • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=google&noheader=true",'sitemap'),__('There was a problem while notifying Google. View result','sitemap')) . "
  • "; } } - - if($status->_usedYahoo) { - if($status->_yahooSuccess) { - echo "
  • " .__("YAHOO was successfully notified about changes.",'sitemap'). "
  • "; - $yt = $status->GetYahooTime(); - if($yt>4) { - echo "
  • " . str_replace("%time%",$yt,__("It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
  • "; - } - } else { - echo "
  • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=yahoo&noheader=true",'sitemap'),__('There was a problem while notifying YAHOO. View result','sitemap')) . "
  • "; - } - } - + if($status->_usedMsn) { if($status->_msnSuccess) { echo "
  • " .__("Bing was successfully notified about changes.",'sitemap'). "
  • "; @@ -706,18 +734,6 @@ } } - if($status->_usedAsk) { - if($status->_askSuccess) { - echo "
  • " .__("Ask.com was successfully notified about changes.",'sitemap'). "
  • "; - $at = $status->GetAskTime(); - if($at>4) { - echo "
  • " . str_replace("%time%",$at,__("It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
  • "; - } - } else { - echo "
  • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=ask&noheader=true",'sitemap'),__('There was a problem while notifying Ask.com. View result','sitemap')) . "
  • "; - } - } - $et = $status->GetTime(); $mem = $status->GetMemoryUsage(); @@ -755,6 +771,10 @@ echo "
  • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&noheader=true",'sitemap'),__('If you changed something on your server or blog, you should rebuild the sitemap manually.','sitemap')) . "
  • "; } echo "
  • " . str_replace("%d",wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&sm_do_debug=true",'sitemap'),__('If you encounter any problems with the build process you can use the debug function to get more information.','sitemap')) . "
  • "; + + if(version_compare($wp_version,"2.9",">=") && version_compare(PHP_VERSION,"5.1",">=")) { + echo "
  • " . str_replace("%s",$this->sg->GetRedirectLink('sitemap-info-beta'), __('There is a new beta version of this plugin available which supports the new multi-site feature of WordPress as well as many other new functions! More information and download','sitemap')) . "
  • "; + } ?> @@ -794,7 +814,7 @@ [?] @@ -811,17 +831,6 @@ sg->GetRedirectLink('sitemap-lwt'),__('No registration required, but you can join the Bing Webmaster Tools to check crawling statistics.','sitemap')); ?>
  • - sg->GetOption("b_pingask")==true?"checked=\"checked\"":"") ?> /> -
    - -
  • -
  • - sg->GetOption("b_pingyahoo")==true?"checked=\"checked\"":"") ?> /> -
    -
    - sg->GetRedirectLink('sitemap-ykr'),' (Web Services by Yahoo!)'),__('Don\'t you have such a key? Request one here! %s2','sitemap')); ?> -
  • -