]> git.mxchange.org Git - friendica.git/blobdiff - addon/randplace/randplace.php
Merge branch 'tobiasd-master'
[friendica.git] / addon / randplace / randplace.php
index 6203dab8f122a83f524199df79b8d1f4d797a86e..d7ea65c9d23e0b2083b2c38bf50f25d6afdf301c 100644 (file)
@@ -37,13 +37,13 @@ function randplace_install() {
        /**
         *
         * Then we'll attach into the plugin settings page, and also the 
-        * settings post hooks so that we can create and update
+        * settings post hook so that we can create and update
         * user preferences.
         *
         */
 
        register_hook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings');
-       register_hook('settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
+       register_hook('plugin_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
 
        logger("installed randplace");
 }
@@ -61,7 +61,7 @@ function randplace_uninstall() {
 
        unregister_hook('post_local',    'addon/randplace/randplace.php', 'randplace_post_hook');
        unregister_hook('plugin_settings', 'addon/randplace/randplace.php', 'randplace_settings');
-       unregister_hook('settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
+       unregister_hook('plugin_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post');
 
 
        logger("removed randplace");
@@ -110,7 +110,7 @@ function randplace_post_hook($a, &$item) {
        $cities = array();
        $zones = timezone_identifiers_list();
        foreach($zones as $zone) {
-               if(strpos($zone,'/'))
+               if((strpos($zone,'/')) && (! stristr($zone,'US/')) && (! stristr($zone,'Etc/')))
                        $cities[] = str_replace('_', ' ',substr($zone,strpos($zone,'/') + 1));
        }
 
@@ -142,7 +142,8 @@ function randplace_settings_post($a,$post) {
 
 
 /**
- * Called from the end of the settings form. 
+ *
+ * Called from the Plugin Setting form. 
  * Add our own settings info to the page.
  *
  */
@@ -154,7 +155,7 @@ function randplace_settings(&$a,&$s) {
        if(! local_user())
                return;
 
-       /* Add our stylesheet so we can make our settings look nice */
+       /* Add our stylesheet to the page so we can make our settings look nice */
 
        $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/randplace/randplace.css' . '" media="all" />' . "\r\n";