- Timestamp:
- 09/02/07 20:00:32 (15 months ago)
- Location:
- team/michiel/import_blogs
- Files:
-
- 7 modified
-
. (modified) (1 prop)
-
common/mvblog.php (modified) (2 diffs)
-
common/mvblog_admin.php (modified) (2 diffs)
-
common/mvblog_common.php (modified) (2 diffs)
-
common/mvblog_upgrade.php (modified) (1 diff)
-
common/rdf.php (modified) (1 diff)
-
common/rss.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
team/michiel/import_blogs
- Property svnmerge-integrated changed from /trunk:1-567 to /trunk:1-572
-
team/michiel/import_blogs/common/mvblog.php
r564 r573 238 238 <?php 239 239 $categories = explode(",", $row["categories_ids"]); 240 foreach ($categories as $v) 241 echo htmlspecialchars($this->categories[$v]["name"])." "; 240 foreach ($categories as $v) { 241 if (array_key_exists($v, $this->categories)) 242 echo htmlspecialchars($this->categories[$v]["name"])." "; 243 } 242 244 ?> 243 245 </h2> … … 401 403 <?php 402 404 $categories = explode(",", $row["categories_ids"]); 403 foreach ($categories as $v) 404 echo htmlspecialchars($this->categories[$v]["name"])." "; 405 foreach ($categories as $v) { 406 if (array_key_exists($v, $this->categories)) 407 echo htmlspecialchars($this->categories[$v]["name"])." "; 408 } 405 409 ?> 406 410 </h2> -
team/michiel/import_blogs/common/mvblog_admin.php
r570 r573 939 939 <?php echo gettext("category").": "; ?> 940 940 <?php 941 $categories = explode(",", $row["categories_ids"]); 942 foreach ($categories as $v) 943 echo $this->categories[$v]["name"]." "; 941 if (array_key_exists("categories_ids", $row)) { 942 $categories = explode(",", $row["categories_ids"]); 943 foreach ($categories as $v) { 944 if (array_key_exists($v, $this->categories)) 945 echo $this->categories[$v]["name"]." "; 946 } 947 } 944 948 ?> 945 949 </h2> … … 1110 1114 */ 1111 1115 public function save_post($post) { 1116 if (!array_key_exists("categories_ids", $post)) 1117 $post["categories_ids"] = array(); 1112 1118 if ($post["id"]) { 1113 1119 $sql = sprintf("SELECT date,active FROM articles WHERE id = %d", $post["id"]); -
team/michiel/import_blogs/common/mvblog_common.php
r564 r573 111 111 /* methods */ 112 112 /* __construct {{{ */ 113 public function __construct($plugindir="plugins/", $adminmode=0) { 113 /** 114 * Setup stuff and handle settings etc and populate the data containers 115 * 116 * @param string $plugindir Directory where the plugins are. 117 * @param int $adminmode Must be 1 if in the admin interface. 118 * @param int $upgrade If set to 1 the data containers will not be populated to allow upgrades to them. 119 * 120 * If one of the default values is changed, please also change the call in mvblog_upgrade constructor. 121 */ 122 public function __construct($plugindir="plugins/", $adminmode=0, $upgrade=0) { 114 123 /* start session and output buffering */ 115 124 session_start(); … … 159 168 $this->_get_active_plugins(); 160 169 161 /* populate the authors array */ 162 $this->_get_authors(); 163 164 /* populate the categories array */ 165 $this->_get_categories(); 166 167 /* populate the menuitems array */ 168 $this->_get_menuitems(); 170 if (!$upgrade) { 171 /* populate the authors array */ 172 $this->_get_authors(); 173 174 /* populate the categories array */ 175 $this->_get_categories(); 176 177 /* populate the menuitems array */ 178 $this->_get_menuitems(); 179 } 169 180 170 181 /* plugin handling */ -
team/michiel/import_blogs/common/mvblog_upgrade.php
r552 r573 64 64 */ 65 65 public function __construct() { 66 parent::__construct( );66 parent::__construct("plugins/", 0, 1); 67 67 } 68 68 /* }}} */ -
team/michiel/import_blogs/common/rdf.php
r529 r573 59 59 $categories = explode(",", $row["categories_ids"]); 60 60 $category_names = array(); 61 foreach ($categories as $v) 62 $category_names[] = $mvblog->categories[$v]["name"]; 61 foreach ($categories as $v) { 62 if (array_key_exists($v, $mvblog->categories)) 63 $category_names[] = $mvblog->categories[$v]["name"]; 64 } 63 65 $items[$i]["category"] = implode(", ", $category_names); 64 66 } -
team/michiel/import_blogs/common/rss.php
r529 r573 111 111 } else { 112 112 echo "\t\t\t<link>".$url."index.php?action=view&id=".$row["id"]."$link</link>\n"; 113 $categories = explode(",", $row["categories_ids"]); 113 if (array_key_exists("categories_ids", $row)) 114 $categories = explode(",", $row["categories_ids"]); 115 else 116 $categories = array(); 114 117 echo "\t\t\t<category>"; 115 118 $category_names = array(); 116 foreach ($categories as $v) 117 $category_names[] = $mvblog->categories[$v]["name"]; 119 foreach ($categories as $v) { 120 if (array_key_exists($v, $mvblog->categories)) 121 $category_names[] = $mvblog->categories[$v]["name"]; 122 } 118 123 echo implode(", ", $category_names); 119 124 echo "</category>\n";
