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

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

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


]]>
2011-12-07T01:03:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=55520#p55520 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: December 7, 2011, 1:03 am

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

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


]]>
2011-11-05T19:26:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=51894#p51894 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: November 5, 2011, 8:26 pm

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

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


]]>
2011-10-29T20:35:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=49989#p49989 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: October 29, 2011, 9:35 pm

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

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


]]>
2011-10-17T15:39:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=47783#p47783 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: October 17, 2011, 1:39 pm

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

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


]]>
2011-10-11T14:35:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=46184#p46184 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: October 11, 2011, 12:35 pm

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

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


]]>
2011-10-03T15:48:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=44314#p44314 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: October 3, 2011, 1:48 pm

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

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


]]>
2011-10-03T03:41:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=43021#p43021 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: October 3, 2011, 1:41 am

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

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


]]>
2011-09-27T05:26:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=41267#p41267 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: September 27, 2011, 3:26 am

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

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


]]>
2011-09-26T21:03:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=40023#p40023 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\utils-logs.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:03 pm


]]>
2011-09-17T16:21:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=38165#p38165 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: September 17, 2011, 2:21 pm

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

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


]]>
2011-09-14T01:28:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=36746#p36746 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: September 13, 2011, 11:28 pm

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

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


]]>
2011-09-13T12:03:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=35474#p35474 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: September 13, 2011, 10:03 am

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

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


]]>
2011-08-15T15:14:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=31595#p31595 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: August 15, 2011, 4:14 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\utils-logs.inc.php ?php /** * Log utilities. * * 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\Utilities * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_utils_logs" ) ) { /** * Log utilities. * * @package s2Member\Utilities * @since 3.5 */ class c_ws_plugin__s2member_utils_logs { /** * Archives logs to prevent HUGE files from building up over time. * * This routine is staggered to conserve resources. * This is called by all logging routines for s2Member. * * @package s2Member\Utilities * @since 3.5 * * @param bool $stagger Optional. Defaults to true. If false, the routine will run, regardless. * @return bool Always returns true. */ public static function archive_oversize_log_files ( $stagger = TRUE ) { if ( ! $stagger || is_float ( $stagger = time ( ) / 2 ) ) /* Stagger this routine? */ { if ( is_dir ( $dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) && is_writable ( $dir ) ) { $max = apply_filters ( "ws_plugin__s2member_oversize_log_file_bytes" , 2097152 , get_defined_vars ( ) ) ; /**/ eval ( '$log_files = scandir ($dir); shuffle($log_files); $counter = 1;' ) ; /**/ foreach ( $log_files as $file ) /* Go through each log file. Up to 25 files at a time. */ { if ( preg_match ( "/\.log$/i" , $file ) && ! preg_match ( "/-ARCHIVED-/i" , $file ) && is_file ( $dir_file = $dir . "/" . $file ) ) { if ( filesize ( $dir_file ) $max && is_writable ( $dir_file ) ) /* The file must be writable. */ if ( $log = preg_replace ( "/\.log$/i" , "" , $dir_file ) ) /* Strip .log before renaming. */ rename ( $dir_file , $log . "-ARCHIVED-" . date ( "m-d-Y" ) . "-" . time ( ) . ".log" ) ; } /**/ if ( ( $counter = $counter + 1 ) 25 ) /* Up to 25 files at a time. */ break ; /* Stop for now. */ } } } /**/ return true ; } /** * Removes expired Transients inserted into the database by s2Member. * * This routine is staggered to conserve resources. * Only 5 Transients are deleted each time. * * This is called by s2Member's Auto-EOT System, every 10 minutes. * * @package s2Member\Utilities * @since 3.5 * * @param bool $stagger Optional. Defaults to true. If false, the routine will run, regardless. * @return bool Always returns true. */ public static function cleanup_expired_s2m_transients ( $stagger = TRUE ) { global $wpdb ; /* Will need this for database cleaning. */ /**/ if ( ! $stagger || is_float ( $stagger = time ( ) / 2 ) ) /* Stagger this routine? */ { if ( is_array ( $expired_s2m_transients = $wpdb - get_results ( "SELECT * FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '" . esc_sql ( like_escape ( "_transient_timeout_s2m_" ) ) . "%' AND `option_value` '" . esc_sql ( time ( ) ) . "' LIMIT 5" ) ) && ! empty ( $expired_s2m_transients ) ) { foreach ( $expired_s2m_transients as $expired_s2m_transient ) /* Delete the _timeout, and also the Transient entry name itself. */ if ( ( $id = $expired_s2m_transient - option_id ) && ( $name = preg_replace ( "/_transient_timeout_/i" , "_transient_" , $expired_s2m_transient - option_name , 1 ) ) ) $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_id` = '" . esc_sql ( $id ) . "' OR `option_name` = '" . esc_sql ( $name ) . "'" ) ; } } /**/ return true ; } } } ? [ full view ]s2member\includes\classes\utils-logs.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 3:14 pm


]]>
2011-07-11T17:30:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=27764#p27764 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: July 11, 2011, 6:30 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\utils-logs.inc.php ?php /** * Log utilities. * * 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\Utilities * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_utils_logs" ) ) { /** * Log utilities. * * @package s2Member\Utilities * @since 3.5 */ class c_ws_plugin__s2member_utils_logs { /** * Archives logs to prevent HUGE files from building up over time. * * This routine is staggered to conserve resources. * This is called by all logging routines for s2Member. * * @package s2Member\Utilities * @since 3.5 * * @param bool $stagger Optional. Defaults to true. If false, the routine will run, regardless. * @return bool Always returns true. */ public static function archive_oversize_log_files ( $stagger = TRUE ) { if ( ! $stagger || is_float ( $stagger = time ( ) / 2 ) ) /* Stagger this routine? */ { if ( is_dir ( $dir = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "logs_dir" ] ) && is_writable ( $dir ) ) { $max = apply_filters ( "ws_plugin__s2member_oversize_log_file_bytes" , 2097152 , get_defined_vars ( ) ) ; /**/ eval ( '$log_files = scandir ($dir); shuffle($log_files); $counter = 1;' ) ; /**/ foreach ( $log_files as $file ) /* Go through each log file. Up to 25 files at a time. */ { if ( preg_match ( "/\.log$/i" , $file ) && ! preg_match ( "/-ARCHIVED-/i" , $file ) && is_file ( $dir_file = $dir . "/" . $file ) ) { if ( filesize ( $dir_file ) $max && is_writable ( $dir_file ) ) /* The file must be writable. */ if ( $log = preg_replace ( "/\.log$/i" , "" , $dir_file ) ) /* Strip .log before renaming. */ rename ( $dir_file , $log . "-ARCHIVED-" . date ( "m-d-Y" ) . "-" . time ( ) . ".log" ) ; } /**/ if ( ( $counter = $counter + 1 ) 25 ) /* Up to 25 files at a time. */ break ; /* Stop for now. */ } } } /**/ return true ; } /** * Removes expired Transients inserted into the database by s2Member. * * This routine is staggered to conserve resources. * Only 5 Transients are deleted each time. * * This is called by s2Member's Auto-EOT System, every 10 minutes. * * @package s2Member\Utilities * @since 3.5 * * @param bool $stagger Optional. Defaults to true. If false, the routine will run, regardless. * @return bool Always returns true. */ public static function cleanup_expired_s2m_transients ( $stagger = TRUE ) { global $wpdb ; /* Will need this for database cleaning. */ /**/ if ( ! $stagger || is_float ( $stagger = time ( ) / 2 ) ) /* Stagger this routine? */ { if ( is_array ( $expired_s2m_transients = $wpdb - get_results ( "SELECT * FROM `" . $wpdb - options . "` WHERE `option_name` LIKE '" . esc_sql ( like_escape ( "_transient_timeout_s2m_" ) ) . "%' AND `option_value` '" . esc_sql ( time ( ) ) . "' LIMIT 5" ) ) && ! empty ( $expired_s2m_transients ) ) { foreach ( $expired_s2m_transients as $expired_s2m_transient ) /* Delete the _timeout, and also the Transient entry name itself. */ if ( ( $id = $expired_s2m_transient - option_id ) && ( $name = preg_replace ( "/_transient_timeout_/i" , "_transient_" , $expired_s2m_transient - option_name , 1 ) ) ) $wpdb - query ( "DELETE FROM `" . $wpdb - options . "` WHERE `option_id` = '" . esc_sql ( $id ) . "' OR `option_name` = '" . esc_sql ( $name ) . "'" ) ; } } /**/ return true ; } } } ? [ full view ]s2member\includes\classes\utils-logs.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

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


]]>
2011-07-09T06:10:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13101&p=25396#p25396 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\utils-logs.inc.php
Docs updated: December 20, 2011, 9:50 am

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

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


]]>