Changeset 3393329
- Timestamp:
- 11/11/2025 02:52:14 AM (5 months ago)
- Location:
- infility-global/trunk
- Files:
-
- 2 edited
-
infility_global.php (modified) (2 diffs)
-
widgets/infility-import-data/include/infility-import-site.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
infility-global/trunk/infility_global.php
r3393324 r3393329 4 4 Plugin URI: https://www.infility.cn/ 5 5 Description: Infility公共插件 6 Version: 2.14.2 56 Version: 2.14.26 7 7 Author: Infility 8 8 Author URI: https://www.infility.cn/ … … 135 135 function __construct() 136 136 { 137 define( 'INFILITY_GLOBAL_VERSION', '2.14.2 5' );137 define( 'INFILITY_GLOBAL_VERSION', '2.14.26' ); 138 138 define( 'INFILITY_GLOBAL_PATH', plugin_dir_path( __FILE__ ) ); // fullpath/wp-content/plugins/infility-global/ // 有斜杠 139 139 define( 'INFILITY_GLOBAL_URL', plugins_url( '/', __FILE__ ) ); // https://the_domain/wp-content/plugins/infility-global/ // 斜杠是自己加的 -
infility-global/trunk/widgets/infility-import-data/include/infility-import-site.php
r3393324 r3393329 1098 1098 $page_tag = $this->getHtmlTag($html,$page_format_target['format'],$page_format_target['type'],['href']); 1099 1099 1100 if(empty($page_tag)){$this->error='分页数据出错';return false;}1101 1102 1103 1100 $sql = "SELECT url FROM $url_table WHERE list_id=$list_id AND `type`='category'"; 1104 1101 $check_repeat = $wpdb->get_col($sql); … … 1114 1111 $pages[] = $v['link']; 1115 1112 } 1116 } 1117 1118 $last_page_num = $this->getLastPageFromHrefs($pages,$url); 1119 foreach($pages as $k=>$v){ 1120 $page_num = $k+1; 1121 1113 1114 $last_page_num = $this->getLastPageFromHrefs($pages,$url); 1115 foreach($pages as $k=>$v){ 1116 $page_num = $k+1; 1117 1118 $insert = [ 1119 'list_id' => $list_id, 1120 'type' => 'category', 1121 'url' => $v, 1122 'status' => 0, 1123 'page' => $page_num, 1124 'total_page'=> $last_page_num, 1125 'add_time' => time(), 1126 ]; 1127 1128 $wpdb->insert($url_table,$insert); 1129 } 1130 }else{ 1122 1131 $insert = [ 1123 1132 'list_id' => $list_id, 1124 1133 'type' => 'category', 1125 'url' => $ v,1134 'url' => $url, 1126 1135 'status' => 0, 1127 'page' => $page_num,1128 'total_page'=> $last_page_num,1136 'page' => 1, 1137 'total_page'=> 1, 1129 1138 'add_time' => time(), 1130 1139 ];
Note: See TracChangeset
for help on using the changeset viewer.