?>
</a> <a href="<?php 
echo $emailChangeUrl;
?>
" class="wikia-button secondary">change email</a></dd>

	<dt>Email confirmation date</dt>
	<dd><?php 
echo $emailConfirmationDate;
?>
</dd>

	<dt>Subscription status</dt>
	<dd>
		<?php 
echo $emailSubscriptionStatus ? Wikia::successmsg('subscribed') : Wikia::errormsg('not subscribed');
?>
		<?php 
if (!$emailSubscriptionStatus) {
    ?>
<a href="<?php 
    echo $emailChangeSubscriptionUrl;
    ?>
" class="wikia-button secondary">re-subscribe</a><?php 
}
?>
	</dd>

	<dt>Last email delivery</dt>
	<dd><?php 
echo $emailLastDelivery;
/**
 * axWFactoryRemoveVariable
 *
 * Ajax call, remove
 *
 * @access public
 * @author eloy@wikia
 *
 * @return string: json string with array of variables
 */
function axWFactoryRemoveVariable()
{
    global $wgUser, $wgRequest;
    $error = 0;
    $return = "";
    if (!$wgUser->isAllowed('wikifactory')) {
        $error++;
        $return = Wikia::errormsg("You are not allowed to change variable value");
    } else {
        $cv_id = $wgRequest->getVal('varId');
        $city_id = $wgRequest->getVal('cityid');
        $tag_name = $wgRequest->getVal('tagName');
        $tag_wiki_count = 0;
        $form_id = $wgRequest->getVal("formId", null);
        $reason = $wgRequest->getVal("reason", null);
        if (!WikiFactory::removeVarById($cv_id, $city_id, $reason)) {
            $error++;
            $return = Wikia::errormsg("Variable not removed because of problems with database. Try again.");
        } else {
            $return = Wikia::successmsg(" Value of variable was removed ");
            if (!empty($tag_name)) {
                // apply changes to all wikis with given tag
                $tagsQuery = new WikiFactoryTagsQuery($tag_name);
                foreach ($tagsQuery->doQuery() as $tagged_wiki_id) {
                    if (WikiFactory::removeVarByID($cv_id, $tagged_wiki_id)) {
                        $tag_wiki_count++;
                    }
                }
                $return .= Wikia::successmsg(" ({$tag_wiki_count} wikis affected)");
            }
        }
    }
    if (empty($form_id)) {
        $div_name = "wf-variable-parse";
    } else {
        $div_name = "wf-variable-parse-{$form_id}";
    }
    return json_encode(array("div-body" => $return, "is-error" => $error, "tag-name" => $tag_name, "tag-wikis" => $tag_wiki_count, "div-name" => $div_name));
}
 /**
  * doUpdateDomains
  *
  * Store changes connected with domains
  *
  * @access private
  * @author eloy@wikia
  *
  * @return mixed	info when change, null when not changed
  */
 private function doUpdateDomains(&$request)
 {
     $action = $request->getText("wpAction", null);
     $reason = $request->getText("wpReason", wfMsg('wikifactory-public-status-change-default-reason'));
     $message = "";
     switch ($action) {
         case "status":
             $status = $request->getVal("wpWikiStatus", 0);
             WikiFactory::setPublicStatus($status, $this->mWiki->city_id, $reason);
             $this->mWiki->city_public = $status;
             WikiFactory::clearCache($this->mWiki->city_id);
             $message = "Status of this wiki was changed to " . $this->mStatuses[$status];
         case "protect":
             $protect = $request->getCheck("wpProtected", false);
             if ($protect) {
                 $message = "Wiki protected";
                 WikiFactory::setFlags($this->mWiki->city_id, WikiFactory::FLAG_PROTECTED, false, $reason);
             } else {
                 $message = "Wiki un-protected";
                 WikiFactory::resetFlags($this->mWiki->city_id, WikiFactory::FLAG_PROTECTED, false, $reason);
             }
             break;
     }
     return Wikia::successmsg($message);
 }
Esempio n. 4
0
print $returnURL;
?>
">Return</a><?php 
echo wfMessage('pipe-separator')->escaped() . $logLink;
?>
</small>
<?php 
if (!is_null($status)) {
    ?>
<fieldset>
	<legend><?php 
    echo wfMessage('editaccount-status')->escaped();
    ?>
</legend>
	<?php 
    echo $status ? Wikia::successmsg($statusMsg) : Wikia::errormsg($statusMsg);
    ?>
	<?php 
    if (!empty($statusMsg2)) {
        echo Wikia::errormsg($statusMsg2);
    }
    ?>
</fieldset>
<?php 
}
?>
<fieldset>
	<legend><?php 
echo wfMessage('editaccount-frame-account', $user)->escaped();
?>
</legend>
 /**
  * doUpdateDomains
  *
  * Store changes connected with domains
  *
  * @access private
  * @author eloy@wikia
  *
  * @return mixed	info when change, null when not changed
  */
 private function doUpdateDomains(&$request)
 {
     $action = $request->getText("wpAction", null);
     $reason = $request->getText("wpReason", wfMsg('wikifactory-public-status-change-default-reason'));
     $message = "";
     switch ($action) {
         case "status":
             $status = $request->getVal("wpWikiStatus", 0);
             WikiFactory::setPublicStatus($status, $this->mWiki->city_id, $reason);
             $this->mWiki->city_public = $status;
             WikiFactory::clearCache($this->mWiki->city_id);
             $message = "Status of this wiki was changed to " . $this->mStatuses[$status];
             break;
     }
     return Wikia::successmsg($message);
 }