Changeset 210651
- Timestamp:
- 02/26/2010 08:15:10 PM (16 years ago)
- Location:
- file-proxy/trunk
- Files:
-
- 2 edited
- 1 moved
-
com/twothirdsdesign/file-proxy/ttd_file_proxy.php (moved) (moved from file-proxy/trunk/com/twothirdsdesign/file-proxy/TtdFileProxy.php) (4 diffs)
-
init.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
file-proxy/trunk/com/twothirdsdesign/file-proxy/ttd_file_proxy.php
r210619 r210651 37 37 // Add admin menu interface 38 38 if( is_admin() ){ 39 include( TTDFP_ADMIN.DS."adminController.php" );39 //include( TTDFP_ADMIN.DS."adminController.php" ); 40 40 //$adminCrtl = new GcpfAdminController( &$this ); 41 41 //add_action('admin_menu', array(&$adminCrtl, 'adminMenus')); … … 110 110 $this->update_option("version", TTDPF_VERSION ); 111 111 if( defined('WP_CONTENT_DIR') ){ 112 if(!is_dir( WP_CONTENT_DIR.DS.'cache')){113 mkdir( WP_CONTENT_DIR.DS.'cache');114 } 115 if(!is_dir( WP_CONTENT_DIR.DS.'cache'.DS. $plugin_domain)){116 mkdir( WP_CONTENT_DIR.DS.'cache'.DS. $plugin_domain);117 } 118 if(!is_dir( WP_CONTENT_DIR.DS.'cache'.DS. $plugin_domain)){112 if(!is_dir( WP_CONTENT_DIR.DS.'cache' )){ 113 mkdir( WP_CONTENT_DIR.DS.'cache' ); 114 } 115 if(!is_dir( WP_CONTENT_DIR.DS.'cache'.DS. $this->plugin_domain )){ 116 mkdir( WP_CONTENT_DIR.DS.'cache'.DS. $this->plugin_domain ); 117 } 118 if(!is_dir( WP_CONTENT_DIR.DS.'cache'.DS. $this->plugin_domain )){ 119 119 exit ("cache dir failure"); 120 120 } 121 121 } 122 122 else 123 mkdir( TTDFP_DIR.DS.'cache');123 mkdir( TTDFP_DIR.DS.'cache' ); 124 124 } 125 125 … … 136 136 delete_option($this->options_key); 137 137 138 if( is_dir(WP_CONTENT_DIR.DS.'cache'.DS. $plugin_domain ))139 $this->rmdirr(WP_CONTENT_DIR.DS.'cache'.DS. $ plugin_domain );140 if( is_dir(TTDFP_DIR.DS.'cache'))141 $this->rmdirr( TTDFP_DIR.DS.'cache');138 if( is_dir( WP_CONTENT_DIR.DS.'cache'.DS. $this->plugin_domain )) 139 $this->rmdirr(WP_CONTENT_DIR.DS.'cache'.DS. $this->plugin_domain ); 140 if( is_dir( TTDFP_DIR.DS.'cache' )) 141 $this->rmdirr( TTDFP_DIR.DS.'cache' ); 142 142 } 143 143 } … … 217 217 public function return_proxy_url($atts, $content = '') 218 218 { 219 global $wpdb; 220 219 221 extract(shortcode_atts(array( 220 222 'id' => '', 221 223 'alt' => 'Some Really Great File', 222 224 ), $atts)); 225 226 $id = intval($id); 227 $file_name = $wpdb->get_var( $wpdb->prepare( "SELECT guid FROM {$wpdb->prefix}posts WHERE id=%d", $id )); 228 $file_name = $file_name = explode( DS , $file_name ); 229 $file_name = $file_name[( count($file_name)-1 )]; 223 230 224 231 $link = get_bloginfo('url') .'/index.php?'. $this->options->get_option('url-key') .'='. $id; 225 $title = empty($content) ? 'DEFAULT TITLE': $content ;232 $title = empty($content) ? $file_name : $content ; 226 233 227 234 //if( !is_user_logged_in() ) -
file-proxy/trunk/init.php
r210180 r210651 48 48 require_once( TTDFP_CORE.DS.'gcp_options.php' ); 49 49 50 require_once( TTDFP_LIB.DS.'file-proxy'.DS.' TtdFileProxy.php' );50 require_once( TTDFP_LIB.DS.'file-proxy'.DS.'ttd_file_proxy.php' ); 51 51 52 52 // Create Plugin Instance -
file-proxy/trunk/readme.txt
r210305 r210651 26 26 27 27 == Screenshots == 28 1. Screen shots to follow 28 none 29 29 30 30 == Frequently Asked Questions == … … 37 37 == Changelog == 38 38 39 = 0.3 = 40 Corrects Default link text, to file name. 41 39 42 = 0.2 = 40 43 Adds some Variable sanitation … … 44 47 45 48 == Upgrade Notice == 49 = 0.3 = 50 Corrects Default link text, to link file name. 46 51 47 52 = 0.2 =
Note: See TracChangeset
for help on using the changeset viewer.