[geeklog-cvs] geeklog: Whitespace fixes (tabs and extra spaces at the end of l...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun May 17 11:35:17 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/55ce3b9ba68c
changeset: 7035:55ce3b9ba68c
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun May 17 17:22:18 2009 +0200
description:
Whitespace fixes (tabs and extra spaces at the end of lines) only

diffstat:

1 file changed, 242 insertions(+), 243 deletions(-)
plugins/xmlsitemap/functions.inc |  485 ++++++++++++++++++--------------------

diffs (truncated from 622 to 300 lines):

diff -r 99d594b20bc0 -r 55ce3b9ba68c plugins/xmlsitemap/functions.inc
--- a/plugins/xmlsitemap/functions.inc	Sun May 17 17:13:16 2009 +0200
+++ b/plugins/xmlsitemap/functions.inc	Sun May 17 17:22:18 2009 +0200
@@ -70,11 +70,11 @@
 function plugin_chkVersion_xmlsitemap()
 {
     global $_CONF;
-    
+
     require_once $_CONF['path'] . 'plugins/xmlsitemap/autoinstall.php';
-    
+
     $inst_parms = plugin_autoinstall_xmlsitemap('xmlsitemap');
-    
+
     return $inst_parms['info']['pi_version'];
 }
 
@@ -86,7 +86,7 @@
 function plugin_upgrade_xmlsitemap()
 {
     global $_CONF, $_TABLES;
-    
+
     $installed_version = DB_getItem($_TABLES['plugins'], 'pi_version',
                                     "pi_name = 'xmlsitemap'");
     $code_version = plugin_chkVersion_xmlsitemap();
@@ -94,18 +94,18 @@
         // nothing to do
         return TRUE;
     }
-    
+
     require_once $_CONF['path'] . 'plugins/xmlsitemap/autoinstall.php';
-    
+
     if (! plugin_compatible_with_this_version_xmlsitemap('xmlsitemap')) {
         return 3002;
     }
-    
+
     $inst_parms = plugin_autoinstall_xmlsitemap('xmlsitemap');
     $pi_gl_version = $inst_parms['info']['pi_gl_version'];
-    
+
     DB_query("UPDATE {$_TABLES['plugins']} SET pi_version = '$code_version', pi_gl_version = '$pi_gl_version' WHERE pi_name = 'xmlsitemap'");
-    
+
     return TRUE;
 }
 
