Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:49:32-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13015 2011-12-20T09:49:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=57725#p57725 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: December 20, 2011, 9:49 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:49 am


]]>
2011-12-07T01:02:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=55407#p55407 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: December 7, 2011, 1:02 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:02 am


]]>
2011-11-05T19:25:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=51781#p51781 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: November 5, 2011, 8:25 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:25 pm


]]>
2011-10-29T20:34:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=49876#p49876 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: October 29, 2011, 9:34 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:34 pm


]]>
2011-10-17T15:38:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=47670#p47670 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: October 17, 2011, 1:38 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:38 pm


]]>
2011-10-11T14:34:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=46070#p46070 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: October 11, 2011, 12:34 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:34 pm


]]>
2011-10-03T15:46:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=44201#p44201 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: October 3, 2011, 1:46 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:46 pm


]]>
2011-10-03T03:40:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=42908#p42908 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: October 3, 2011, 1:40 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:40 am


]]>
2011-09-27T05:25:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=41154#p41154 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: September 27, 2011, 3:25 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:25 am


]]>
2011-09-26T21:02:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=39910#p39910 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: September 26, 2011, 7:03 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:02 pm


]]>
2011-09-17T16:19:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=38054#p38054 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: September 17, 2011, 2:19 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 4:19 pm


]]>
2011-09-14T01:27:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=36635#p36635 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: September 13, 2011, 11:27 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:27 am


]]>
2011-09-13T12:02:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=35363#p35363 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: September 13, 2011, 10:02 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:02 pm


]]>
2011-08-15T14:11:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=31470#p31470 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: August 15, 2011, 3:11 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\installation.inc.php ?php /** * Installation routines for s2Member. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\Installation * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_installation" ) ) { /** * Installation routines for s2Member. * * @package s2Member\Installation * @since 3.5 */ class c_ws_plugin__s2member_installation { /** * Activation routines for s2Member. * * @package s2Member\Installation * @since 3.5 * * @return null */ public static function activate ( $reactivation_reason = FALSE ) { global $wpdb ; /* Global database object reference. */ global $current_site , $current_blog ; /* Multisite. */ /**/ do_action ( "ws_plugin__s2member_before_activation" , get_defined_vars ( ) ) ; /**/ c_ws_plugin__s2member_roles_caps:: config_roles ( ) ; /* Config Roles/Caps. */ /**/ update_option ( "ws_plugin__s2member_activated_levels" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ) ; /**/ if ( ! is_dir ( $files_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "files_dir" ] ) ) if ( is_writable ( dirname (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $files_dir ) ) ) ) mkdir ( $files_dir , 0777 , true ) ; /**/ if ( is_dir ( $files_dir ) && is_writable ( $files_dir ) ) if ( ! file_exists ( $htaccess = $files_dir . "/.htaccess" ) ) file_put_contents ( $htaccess , "deny from all" ) ; /**/ if ( ! is_dir ( $logs_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) ) if ( is_writable ( dirname (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $logs_dir ) ) ) ) mkdir ( $logs_dir , 0777 , true ) ; /**/ if ( is_dir ( $logs_dir ) && is_writable ( $logs_dir ) ) if ( ! file_exists ( $htaccess = $logs_dir . "/.htaccess" ) ) file_put_contents ( $htaccess , "deny from all" ) ; /**/ ( ! is_array ( get_option ( "ws_plugin__s2member_cache" ) ) ) ? update_option ( "ws_plugin__s2member_cache" , array ( ) ) : null ; ( ! is_array ( get_option ( "ws_plugin__s2member_notices" ) ) ) ? update_option ( "ws_plugin__s2member_notices" , array ( ) ) : null ; ( ! is_array ( get_option ( "ws_plugin__s2member_options" ) ) ) ? update_option ( "ws_plugin__s2member_options" , array ( ) ) : null ; ( ! is_numeric ( get_option ( "ws_plugin__s2member_configured" ) ) ) ? update_option ( "ws_plugin__s2member_configured" , "0" ) : null ; /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "configured" ] ) /* If already configured, we are re-activating. */ { $v = get_option ( "ws_plugin__s2member_activated_version" ) ; /**/ if ( ! $v || ! version_compare ( $v , "3.2" , "=" ) ) /* Needs to be upgraded? */ /* Version 3.2 is where `meta_key` names were changed. They're prefixed now. */ { $like = "`meta_key` LIKE 's2member\_%' AND `meta_key` NOT LIKE '%s2member\_originating\_blog%'" ; $wpdb - query ( "UPDATE `" . $wpdb - usermeta . "` SET `meta_key` = CONCAT('" . $wpdb - prefix . "', `meta_key`) WHERE " . $like ) ; } /**/ if ( ! $v || ! version_compare ( $v , "3.2.5" , "=" ) ) /* Needs to be upgraded? */ /* Version 3.2.5 is where transient names were changed. They're prefixed now. */ { $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '\_transient\_%'" ) ; } /**/ if ( ! $v || ! version_compare ( $v , "3.2.6" , "=" ) ) /* Needs to be upgraded? */ /* Version 3.2.6 fixed `s2member_ccaps_req` being stored empty and/or w/ one empty element in the array. */ { $wpdb - query ( "DELETE FROM `" . $wpdb - postmeta . "` WHERE `meta_key` = 's2member_ccaps_req' AND `meta_value` IN('','a:0:{}','a:1:{i:0;s:0:\" \";}')" ) ; } /**/ if ( ! $v || ! version_compare ( $v , "3.5" , "=" ) ) /* Needs to be notified about Screen Options? */ /* Version 3.5 introduced a dismissal message regarding Screen Options in the list of Users/Members. */ { $notice = 'strongNote:/strong s2Member adds some new data columns to your list of Users/Members. If your list gets overcrowded, please use the strongScreen Options/strong tab em( upper right-hand corner )/em. With WordPress® Screen Options, you can add/remove specific data columns; thereby making the most important data easier to read. For example, if you create Custom Registration Fields with s2Member, those Custom Fields will result in new data columns; which can cause your list of Users/Members to become nearly unreadable. So just use the Screen Options tab to clean things up.' ; c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , "blog:users.php" , false , false , true ) ; } /**/ $notice = 'strongs2Member/strong has been strongreactivated/strong, with ' . ( ( $reactivation_reason === "levels" ) ? 'code' . esc_html ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ) . '/code Membership Levels' : 'the latest version' ) . '.br /' ; $notice .= 'You now have version ' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . '. Your existing configuration remains.' ; /**/ if ( ! is_multisite ( ) || !c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) || is_main_site ( ) ) /* No Changelog on a Multisite Farm. */ $notice .= 'br /Have fun, a href="' . esc_attr ( admin_url ( "/admin.php?page=ws-plugin--s2member-info#rm-changelog" ) ) . '"read the Changelog/a, and make some money! :-)' ; /**/ c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , array ( "blog|network:plugins.php" , "blog|network:ws-plugin--s2member-start" , "blog|network:ws-plugin--s2member-mms-ops" , "blog|network:ws-plugin--s2member-gen-ops" , "blog|network:ws-plugin--s2member-res-ops" ) ) ; /**/ if ( preg_match ( "/^win/i" , PHP_OS ) && is_dir (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $files_dir ) ) && count ( scandir (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $files_dir ) ) ) 4 ) { $notice = 'strongWindows® Server ( NOTICE ):/strong Your protected files MUST be moved to the code/app_data/code sub-directory. For further details, see: codes2Member - Download Options - Basic/code.' ; c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , array ( "blog|network:plugins.php" , "blog|network:ws-plugin--s2member-start" , "blog|network:ws-plugin--s2member-mms-ops" , "blog|network:ws-plugin--s2member-gen-ops" , "blog|network:ws-plugin--s2member-res-ops" ) , true ) ; } } else /* Otherwise, (initial activation); we'll help the Site Owner out by giving them a link to the Quick Start Guide. */ { $notice = 'strongNote:/strong s2Member adds some new data columns to your list of Users/Members. If your list gets overcrowded, please use the strongScreen Options/strong tab em( upper right-hand corner )/em. With WordPress® Screen Options, you can add/remove specific data columns; thereby making the most important data easier to read. For example, if you create Custom Registration Fields with s2Member, those Custom Fields will result in new data columns; which can cause your list of Users/Members to become nearly unreadable. So just use the Screen Options tab to clean things up.' ; /**/ c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , "blog:users.php" , false , false , true ) ; /**/ $notice = 'strongs2Member/strong v' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . ' has been strongactivated/strong. Nice work!br /' ; $notice .= 'Have fun, a href="' . esc_attr ( admin_url ( "/admin.php?page=ws-plugin--s2member-start" ) ) . '"read the Quick Start Guide/a, and make some money! :-)' ; /**/ c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , array ( "blog|network:plugins.php" , "blog|network:ws-plugin--s2member-start" , "blog|network:ws-plugin--s2member-mms-ops" , "blog|network:ws-plugin--s2member-gen-ops" , "blog|network:ws-plugin--s2member-res-ops" ) ) ; } /**/ update_option ( "ws_plugin__s2member_activated_version" , WS_PLUGIN__S2MEMBER_VERSION) ; /* Mark version. */ /**/ if ( is_multisite ( ) && is_main_site ( ) ) /* Network activation routines. A few quick adjustments. */ { foreach ( ( array ) ( $users = $wpdb - get_results ( "SELECT `ID` FROM `" . $wpdb - users . "`" ) ) as $user ) { /* Here we convert everyone already in the system; without a point of origin. This will set their point of origin to the Main Site. */ if ( ! ( $originating_blog = get_user_meta ( $user - ID , "s2member_originating_blog" , true ) ) ) update_user_meta ( $user - ID , "s2member_originating_blog" , $current_site - blog_id ) ; } /**/ $notice = 'strongMultisite Network/strong updated automatically by strongs2Member/strong v' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . '.br /' ; $notice .= 'You\'ll want to configure s2Member\'s Multisite options now.br /' ; $notice .= 'In the Dashboard for your Main Site, see:br /' ; $notice .= 'codes2Member - Multisite ( Config )/code.' ; /**/ c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , array ( "blog|network:plugins.php" , "blog|network:ws-plugin--s2member-start" , "blog|network:ws-plugin--s2member-mms-ops" , "blog|network:ws-plugin--s2member-gen-ops" , "blog|network:ws-plugin--s2member-res-ops" ) ) ; /**/ update_option ( "ws_plugin__s2member_activated_mms_version" , WS_PLUGIN__S2MEMBER_VERSION) ; } /**/ do_action ( "ws_plugin__s2member_after_activation" , get_defined_vars ( ) ) ; /**/ return ; /* Return for uniformity. */ } /** * Deactivation routines for s2Member. * * @package s2Member\Installation * @since 3.5 * * @return null */ public static function deactivate ( ) { global $wpdb ; /* Global database object reference. */ global $current_site , $current_blog ; /* Multisite. */ /**/ do_action ( "ws_plugin__s2member_before_deactivation" , get_defined_vars ( ) ) ; /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "run_deactivation_routines" ] ) { c_ws_plugin__s2member_roles_caps:: unlink_roles ( ) ; /* Unlink Roles/Caps. */ /**/ if ( is_dir ( $files_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "files_dir" ] ) ) { if ( file_exists ( $htaccess = $files_dir . "/.htaccess" ) ) if ( is_writable ( $htaccess ) ) unlink ( $htaccess ) ; /**/ @ rmdir ( $files_dir ) . @ rmdir (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $files_dir ) ) ; } /**/ if ( is_dir ( $logs_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) ) { foreach ( scandir ( $logs_dir ) as $log_file ) if ( is_file ( $log_file = $logs_dir . "/" . $log_file ) ) if ( is_writable ( $log_file ) ) unlink ( $log_file ) ; /**/ @ rmdir ( $logs_dir ) . @ rmdir (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $logs_dir ) ) ; } /**/ delete_option ( "ws_plugin__s2member_cache" ) ; delete_option ( "ws_plugin__s2member_notices" ) ; delete_option ( "ws_plugin__s2member_options" ) ; delete_option ( "ws_plugin__s2member_configured" ) ; delete_option ( "ws_plugin__s2member_activated_levels" ) ; delete_option ( "ws_plugin__s2member_activated_version" ) ; delete_option ( "ws_plugin__s2member_activated_mms_version" ) ; /**/ $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '%" . esc_sql ( like_escape ( "s2member_" ) ) . "%'" ) ; $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '" . esc_sql ( like_escape ( "_transient_s2m_" ) ) . "%'" ) ; $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '" . esc_sql ( like_escape ( "_transient_timeout_s2m_" ) ) . "%'" ) ; $wpdb - query ( "DELETE FROM `" . $wpdb - postmeta . "` WHERE `meta_key` LIKE '%" . esc_sql ( like_escape ( "s2member_" ) ) . "%'" ) ; $wpdb - query ( "DELETE FROM `" . $wpdb - usermeta . "` WHERE `meta_key` LIKE '%" . esc_sql ( like_escape ( "s2member_" ) ) . "%'" ) ; /**/ do_action ( "ws_plugin__s2member_during_deactivation" , get_defined_vars ( ) ) ; } /**/ do_action ( "ws_plugin__s2member_after_deactivation" , get_defined_vars ( ) ) ; /**/ return ; /* Return for uniformity. */ } } } ? [ full view ]s2member\includes\classes\installation.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 2:11 pm


]]>
2011-07-11T17:28:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=27678#p27678 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: July 11, 2011, 6:28 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\installation.inc.php ?php /** * Installation routines for s2Member. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\Installation * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_installation" ) ) { /** * Installation routines for s2Member. * * @package s2Member\Installation * @since 3.5 */ class c_ws_plugin__s2member_installation { /** * Activation routines for s2Member. * * @package s2Member\Installation * @since 3.5 * * @return null */ public static function activate ( $reactivation_reason = FALSE ) { global $wpdb ; /* Global database object reference. */ global $current_site , $current_blog ; /* Multisite. */ /**/ do_action ( "ws_plugin__s2member_before_activation" , get_defined_vars ( ) ) ; /**/ c_ws_plugin__s2member_roles_caps:: config_roles ( ) ; /* Config Roles/Caps. */ /**/ update_option ( "ws_plugin__s2member_activated_levels" , $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ) ; /**/ if ( ! is_dir ( $files_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "files_dir" ] ) ) if ( is_writable ( dirname (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $files_dir ) ) ) ) mkdir ( $files_dir , 0777 , true ) ; /**/ if ( is_dir ( $files_dir ) && is_writable ( $files_dir ) ) if ( ! file_exists ( $htaccess = $files_dir . "/.htaccess" ) ) file_put_contents ( $htaccess , "deny from all" ) ; /**/ if ( ! is_dir ( $logs_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) ) if ( is_writable ( dirname (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $logs_dir ) ) ) ) mkdir ( $logs_dir , 0777 , true ) ; /**/ if ( is_dir ( $logs_dir ) && is_writable ( $logs_dir ) ) if ( ! file_exists ( $htaccess = $logs_dir . "/.htaccess" ) ) file_put_contents ( $htaccess , "deny from all" ) ; /**/ ( ! is_array ( get_option ( "ws_plugin__s2member_cache" ) ) ) ? update_option ( "ws_plugin__s2member_cache" , array ( ) ) : null ; ( ! is_array ( get_option ( "ws_plugin__s2member_notices" ) ) ) ? update_option ( "ws_plugin__s2member_notices" , array ( ) ) : null ; ( ! is_array ( get_option ( "ws_plugin__s2member_options" ) ) ) ? update_option ( "ws_plugin__s2member_options" , array ( ) ) : null ; ( ! is_numeric ( get_option ( "ws_plugin__s2member_configured" ) ) ) ? update_option ( "ws_plugin__s2member_configured" , "0" ) : null ; /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "configured" ] ) /* If already configured, we are re-activating. */ { $v = get_option ( "ws_plugin__s2member_activated_version" ) ; /**/ if ( ! $v || ! version_compare ( $v , "3.2" , "=" ) ) /* Needs to be upgraded? */ /* Version 3.2 is where `meta_key` names were changed. They're prefixed now. */ { $like = "`meta_key` LIKE 's2member\_%' AND `meta_key` NOT LIKE '%s2member\_originating\_blog%'" ; $wpdb - query ( "UPDATE `" . $wpdb - usermeta . "` SET `meta_key` = CONCAT('" . $wpdb - prefix . "', `meta_key`) WHERE " . $like ) ; } /**/ if ( ! $v || ! version_compare ( $v , "3.2.5" , "=" ) ) /* Needs to be upgraded? */ /* Version 3.2.5 is where transient names were changed. They're prefixed now. */ { $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '\_transient\_%'" ) ; } /**/ if ( ! $v || ! version_compare ( $v , "3.2.6" , "=" ) ) /* Needs to be upgraded? */ /* Version 3.2.6 fixed `s2member_ccaps_req` being stored empty and/or w/ one empty element in the array. */ { $wpdb - query ( "DELETE FROM `" . $wpdb - postmeta . "` WHERE `meta_key` = 's2member_ccaps_req' AND `meta_value` IN('','a:0:{}','a:1:{i:0;s:0:\" \";}')" ) ; } /**/ if ( ! $v || ! version_compare ( $v , "3.5" , "=" ) ) /* Needs to be notified about Screen Options? */ /* Version 3.5 introduced a dismissal message regarding Screen Options in the list of Users/Members. */ { $notice = 'strongNote:/strong s2Member adds some new data columns to your list of Users/Members. If your list gets overcrowded, please use the strongScreen Options/strong tab em( upper right-hand corner )/em. With WordPress® Screen Options, you can add/remove specific data columns; thereby making the most important data easier to read. For example, if you create Custom Registration Fields with s2Member, those Custom Fields will result in new data columns; which can cause your list of Users/Members to become nearly unreadable. So just use the Screen Options tab to clean things up.' ; c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , "blog:users.php" , false , false , true ) ; } /**/ $notice = 'strongs2Member/strong has been strongreactivated/strong, with ' . ( ( $reactivation_reason === "levels" ) ? 'code' . esc_html ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ) . '/code Membership Levels' : 'the latest version' ) . '.br /' ; $notice .= 'You now have version ' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . '. Your existing configuration remains.' ; /**/ if ( ! is_multisite ( ) || !c_ws_plugin__s2member_utils_conds:: is_multisite_farm ( ) || is_main_site ( ) ) /* No Changelog on a Multisite Farm. */ $notice .= 'br /Have fun, a href="' . esc_attr ( admin_url ( "/admin.php?page=ws-plugin--s2member-info#rm-changelog" ) ) . '"read the Changelog/a, and make some money! :-)' ; /**/ c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , array ( "blog|network:plugins.php" , "blog|network:ws-plugin--s2member-start" , "blog|network:ws-plugin--s2member-mms-ops" , "blog|network:ws-plugin--s2member-gen-ops" , "blog|network:ws-plugin--s2member-res-ops" ) ) ; /**/ if ( preg_match ( "/^win/i" , PHP_OS ) && is_dir (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $files_dir ) ) && count ( scandir (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $files_dir ) ) ) 4 ) { $notice = 'strongWindows® Server ( NOTICE ):/strong Your protected files MUST be moved to the code/app_data/code sub-directory. For further details, see: codes2Member - Download Options - Basic/code.' ; c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , array ( "blog|network:plugins.php" , "blog|network:ws-plugin--s2member-start" , "blog|network:ws-plugin--s2member-mms-ops" , "blog|network:ws-plugin--s2member-gen-ops" , "blog|network:ws-plugin--s2member-res-ops" ) , true ) ; } } else /* Otherwise, (initial activation); we'll help the Site Owner out by giving them a link to the Quick Start Guide. */ { $notice = 'strongNote:/strong s2Member adds some new data columns to your list of Users/Members. If your list gets overcrowded, please use the strongScreen Options/strong tab em( upper right-hand corner )/em. With WordPress® Screen Options, you can add/remove specific data columns; thereby making the most important data easier to read. For example, if you create Custom Registration Fields with s2Member, those Custom Fields will result in new data columns; which can cause your list of Users/Members to become nearly unreadable. So just use the Screen Options tab to clean things up.' ; /**/ c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , "blog:users.php" , false , false , true ) ; /**/ $notice = 'strongs2Member/strong v' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . ' has been strongactivated/strong. Nice work!br /' ; $notice .= 'Have fun, a href="' . esc_attr ( admin_url ( "/admin.php?page=ws-plugin--s2member-start" ) ) . '"read the Quick Start Guide/a, and make some money! :-)' ; /**/ c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , array ( "blog|network:plugins.php" , "blog|network:ws-plugin--s2member-start" , "blog|network:ws-plugin--s2member-mms-ops" , "blog|network:ws-plugin--s2member-gen-ops" , "blog|network:ws-plugin--s2member-res-ops" ) ) ; } /**/ update_option ( "ws_plugin__s2member_activated_version" , WS_PLUGIN__S2MEMBER_VERSION) ; /* Mark version. */ /**/ if ( is_multisite ( ) && is_main_site ( ) ) /* Network activation routines. A few quick adjustments. */ { foreach ( ( array ) ( $users = $wpdb - get_results ( "SELECT `ID` FROM `" . $wpdb - users . "`" ) ) as $user ) { /* Here we convert everyone already in the system; without a point of origin. This will set their point of origin to the Main Site. */ if ( ! ( $originating_blog = get_user_meta ( $user - ID , "s2member_originating_blog" , true ) ) ) update_user_meta ( $user - ID , "s2member_originating_blog" , $current_site - blog_id ) ; } /**/ $notice = 'strongMultisite Network/strong updated automatically by strongs2Member/strong v' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . '.br /' ; $notice .= 'You\'ll want to configure s2Member\'s Multisite options now.br /' ; $notice .= 'In the Dashboard for your Main Site, see:br /' ; $notice .= 'codes2Member - Multisite ( Config )/code.' ; /**/ c_ws_plugin__s2member_admin_notices:: enqueue_admin_notice ( $notice , array ( "blog|network:plugins.php" , "blog|network:ws-plugin--s2member-start" , "blog|network:ws-plugin--s2member-mms-ops" , "blog|network:ws-plugin--s2member-gen-ops" , "blog|network:ws-plugin--s2member-res-ops" ) ) ; /**/ update_option ( "ws_plugin__s2member_activated_mms_version" , WS_PLUGIN__S2MEMBER_VERSION) ; } /**/ do_action ( "ws_plugin__s2member_after_activation" , get_defined_vars ( ) ) ; /**/ return ; /* Return for uniformity. */ } /** * Deactivation routines for s2Member. * * @package s2Member\Installation * @since 3.5 * * @return null */ public static function deactivate ( ) { global $wpdb ; /* Global database object reference. */ global $current_site , $current_blog ; /* Multisite. */ /**/ do_action ( "ws_plugin__s2member_before_deactivation" , get_defined_vars ( ) ) ; /**/ if ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "run_deactivation_routines" ] ) { c_ws_plugin__s2member_roles_caps:: unlink_roles ( ) ; /* Unlink Roles/Caps. */ /**/ if ( is_dir ( $files_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "files_dir" ] ) ) { if ( file_exists ( $htaccess = $files_dir . "/.htaccess" ) ) if ( is_writable ( $htaccess ) ) unlink ( $htaccess ) ; /**/ @ rmdir ( $files_dir ) . @ rmdir (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $files_dir ) ) ; } /**/ if ( is_dir ( $logs_dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) ) { foreach ( scandir ( $logs_dir ) as $log_file ) if ( is_file ( $log_file = $logs_dir . "/" . $log_file ) ) if ( is_writable ( $log_file ) ) unlink ( $log_file ) ; /**/ @ rmdir ( $logs_dir ) . @ rmdir (c_ws_plugin__s2member_utils_dirs:: strip_dir_app_data ( $logs_dir ) ) ; } /**/ delete_option ( "ws_plugin__s2member_cache" ) ; delete_option ( "ws_plugin__s2member_notices" ) ; delete_option ( "ws_plugin__s2member_options" ) ; delete_option ( "ws_plugin__s2member_configured" ) ; delete_option ( "ws_plugin__s2member_activated_levels" ) ; delete_option ( "ws_plugin__s2member_activated_version" ) ; delete_option ( "ws_plugin__s2member_activated_mms_version" ) ; /**/ $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '%" . esc_sql ( like_escape ( "s2member_" ) ) . "%'" ) ; $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '" . esc_sql ( like_escape ( "_transient_s2m_" ) ) . "%'" ) ; $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '" . esc_sql ( like_escape ( "_transient_timeout_s2m_" ) ) . "%'" ) ; $wpdb - query ( "DELETE FROM `" . $wpdb - postmeta . "` WHERE `meta_key` LIKE '%" . esc_sql ( like_escape ( "s2member_" ) ) . "%'" ) ; $wpdb - query ( "DELETE FROM `" . $wpdb - usermeta . "` WHERE `meta_key` LIKE '%" . esc_sql ( like_escape ( "s2member_" ) ) . "%'" ) ; /**/ do_action ( "ws_plugin__s2member_during_deactivation" , get_defined_vars ( ) ) ; } /**/ do_action ( "ws_plugin__s2member_after_deactivation" , get_defined_vars ( ) ) ; /**/ return ; /* Return for uniformity. */ } } } ? [ full view ]s2member\includes\classes\installation.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:28 pm


]]>
2011-07-09T06:08:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13015&p=25310#p25310 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\installation.inc.php
Docs updated: December 20, 2011, 9:49 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:08 am


]]>