Changeset 5730
- Timestamp:
- 06/19/2007 07:37:05 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/xmlrpc.php
r5722 r5730 1001 1001 1002 1002 if(isset($content_struct["mt_allow_comments"])) { 1003 switch((int) $content_struct["mt_allow_comments"]) { 1004 case 0: 1005 $comment_status = "closed"; 1006 break; 1007 case 1: 1008 $comment_status = "open"; 1009 break; 1010 default: 1011 $comment_status = get_option("default_comment_status"); 1012 break; 1003 if(!is_numeric($content_struct["mt_allow_comments"])) { 1004 switch($content_struct["mt_allow_comments"]) { 1005 case "closed": 1006 $comment_status = "closed"; 1007 break; 1008 case "open": 1009 $comment_status = "open"; 1010 break; 1011 default: 1012 $comment_status = get_option("default_comment_status"); 1013 break; 1014 } 1013 1015 } 1016 else { 1017 switch((int) $content_struct["mt_allow_comments"]) { 1018 case 0: 1019 $comment_status = "closed"; 1020 break; 1021 case 1: 1022 $comment_status = "open"; 1023 break; 1024 default: 1025 $comment_status = get_option("default_comment_status"); 1026 break; 1027 } 1028 } 1029 } 1030 else { 1031 $comment_status = get_option("default_comment_status"); 1014 1032 } 1015 1033 1016 1034 if(isset($content_struct["mt_allow_pings"])) { 1017 switch((int) $content_struct["mt_allow_pings"]) { 1018 case 0: 1019 $ping_status = "closed"; 1020 break; 1021 case 1: 1022 $ping_status = "open"; 1023 break; 1024 default: 1025 $ping_status = get_option("default_ping_status"); 1026 break; 1035 if(!is_numeric($content_struct["mt_allow_pings"])) { 1036 switch($content["mt_allow_pings"]) { 1037 case "closed": 1038 $ping_status = "closed"; 1039 break; 1040 case "open": 1041 $ping_status = "open"; 1042 break; 1043 default: 1044 $ping_status = get_option("default_ping_status"); 1045 break; 1046 } 1027 1047 } 1048 else { 1049 switch((int) $content_struct["mt_allow_pings"]) { 1050 case 0: 1051 $ping_status = "closed"; 1052 break; 1053 case 1: 1054 $ping_status = "open"; 1055 break; 1056 default: 1057 $ping_status = get_option("default_ping_status"); 1058 break; 1059 } 1060 } 1061 } 1062 else { 1063 $ping_status = get_option("default_ping_status"); 1028 1064 } 1029 1065 … … 1179 1215 } 1180 1216 1181 // Only set ping_status if it was provided. 1217 if(isset($content_struct["mt_allow_comments"])) { 1218 if(!is_numeric($content_struct["mt_allow_comments"])) { 1219 switch($content_struct["mt_allow_comments"]) { 1220 case "closed": 1221 $comment_status = "closed"; 1222 break; 1223 case "open": 1224 $comment_status = "open"; 1225 break; 1226 default: 1227 $comment_status = get_option("default_comment_status"); 1228 break; 1229 } 1230 } 1231 else { 1232 switch((int) $content_struct["mt_allow_comments"]) { 1233 case 0: 1234 $comment_status = "closed"; 1235 break; 1236 case 1: 1237 $comment_status = "open"; 1238 break; 1239 default: 1240 $comment_status = get_option("default_comment_status"); 1241 break; 1242 } 1243 } 1244 } 1245 1182 1246 if(isset($content_struct["mt_allow_pings"])) { 1183 switch((int) $content_struct["mt_allow_pings"]) { 1184 case 0: 1185 $ping_status = "closed"; 1186 break; 1187 case 1: 1188 $ping_status = "open"; 1189 break; 1247 if(!is_numeric($content_struct["mt_allow_pings"])) { 1248 switch($content["mt_allow_pings"]) { 1249 case "closed": 1250 $ping_status = "closed"; 1251 break; 1252 case "open": 1253 $ping_status = "open"; 1254 break; 1255 default: 1256 $ping_status = get_option("default_ping_status"); 1257 break; 1258 } 1259 } 1260 else { 1261 switch((int) $content_struct["mt_allow_pings"]) { 1262 case 0: 1263 $ping_status = "closed"; 1264 break; 1265 case 1: 1266 $ping_status = "open"; 1267 break; 1268 default: 1269 $ping_status = get_option("default_ping_status"); 1270 break; 1271 } 1190 1272 } 1191 1273 } … … 1222 1304 $to_ping = implode(' ', $to_ping); 1223 1305 1224 if(isset($content_struct["mt_allow_comments"])) {1225 $comment_status = (int) $content_struct["mt_allow_comments"];1226 }1227 1228 1306 // Do some timestamp voodoo 1229 1307 $dateCreatedd = $content_struct['dateCreated'];
Note: See TracChangeset
for help on using the changeset viewer.