@@ -117,7 +117,7 @@
 function plugin_autouninstall_xmlsitemap()
 {
     global $_XMLSMAP_CONF;
-    
+
     $out = array (
         /* give the name of the tables, without $_TABLES[] */
         'tables' => array(),
@@ -139,9 +139,9 @@
 function XMLSMAP_loadConfig()
 {
     global $_CONF;
-    
+
     require_once $_CONF['path_system'] . 'classes/config.class.php';
-    
+
     $config = config::get_instance();
     if ($config->group_exists('xmlsitemap')) {
         return $config->get_config('xmlsitemap');
@@ -156,11 +156,11 @@
 function XMLSMAP_esc($str)
 {
     static $encoding = NULL;
-    
+
     if ($encoding === NULL) {
         $encoding = COM_getCharset();;
     }
-    
+
     $str = str_replace(
         array('<', '>', '&', '"', '''),
         array(   '<',    '>',     '&',      '"',      "'"),
@@ -175,7 +175,7 @@
 function XMLSMAP_str($index, $noesc = FALSE)
 {
     global $LANG_XMLSMAP;
-    
+
     if (isset($LANG_XMLSMAP[$index])) {
         if ($noesc) {
             return $LANG_XMLSMAP[$index];
@@ -197,19 +197,19 @@
 function XMLSMAP_update($type = NULL, $include = NULL, $exclude = NULL)
 {
     global $_CONF, $_XMLSMAP_CONF;
-    
+
     if (($type !== NULL)
      AND !in_array(strtolower($type), $_XMLSMAP_CONF['types'])) {
         // Notified about content change, but from an irrelevant plugin, one
         // that doesn't implement 'plugin_getiteminfo_xxx' function.
         return TRUE;
     }
-    
+
     require_once $_CONF['path'] . 'plugins/xmlsitemap/xmlsitemap.class.php';
-    
+
     $charset = COM_getCharset();
     $sitemap = new SitemapXML($charset);
-    
+
     // Set sitemap file names
     if (empty($_XMLSMAP_CONF['mobile_sitemap_file'])) {
         $sitemap->setFileNames($_XMLSMAP_CONF['sitemap_file']);
@@ -219,32 +219,32 @@
             $_XMLSMAP_CONF['mobile_sitemap_file']
         );
     }
-    
-	// Set types
-	$types = $_XMLSMAP_CONF['types'];
-	if ($include !== NULL) {
-		if (($index = array_search($exclude, $types)) === FALSE) {
-			$types[] = $include;
-		}
-	}
-	if ($exclude !== NULL) {
-		if (($index = array_search($exclude, $types)) !== FALSE) {
-			unset($types[$index]);
-		}
-	}
-	
+
+    // Set types
+    $types = $_XMLSMAP_CONF['types'];
+    if ($include !== NULL) {
+        if (($index = array_search($exclude, $types)) === FALSE) {
+            $types[] = $include;
+        }
+    }
+    if ($exclude !== NULL) {
+        if (($index = array_search($exclude, $types)) !== FALSE) {
+            unset($types[$index]);
+        }
+    }
+
     $sitemap->setTypes($types);
-	
+
     // Set priorities
     foreach ($_XMLSMAP_CONF['priorities'] as $type => $pri) {
         $sitemap->setPriority($type, $pri);
     }
-    
+
     // Set update frequencies
     foreach ($_XMLSMAP_CONF['frequencies'] as $type => $freq) {
         $sitemap->setChangeFreq($type, $freq);
     }
-    
+
     return $sitemap->create();
 }
 
@@ -269,31 +269,31 @@
 */
 function plugin_enablestatechange_xmlsitemap($enable)
 {
-	global $_CONF, $_XMLSMAP_CONF;
-	
-	if ($enable) {
-		/**
-		* @note
-		*
-		* At this time, $_XMLSMAP_CONF is visible only in
-		* PLG_enableStateChange().  So we have to reload them from DB.
-		*/
-		$_XMLSMAP_CONF = XMLSMAP_loadConfig();
-		
-	    XMLSMAP_update();
-	} else {
-		if ($_XMLSMAP_CONF['sitemap_file'] != '') {
-			if (!@unlink($_CONF['path_html'] . $_XMLSMAP_CONF['sitemap_file'])) {
-				COM_errorLog('Xmlsitemap: cannot delete a sitemap: ' . $_CONF['path_html'] . $_XMLSMAP_CONF['sitemap_file']);
-			}
-		}
-		
-		if (! empty($_XMLSMAP_CONF['mobile_sitemap_file'])) {
-			if (!@unlink($_CONF['path_html'] . $_XMLSMAP_CONF['mobile_sitemap_file'])) {
-				COM_errorLog('Xmlsitemap: cannot delete a sitemap: ' . $_CONF['path_html'] . $_XMLSMAP_CONF['mobile_sitemap_file']);
-			}
-		}
-	}
+    global $_CONF, $_XMLSMAP_CONF;
+
+    if ($enable) {
+        /**
+        * @note
+        *
+        * At this time, $_XMLSMAP_CONF is visible only in
+        * PLG_enableStateChange().  So we have to reload them from DB.
+        */
+        $_XMLSMAP_CONF = XMLSMAP_loadConfig();
+
+        XMLSMAP_update();
+    } else {
+        if ($_XMLSMAP_CONF['sitemap_file'] != '') {
+            if (!@unlink($_CONF['path_html'] . $_XMLSMAP_CONF['sitemap_file'])) {
+                COM_errorLog('Xmlsitemap: cannot delete a sitemap: ' . $_CONF['path_html'] . $_XMLSMAP_CONF['sitemap_file']);
+            }
+        }
+
+        if (! empty($_XMLSMAP_CONF['mobile_sitemap_file'])) {
+            if (!@unlink($_CONF['path_html'] . $_XMLSMAP_CONF['mobile_sitemap_file'])) {
+                COM_errorLog('Xmlsitemap: cannot delete a sitemap: ' . $_CONF['path_html'] . $_XMLSMAP_CONF['mobile_sitemap_file']);
+            }
+        }
+    }
 }
 
 /**
@@ -305,64 +305,64 @@
 function XMLSITEMAP_checkChange($name)
 {
     global $_CONF, $_PLUGINS, $_TABLES, $_XMLSMAP_CONF;
-	
-	if (count($_XMLSMAP_CONF[$name]) == 0) {
-		return;
-	}
-	
-	$enabled_plugins = $_PLUGINS;
-	$enabled_plugins[] = 'article';
-	$valids = array();
-	
-	// Check and add a valid value to $valids
-	foreach ($_XMLSMAP_CONF[$name] as $key => $value) {
-		switch ($name) {
-			case 'types':
-				if (in_array($value, $enabled_plugins)) {
-					$valids[] = $value;
-				}
-				break;
-			
-			case 'priorities':
-				if (!is_numeric($key) AND in_array($key, $enabled_plugins)) {
-					$value = (float) $value;
-					
-					if (($value < 0.0) OR ($value > 1.0)) {
-						$value = 0.5;
-					}
-					
-				 	$valids[$key] = $value;
-				}
-				break;
-			
-			case 'frequencies':
-				$value = strtolower(trim($value));
-				$valid_change_freqs = array('always', 'hourly', 'daily', 'weekly',
+
+    if (count($_XMLSMAP_CONF[$name]) == 0) {
+        return;
+    }
+
+    $enabled_plugins = $_PLUGINS;
+    $enabled_plugins[] = 'article';
+    $valids = array();
+
+    // Check and add a valid value to $valids
+    foreach ($_XMLSMAP_CONF[$name] as $key => $value) {
+        switch ($name) {
+            case 'types':
+                if (in_array($value, $enabled_plugins)) {
+                    $valids[] = $value;
+                }
+                break;
+
+            case 'priorities':
+                if (!is_numeric($key) AND in_array($key, $enabled_plugins)) {
+                    $value = (float) $value;
+
+                    if (($value < 0.0) OR ($value > 1.0)) {
+                        $value = 0.5;
+                    }
+
+                     $valids[$key] = $value;
+                }
+                break;
+
+            case 'frequencies':
+                $value = strtolower(trim($value));
+                $valid_change_freqs = array('always', 'hourly', 'daily', 'weekly',
             'monthly', 'yearly', 'never');
-				
-				if (!is_numeric($key) AND in_array($key, $enabled_plugins)
-				 AND (in_array($value, $valid_change_freqs))) {



More information about the geeklog-cvs mailing list