Updates the src url in the server redirects

@param model
@param id
@param enabled
@return
@throws Exception
507324
@ExceptionHandler(Exception.class)
    @RequestMapping(value = "api/edit/server/{id}", method = RequestMethod.POST)
    public
    @ResponseBody
    ServerRedirect updateServer(Model model, @PathVariable int id,
                                @RequestParam(required = false) Boolean enabled) throws Exception {
        logger.info("updating Server");
        if (enabled != null) {
            if (enabled) {
                Client.enableHost(ServerRedirectService.getInstance().getRedirect(id).getSrcUrl());
            } else {
                Client.disableHost(ServerRedirectService.getInstance().getRedirect(id).getSrcUrl());
            }
        }
        return ServerRedirectService.getInstance().getRedirect(id);
    }
31031
public function update(Request $request, $id)
    {
        $this->model = $this->model->findOrFail($id);

        $request = $this->processRequest($request);

        if ($request === true) {
            return $this->redirection();
        }

        $this->validate($request, $this->model->rules());

        $this->model->update($request->all());

        $saved = $this->afterSaving($request);

        if ($saved) {
            return $this->redirection();
        }
    }
249493
@CacheControl(policy = { CachePolicy.MUST_REVALIDATE }, maxAge = 15 * 60)
	@RequestMapping("/directions.do")
	public String handleProducDirectionsRequest(Model model) {
		model.addAttribute("pageName", "Directions");
		return "page";
	}
612004
@Transactional
  @PostMapping(value = "/{entityTypeId}/{id}", params = "_method=PUT")
  @ResponseStatus(OK)
  public void updatePost(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("id") String untypedId,
      @RequestBody Map<String, Object> entityMap) {
    updateInternal(entityTypeId, untypedId, entityMap);
  }
674653
@RequestMapping(value = "api/edit/server/{id}/host", method = RequestMethod.POST)
    public
    @ResponseBody
    ServerRedirect updateDestRedirectHost(Model model, @PathVariable int id, String hostHeader) throws Exception {
        ServerRedirectService.getInstance().setHostHeader(hostHeader, id);
        return ServerRedirectService.getInstance().getRedirect(id);
    }
617670
public void redirect(String url) throws IOException {
        endChangesIfNecessary();
        ResponseWriter writer = getWrapped();
        writer.startElement("redirect", null);
        writer.writeAttribute("url", url, null);
        writer.endElement("redirect");
    }
358479
public void notifyFocus(String id)
    {
        Util utilAll = new Util(getUsersToAffect());

        utilAll.addClassName(id, "disabled");
        String addr = WebContextFactory.get().getHttpServletRequest().getRemoteAddr();
        utilAll.setValue(id + "Tip", addr);

        //utilAll.addScript("$('" + id + "').disabled = true;");
    }
861093
public function update(Update $request, $id)
    {
        try {
            $permission = $this->repository->findById($id);

            $data = $request->all();

            $permission->update($data);

            return $this->redirect('permissions.index');
        } catch (ModelNotFoundException $e) {
            return $this->redirectNotFound();
        }
    }
668949
public void enableDKIM(EnableDKIMRequest request) {
        checkNotNull(request, "object request should not be null.");
        assertStringNotNullOrEmpty(request.getDomainName(), "object domainName should not be null or empty");

        InternalRequest internalRequest =
                this.createRequest("verifiedDomain", request, HttpMethodName.PUT, request.getDomainName());
        internalRequest.addParameter("enable", "enableDkim");

        this.invokeHttpClient(internalRequest, SesResponse.class);
    }
38212
protected LabeledTextAreaPanel<String, DeregistrationModelBean> newMotivation(final String id,
		final IModel<DeregistrationModelBean> model)
	{
		final IModel<String> labelModel = ResourceModelFactory.newResourceModel(
			ResourceBundleKey.builder().key("sem.main.feedback.deregistration.user.label")
				.defaultValue("Please confirm the deregistration")
				.parameters(ListExtensions.toObjectArray(getDomainName())).build(),
			this);
		final IModel<String> placeholderModel = ResourceModelFactory.newResourceModel(
			"global.enter.your.deregistration.motivation.label", this,
			"Enter here your deregistration motivation.");
		final LabeledTextAreaPanel<String, DeregistrationModelBean> description = new LabeledTextAreaPanel<String, DeregistrationModelBean>(
			id, model, labelModel)
		{
			/** The Constant serialVersionUID. */
			private static final long serialVersionUID = 1L;

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected TextArea<String> newTextArea(final String id,
				final IModel<DeregistrationModelBean> model)
			{
				final TextArea<String> textArea = super.newTextArea(id, model);
				if (placeholderModel != null)
				{
					textArea.add(new AttributeAppender("placeholder", placeholderModel));
				}
				return textArea;
			}
		};
		return description;
	}
