Index: trunk/extensions/OpenStackManager/OpenStackNovaProject.php |
— | — | @@ -345,8 +345,16 @@ |
346 | 346 | OpenStackNovaArticle::editArticle( $this->getProjectName(), $text ); |
347 | 347 | if ( $wgOpenStackManagerCreateProjectSALPages ) { |
348 | 348 | $pagename = $this->getProjectName() . "/SAL"; |
| 349 | + $id = Title::newFromText( $pagename, NS_NOVA_RESOURCE )->getArticleId(); |
| 350 | + $article = Article::newFromId( $id ); |
| 351 | + $content = ''; |
| 352 | + if ( $article ) { |
| 353 | + $content = $article->getRawText(); |
| 354 | + } |
349 | 355 | $text = "{{SAL|Project Name=" . $this->getProjectName() . "}}"; |
350 | | - OpenStackNovaArticle::editArticle( $pagename, $text ); |
| 356 | + if ( !strstr( $content, $text ) ) { |
| 357 | + OpenStackNovaArticle::editArticle( $pagename, $text ); |
| 358 | + } |
351 | 359 | } |
352 | 360 | } |
353 | 361 | |