1307234
public function update(Update $request, $id)
    {
        try {
            $article = $this->repository->findById($id);

            $data = $request->all();

            unset($data['image']);
            unset($data['type']);

            if (\Input::hasFile('image')) {
                $article->deleteImage();

                $this->uploader->upload('image')->save('images/articles');

                $data['image'] = $this->uploader->getFilename();
            }

            $data['user_id'] = \Auth::id();
            $data['slug'] = Str::slug($data['title']);
            $article->update($data);

            return $this->redirect(isOnPages() ? 'pages.index' : 'articles.index');
        } catch (ModelNotFoundException $e) {
            return $this->redirectNotFound();
        }
    }
239408
@Route(method = HttpMethod.POST, uri = "/{id}")
    public Result updateBundle(@Parameter("id") long id) {
        final Bundle bundle = context.getBundle(id);
        if (bundle == null) {
            return notFound("Bundle " + id + " not found");
        } else {
            return async(new Callable<Result>() {
                @Override
                public Result call() throws Exception {
                    try {
                        logger().info("Updating bundle {} from {}", bundle.getSymbolicName(), bundle.getLocation());
                        bundle.update();
                        return ok();
                    } catch (BundleException e) {
                        logger().error("Cannot update bundle {}", bundle.getSymbolicName(), e);
                        return badRequest(e);
                    }
                }
            });
        }
    }
1222072
def POST(self, id):
        
        id = int(id)
        model.del_todo(id)
        raise web.seeother('/')
224798
@PATCH
    @Path("{id}")
    public final Response patch(@PathParam("id") final URI_ID id, @NotNull final MODEL model) throws Exception {
        return super.patch(id, model);
    }
31701
public function putUpdateFeatured(Request $request, $id)
    {
        $this->model = $this->model->findOrFail($id);

        $request = $this->processRequest($request);

        if ($request === true) {
            return $this->redirection();
        }

        $is_featured = $request->get('is_featured');
        $this->model->update(compact('is_featured'));

        $saved = $this->afterSaving($request);

        if ($saved) {
            return $this->redirection();
        }
    }
11689
public function actionUpdate($id)
    {
        $model = $this->findModel($id);
        if (!\Yii::$app->user->can('update', ['model' => $model]))
            throw new ForbiddenHttpException(Module::t('metaTag', 'Access denied.'));
        
        if ($model->load(\Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index']);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }
49788
@Override
    public boolean update(Engine engine) throws UpdateException {
        this.settings = engine.getSettings();
        String url = null;
        try {
            final boolean autoupdate = settings.getBoolean(Settings.KEYS.AUTO_UPDATE, true);
            final boolean enabled = settings.getBoolean(Settings.KEYS.ANALYZER_RETIREJS_ENABLED, true);
            final File repoFile = new File(settings.getDataDirectory(), "jsrepository.json");
            final boolean proceed = enabled && autoupdate && shouldUpdagte(repoFile);
            if (proceed) {
                LOGGER.debug("Begin RetireJS Update");
                url = settings.getString(Settings.KEYS.ANALYZER_RETIREJS_REPO_JS_URL, DEFAULT_JS_URL);
                initializeRetireJsRepo(settings, new URL(url));
            }
        } catch (InvalidSettingException ex) {
            throw new UpdateException("Unable to determine if autoupdate is enabled", ex);
        } catch (MalformedURLException ex) {
            throw new UpdateException(String.format("Inavlid URL for RetireJS repository (%s)", url), ex);
        } catch (IOException ex) {
            throw new UpdateException("Unable to get the data directory", ex);
        }
        return false;
    }